@maplibre/maplibre-react-native 10.0.0-beta.3 → 10.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +98 -51
- package/android/gradle.properties +7 -0
- package/android/src/main/AndroidManifest.xml +4 -2
- package/android/src/main/AndroidManifestNew.xml +5 -0
- package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java +0 -5
- package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java +0 -66
- package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java +0 -28
- package/ios/MLRN/MLRNBackgroundLayer.h +0 -1
- package/ios/MLRN/MLRNFillExtrusionLayer.h +0 -1
- package/ios/MLRN/MLRNFillLayer.h +0 -1
- package/ios/MLRN/MLRNFillLayer.m +1 -0
- package/ios/MLRN/MLRNLineLayer.h +0 -1
- package/ios/MLRN/MLRNRasterLayer.h +0 -1
- package/ios/MLRN/MLRNShapeSource.h +0 -11
- package/ios/MLRN/MLRNShapeSource.m +0 -38
- package/ios/MLRN/MLRNShapeSourceManager.m +0 -68
- package/ios/MLRN/MLRNSymbolLayer.h +1 -7
- package/ios/MLRN/MLRNSymbolLayer.m +1 -89
- package/ios/MLRN/MLRNSymbolLayerManager.m +0 -1
- package/lib/commonjs/MapLibreRN.js +1 -13
- package/lib/commonjs/MapLibreRN.js.map +1 -1
- package/lib/commonjs/components/Images.js +1 -5
- package/lib/commonjs/components/Images.js.map +1 -1
- package/lib/commonjs/components/MapView.js +0 -7
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js +6 -38
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/SymbolLayer.js +2 -17
- package/lib/commonjs/components/SymbolLayer.js.map +1 -1
- package/lib/commonjs/components/VectorSource.js +1 -11
- package/lib/commonjs/components/VectorSource.js.map +1 -1
- package/lib/module/MapLibreRN.js +0 -4
- package/lib/module/MapLibreRN.js.map +1 -1
- package/lib/module/components/Images.js +1 -5
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/MapView.js +0 -7
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/ShapeSource.js +5 -37
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/SymbolLayer.js +3 -18
- package/lib/module/components/SymbolLayer.js.map +1 -1
- package/lib/module/components/VectorSource.js +1 -11
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts +0 -4
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Camera.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/MapView.d.ts +0 -1
- package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +0 -1
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +0 -6
- package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/module/src/MapLibreRN.d.ts +0 -4
- package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Camera.d.ts +1 -1
- package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MapView.d.ts +0 -1
- package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ShapeSource.d.ts +0 -1
- package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/SymbolLayer.d.ts +0 -6
- package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/MapLibreRN.ts +0 -6
- package/src/components/Camera.tsx +1 -1
- package/src/components/Images.tsx +1 -10
- package/src/components/MapView.tsx +0 -11
- package/src/components/ShapeSource.tsx +5 -73
- package/src/components/SymbolLayer.tsx +5 -33
- package/src/components/VectorSource.tsx +4 -20
- package/android/src/main/res/values/strings.xml +0 -3
- package/lib/commonjs/components/Style.js +0 -266
- package/lib/commonjs/components/Style.js.map +0 -1
- package/lib/commonjs/utils/deprecation.js +0 -31
- package/lib/commonjs/utils/deprecation.js.map +0 -1
- package/lib/module/components/Style.js +0 -261
- package/lib/module/components/Style.js.map +0 -1
- package/lib/module/utils/deprecation.js +0 -27
- package/lib/module/utils/deprecation.js.map +0 -1
- package/lib/typescript/commonjs/src/components/Style.d.ts +0 -81
- package/lib/typescript/commonjs/src/components/Style.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/deprecation.d.ts +0 -6
- package/lib/typescript/commonjs/src/utils/deprecation.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Style.d.ts +0 -81
- package/lib/typescript/module/src/components/Style.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/deprecation.d.ts +0 -6
- package/lib/typescript/module/src/utils/deprecation.d.ts.map +0 -1
- package/src/components/Style.tsx +0 -371
- package/src/utils/deprecation.ts +0 -31
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useMemo, useState, useEffect } from "react";
|
|
4
|
-
import BackgroundLayer from "./BackgroundLayer.js";
|
|
5
|
-
import CircleLayer from "./CircleLayer.js";
|
|
6
|
-
import FillExtrusionLayer from "./FillExtrusionLayer.js";
|
|
7
|
-
import FillLayer from "./FillLayer.js";
|
|
8
|
-
import HeatmapLayer from "./HeatmapLayer.js";
|
|
9
|
-
import ImageSource from "./ImageSource.js";
|
|
10
|
-
import LineLayer from "./LineLayer.js";
|
|
11
|
-
import RasterLayer from "./RasterLayer.js";
|
|
12
|
-
import RasterSource from "./RasterSource.js";
|
|
13
|
-
import ShapeSource from "./ShapeSource.js";
|
|
14
|
-
import SymbolLayer from "./SymbolLayer.js";
|
|
15
|
-
import VectorSource from "./VectorSource.js";
|
|
16
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
function toCamelCase(s) {
|
|
18
|
-
return s.replace(/([-_][a-z])/gi, $1 => {
|
|
19
|
-
return $1.toUpperCase().replace("-", "").replace("_", "");
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Patches the Mapbox Style Specification keys into the style props attributes:
|
|
24
|
-
// icon-allow-overlap -> iconAllowOverlap
|
|
25
|
-
function toCamelCaseKeys(oldObj) {
|
|
26
|
-
if (!oldObj) {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
const newObj = {};
|
|
30
|
-
Object.keys(oldObj).forEach(key => {
|
|
31
|
-
const value = oldObj[key];
|
|
32
|
-
if (key.includes("-")) {
|
|
33
|
-
newObj[toCamelCase(key)] = value;
|
|
34
|
-
} else {
|
|
35
|
-
newObj[key] = value;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return newObj;
|
|
39
|
-
}
|
|
40
|
-
function getLayerComponentType(layer) {
|
|
41
|
-
const {
|
|
42
|
-
type
|
|
43
|
-
} = layer;
|
|
44
|
-
switch (type) {
|
|
45
|
-
case "circle":
|
|
46
|
-
return CircleLayer;
|
|
47
|
-
case "symbol":
|
|
48
|
-
return SymbolLayer;
|
|
49
|
-
case "raster":
|
|
50
|
-
return RasterLayer;
|
|
51
|
-
case "line":
|
|
52
|
-
return LineLayer;
|
|
53
|
-
case "fill":
|
|
54
|
-
return FillLayer;
|
|
55
|
-
case "fill-extrusion":
|
|
56
|
-
return FillExtrusionLayer;
|
|
57
|
-
case "background":
|
|
58
|
-
return BackgroundLayer;
|
|
59
|
-
case "heatmap":
|
|
60
|
-
return HeatmapLayer;
|
|
61
|
-
}
|
|
62
|
-
console.warn(`Mapbox layer type '${type}' is not supported/`);
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
function asLayerComponent(layer) {
|
|
66
|
-
const LayerComponent = getLayerComponentType(layer);
|
|
67
|
-
if (!LayerComponent) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
const style = {
|
|
71
|
-
...toCamelCaseKeys(layer.paint),
|
|
72
|
-
...toCamelCaseKeys(layer.layout)
|
|
73
|
-
};
|
|
74
|
-
const layerProps = {};
|
|
75
|
-
if (layer.source) {
|
|
76
|
-
layerProps.sourceID = layer.source;
|
|
77
|
-
}
|
|
78
|
-
if (layer["source-layer"]) {
|
|
79
|
-
layerProps.sourceLayerID = layer["source-layer"];
|
|
80
|
-
}
|
|
81
|
-
if (layer.minzoom) {
|
|
82
|
-
layerProps.minZoomLevel = layer.minzoom;
|
|
83
|
-
}
|
|
84
|
-
if (layer.maxzoom) {
|
|
85
|
-
layerProps.maxZoomLevel = layer.maxzoom;
|
|
86
|
-
}
|
|
87
|
-
if (layer.filter) {
|
|
88
|
-
layerProps.filter = layer.filter;
|
|
89
|
-
}
|
|
90
|
-
if (Object.keys(style).length) {
|
|
91
|
-
layerProps.style = style;
|
|
92
|
-
}
|
|
93
|
-
return /*#__PURE__*/_jsx(LayerComponent, {
|
|
94
|
-
id: layer.id,
|
|
95
|
-
...layerProps
|
|
96
|
-
}, layer.id);
|
|
97
|
-
}
|
|
98
|
-
function getTileSourceProps(source) {
|
|
99
|
-
const sourceProps = {};
|
|
100
|
-
if (source.url) {
|
|
101
|
-
sourceProps.url = source.url;
|
|
102
|
-
}
|
|
103
|
-
if (source.tiles) {
|
|
104
|
-
sourceProps.tileUrlTemplates = source.tiles;
|
|
105
|
-
}
|
|
106
|
-
if (source.minzoom !== undefined) {
|
|
107
|
-
sourceProps.minZoomLevel = source.minzoom;
|
|
108
|
-
}
|
|
109
|
-
if (source.maxzoom !== undefined) {
|
|
110
|
-
sourceProps.maxZoomLevel = source.maxzoom;
|
|
111
|
-
}
|
|
112
|
-
if (source.attribution) {
|
|
113
|
-
sourceProps.attribution = source.attribution;
|
|
114
|
-
}
|
|
115
|
-
if (source.scheme && source.scheme === "tms") {
|
|
116
|
-
sourceProps.tms = true;
|
|
117
|
-
}
|
|
118
|
-
return sourceProps;
|
|
119
|
-
}
|
|
120
|
-
function getVectorSource(id, source) {
|
|
121
|
-
const sourceProps = {
|
|
122
|
-
...getTileSourceProps(source)
|
|
123
|
-
};
|
|
124
|
-
return /*#__PURE__*/_jsx(VectorSource, {
|
|
125
|
-
id: id,
|
|
126
|
-
...sourceProps
|
|
127
|
-
}, id);
|
|
128
|
-
}
|
|
129
|
-
function getRasterSource(id, source) {
|
|
130
|
-
const sourceProps = {
|
|
131
|
-
...getTileSourceProps(source)
|
|
132
|
-
};
|
|
133
|
-
if (source.tileSize) {
|
|
134
|
-
sourceProps.tileSize = source.tileSize;
|
|
135
|
-
}
|
|
136
|
-
return /*#__PURE__*/_jsx(RasterSource, {
|
|
137
|
-
id: id,
|
|
138
|
-
...sourceProps
|
|
139
|
-
}, id);
|
|
140
|
-
}
|
|
141
|
-
function getImageSource(id, source) {
|
|
142
|
-
const sourceProps = {
|
|
143
|
-
url: source.url,
|
|
144
|
-
coordinates: source.coordinates
|
|
145
|
-
};
|
|
146
|
-
return /*#__PURE__*/_jsx(ImageSource, {
|
|
147
|
-
id: id,
|
|
148
|
-
...sourceProps
|
|
149
|
-
}, id);
|
|
150
|
-
}
|
|
151
|
-
function getShapeSource(id, source) {
|
|
152
|
-
const sourceProps = {};
|
|
153
|
-
if (source.data && typeof source.data === "string") {
|
|
154
|
-
sourceProps.url = source.data;
|
|
155
|
-
} else if (source.data && typeof source.data === "object") {
|
|
156
|
-
sourceProps.shape = source.data;
|
|
157
|
-
}
|
|
158
|
-
if (source.cluster !== undefined) {
|
|
159
|
-
sourceProps.cluster = source.cluster;
|
|
160
|
-
}
|
|
161
|
-
if (source.clusterRadius !== undefined) {
|
|
162
|
-
sourceProps.clusterRadius = source.clusterRadius;
|
|
163
|
-
}
|
|
164
|
-
if (source.maxzoom !== undefined) {
|
|
165
|
-
sourceProps.maxZoomLevel = source.maxzoom;
|
|
166
|
-
}
|
|
167
|
-
if (source.clusterMaxZoom !== undefined) {
|
|
168
|
-
sourceProps.clusterMaxZoomLevel = source.clusterMaxZoom;
|
|
169
|
-
}
|
|
170
|
-
if (source.clusterProperties !== undefined) {
|
|
171
|
-
sourceProps.clusterProperties = source.clusterProperties;
|
|
172
|
-
}
|
|
173
|
-
if (source.buffer !== undefined) {
|
|
174
|
-
sourceProps.buffer = source.buffer;
|
|
175
|
-
}
|
|
176
|
-
if (source.tolerance !== undefined) {
|
|
177
|
-
sourceProps.tolerance = source.tolerance;
|
|
178
|
-
}
|
|
179
|
-
if (source.lineMetrics !== undefined) {
|
|
180
|
-
sourceProps.lineMetrics = source.lineMetrics;
|
|
181
|
-
}
|
|
182
|
-
return /*#__PURE__*/_jsx(ShapeSource, {
|
|
183
|
-
id: id,
|
|
184
|
-
...sourceProps
|
|
185
|
-
}, id);
|
|
186
|
-
}
|
|
187
|
-
function asSourceComponent(id, source) {
|
|
188
|
-
switch (source.type) {
|
|
189
|
-
case "vector":
|
|
190
|
-
return getVectorSource(id, source);
|
|
191
|
-
case "raster":
|
|
192
|
-
return getRasterSource(id, source);
|
|
193
|
-
case "image":
|
|
194
|
-
return getImageSource(id, source);
|
|
195
|
-
case "geojson":
|
|
196
|
-
return getShapeSource(id, source);
|
|
197
|
-
}
|
|
198
|
-
console.warn(`MapLibre source type '${source.type}' is not supported`);
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.
|
|
203
|
-
* Only [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.
|
|
204
|
-
* Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.
|
|
205
|
-
*
|
|
206
|
-
* TODO: Maintainer forking this project does not understand the above comment regarding what is supported.
|
|
207
|
-
*/
|
|
208
|
-
const Style = props => {
|
|
209
|
-
const [fetchedJson, setFetchedJson] = useState({});
|
|
210
|
-
const json = typeof props.json === "object" ? props.json : fetchedJson;
|
|
211
|
-
|
|
212
|
-
// Fetch style when props.json is a URL
|
|
213
|
-
useEffect(() => {
|
|
214
|
-
const abortController = new AbortController();
|
|
215
|
-
const fetchStyleJson = async url => {
|
|
216
|
-
try {
|
|
217
|
-
const response = await fetch(url, {
|
|
218
|
-
signal: abortController.signal
|
|
219
|
-
});
|
|
220
|
-
const responseJson = await response.json();
|
|
221
|
-
setFetchedJson(responseJson);
|
|
222
|
-
} catch (error) {
|
|
223
|
-
const e = error;
|
|
224
|
-
if (e.name === "AbortError") {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
throw e;
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
if (typeof props.json === "string") {
|
|
231
|
-
fetchStyleJson(props.json);
|
|
232
|
-
}
|
|
233
|
-
return function cleanup() {
|
|
234
|
-
abortController.abort();
|
|
235
|
-
};
|
|
236
|
-
}, [props.json]);
|
|
237
|
-
|
|
238
|
-
// Extract layer components from json
|
|
239
|
-
const layerComponents = useMemo(() => {
|
|
240
|
-
if (!json.layers) {
|
|
241
|
-
return [];
|
|
242
|
-
}
|
|
243
|
-
return json.layers.map(asLayerComponent).filter(x => !!x);
|
|
244
|
-
}, [json.layers]);
|
|
245
|
-
|
|
246
|
-
// Extract source components from json
|
|
247
|
-
const sourceComponents = useMemo(() => {
|
|
248
|
-
const {
|
|
249
|
-
sources
|
|
250
|
-
} = json;
|
|
251
|
-
if (!sources || !Object.keys(sources)) {
|
|
252
|
-
return [];
|
|
253
|
-
}
|
|
254
|
-
return Object.entries(sources).map(([id, source]) => asSourceComponent(id, source)).filter(x => !!x);
|
|
255
|
-
}, [json]);
|
|
256
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
257
|
-
children: [sourceComponents, layerComponents]
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
export default Style;
|
|
261
|
-
//# sourceMappingURL=Style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useState","useEffect","BackgroundLayer","CircleLayer","FillExtrusionLayer","FillLayer","HeatmapLayer","ImageSource","LineLayer","RasterLayer","RasterSource","ShapeSource","SymbolLayer","VectorSource","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","toCamelCase","s","replace","$1","toUpperCase","toCamelCaseKeys","oldObj","newObj","Object","keys","forEach","key","value","includes","getLayerComponentType","layer","type","console","warn","asLayerComponent","LayerComponent","style","paint","layout","layerProps","source","sourceID","sourceLayerID","minzoom","minZoomLevel","maxzoom","maxZoomLevel","filter","length","id","getTileSourceProps","sourceProps","url","tiles","tileUrlTemplates","undefined","attribution","scheme","tms","getVectorSource","getRasterSource","tileSize","getImageSource","coordinates","getShapeSource","data","shape","cluster","clusterRadius","clusterMaxZoom","clusterMaxZoomLevel","clusterProperties","buffer","tolerance","lineMetrics","asSourceComponent","Style","props","fetchedJson","setFetchedJson","json","abortController","AbortController","fetchStyleJson","response","fetch","signal","responseJson","error","e","name","cleanup","abort","layerComponents","layers","map","x","sourceComponents","sources","entries","children"],"sourceRoot":"../../../src","sources":["components/Style.tsx"],"mappings":";;AAAA,SACEA,OAAO,EACPC,QAAQ,EACRC,SAAS,QAGJ,OAAO;AAEd,OAAOC,eAAe,MAAqC,sBAAmB;AAC9E,OAAOC,WAAW,MAAiC,kBAAe;AAClE,OAAOC,kBAAkB,MAElB,yBAAsB;AAC7B,OAAOC,SAAS,MAA+B,gBAAa;AAC5D,OAAOC,YAAY,MAAkC,mBAAgB;AACrE,OAAOC,WAAW,MAAM,kBAAe;AACvC,OAAOC,SAAS,MAA+B,gBA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AAgB,GAAGvG,OAAO,CAAC,MAAM;IACrC,MAAM;MAAEwG;IAAQ,CAAC,GAAGlB,IAAI;IACxB,IAAI,CAACkB,OAAO,IAAI,CAAC3E,MAAM,CAACC,IAAI,CAAC0E,OAAO,CAAC,EAAE;MACrC,OAAO,EAAE;IACX;IACA,OAAO3E,MAAM,CAAC4E,OAAO,CAACD,OAAO,CAAC,CAC3BH,GAAG,CAAC,CAAC,CAAC9C,EAAE,EAAET,MAAM,CAAC,KAAKmC,iBAAiB,CAAC1B,EAAE,EAAET,MAAM,CAAC,CAAC,CACpDO,MAAM,CAAEiD,CAAC,IAAK,CAAC,CAACA,CAAC,CAAC;EACvB,CAAC,EAAE,CAAChB,IAAI,CAAC,CAAC;EAEV,oBACElE,KAAA,CAAAF,SAAA;IAAAwF,QAAA,GACGH,gBAAgB,EAChBJ,eAAe;EAAA,CAChB,CAAC;AAEP,CAAC;AAED,eAAejB,KAAK","ignoreList":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Copy properties from origObject to newObject, which not exists in newObject,
|
|
5
|
-
* calls onDeprecatedCalled callback in case a copied property is invoked.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export function copyPropertiesAsDeprecated(origObject, newObject, onDeprecatedCalled, accessors = {}) {
|
|
9
|
-
const result = {
|
|
10
|
-
...newObject
|
|
11
|
-
};
|
|
12
|
-
for (const [key, value] of Object.entries(origObject)) {
|
|
13
|
-
if (!(key in newObject)) {
|
|
14
|
-
Object.defineProperty(result, key, {
|
|
15
|
-
get() {
|
|
16
|
-
onDeprecatedCalled(key);
|
|
17
|
-
return accessors[key] ? accessors[key](value) : value;
|
|
18
|
-
},
|
|
19
|
-
enumerable: true,
|
|
20
|
-
// Ensure the property is enumerable
|
|
21
|
-
configurable: true // Ensure the property can be reconfigured
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=deprecation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["copyPropertiesAsDeprecated","origObject","newObject","onDeprecatedCalled","accessors","result","key","value","Object","entries","defineProperty","get","enumerable","configurable"],"sourceRoot":"../../../src","sources":["utils/deprecation.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,0BAA0BA,CAIxCC,UAA0B,EAC1BC,SAA6B,EAC7BC,kBAAyC,EACzCC,SAAkD,GAAG,CAAC,CAAC,EACnC;EACpB,MAAMC,MAAM,GAAG;IAAE,GAAGH;EAAU,CAAC;EAE/B,KAAK,MAAM,CAACI,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACR,UAAU,CAAC,EAAE;IACrD,IAAI,EAAEK,GAAG,IAAIJ,SAAS,CAAC,EAAE;MACvBM,MAAM,CAACE,cAAc,CAACL,MAAM,EAAEC,GAAG,EAAE;QACjCK,GAAGA,CAAA,EAAG;UACJR,kBAAkB,CAACG,GAAG,CAAC;UACvB,OAAOF,SAAS,CAACE,GAAG,CAAC,GAAGF,SAAS,CAACE,GAAG,CAAC,CAACC,KAAK,CAAC,GAAGA,KAAK;QACvD,CAAC;QACDK,UAAU,EAAE,IAAI;QAAE;QAClBC,YAAY,EAAE,IAAI,CAAE;MACtB,CAAC,CAAC;IACJ;EACF;EAEA,OAAOR,MAAM;AACf","ignoreList":[]}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from "react";
|
|
2
|
-
import { type ExpressionField, type FilterExpression } from "../utils/MapLibreRNStyles";
|
|
3
|
-
interface MapLibreJSONLayer {
|
|
4
|
-
type: string;
|
|
5
|
-
paint: {
|
|
6
|
-
[k: string]: unknown;
|
|
7
|
-
};
|
|
8
|
-
layout: {
|
|
9
|
-
[k: string]: unknown;
|
|
10
|
-
};
|
|
11
|
-
source?: string;
|
|
12
|
-
"source-layer"?: string;
|
|
13
|
-
minzoom?: number;
|
|
14
|
-
maxzoom?: number;
|
|
15
|
-
filter?: FilterExpression;
|
|
16
|
-
id: string;
|
|
17
|
-
}
|
|
18
|
-
interface MapLibreJSONSource {
|
|
19
|
-
type: string;
|
|
20
|
-
url?: string;
|
|
21
|
-
tiles?: string[];
|
|
22
|
-
minzoom?: number;
|
|
23
|
-
maxzoom?: number;
|
|
24
|
-
attribution?: string;
|
|
25
|
-
scheme?: "xyz" | "tms";
|
|
26
|
-
bounds?: number[];
|
|
27
|
-
buffer?: number;
|
|
28
|
-
tileSize?: number;
|
|
29
|
-
coordinates?: [
|
|
30
|
-
[
|
|
31
|
-
number,
|
|
32
|
-
number
|
|
33
|
-
],
|
|
34
|
-
[
|
|
35
|
-
number,
|
|
36
|
-
number
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
number,
|
|
40
|
-
number
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
number,
|
|
44
|
-
number
|
|
45
|
-
]
|
|
46
|
-
];
|
|
47
|
-
cluster?: boolean;
|
|
48
|
-
clusterMaxZoom?: number;
|
|
49
|
-
clusterMinPoints?: number;
|
|
50
|
-
clusterRadius?: number;
|
|
51
|
-
clusterProperties?: {
|
|
52
|
-
[propertyName: string]: ExpressionField;
|
|
53
|
-
};
|
|
54
|
-
data?: string | object;
|
|
55
|
-
filter?: FilterExpression;
|
|
56
|
-
generateId?: boolean;
|
|
57
|
-
lineMetrics?: boolean;
|
|
58
|
-
tolerance?: number;
|
|
59
|
-
}
|
|
60
|
-
interface MapLibreJSON {
|
|
61
|
-
layers?: MapLibreJSONLayer[];
|
|
62
|
-
sources?: {
|
|
63
|
-
[key: string]: MapLibreJSONSource;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
interface StyleProps {
|
|
67
|
-
/**
|
|
68
|
-
* A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON.
|
|
69
|
-
*/
|
|
70
|
-
json?: MapLibreJSON | URL;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.
|
|
74
|
-
* Only [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.
|
|
75
|
-
* Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.
|
|
76
|
-
*
|
|
77
|
-
* TODO: Maintainer forking this project does not understand the above comment regarding what is supported.
|
|
78
|
-
*/
|
|
79
|
-
declare const Style: (props: StyleProps) => ReactElement;
|
|
80
|
-
export default Style;
|
|
81
|
-
//# sourceMappingURL=Style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Style.d.ts","sourceRoot":"","sources":["../../../../../src/components/Style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAgBf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AAmEnC,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAChC,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAwCD,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAA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AAW,UAAU,KAAG,YA0DlC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copy properties from origObject to newObject, which not exists in newObject,
|
|
3
|
-
* calls onDeprecatedCalled callback in case a copied property is invoked.
|
|
4
|
-
*/
|
|
5
|
-
export declare function copyPropertiesAsDeprecated<DeprecatedType extends object, WithDeprecatedType extends Record<string, unknown>>(origObject: DeprecatedType, newObject: WithDeprecatedType, onDeprecatedCalled: (key: string) => void, accessors?: Record<string, (value: any) => unknown>): WithDeprecatedType;
|
|
6
|
-
//# sourceMappingURL=deprecation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../src/utils/deprecation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,0BAA0B,CACxC,cAAc,SAAS,MAAM,EAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAElD,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,kBAAkB,EAC7B,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EACzC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAM,GACtD,kBAAkB,CAiBpB"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from "react";
|
|
2
|
-
import { type ExpressionField, type FilterExpression } from "../utils/MapLibreRNStyles";
|
|
3
|
-
interface MapLibreJSONLayer {
|
|
4
|
-
type: string;
|
|
5
|
-
paint: {
|
|
6
|
-
[k: string]: unknown;
|
|
7
|
-
};
|
|
8
|
-
layout: {
|
|
9
|
-
[k: string]: unknown;
|
|
10
|
-
};
|
|
11
|
-
source?: string;
|
|
12
|
-
"source-layer"?: string;
|
|
13
|
-
minzoom?: number;
|
|
14
|
-
maxzoom?: number;
|
|
15
|
-
filter?: FilterExpression;
|
|
16
|
-
id: string;
|
|
17
|
-
}
|
|
18
|
-
interface MapLibreJSONSource {
|
|
19
|
-
type: string;
|
|
20
|
-
url?: string;
|
|
21
|
-
tiles?: string[];
|
|
22
|
-
minzoom?: number;
|
|
23
|
-
maxzoom?: number;
|
|
24
|
-
attribution?: string;
|
|
25
|
-
scheme?: "xyz" | "tms";
|
|
26
|
-
bounds?: number[];
|
|
27
|
-
buffer?: number;
|
|
28
|
-
tileSize?: number;
|
|
29
|
-
coordinates?: [
|
|
30
|
-
[
|
|
31
|
-
number,
|
|
32
|
-
number
|
|
33
|
-
],
|
|
34
|
-
[
|
|
35
|
-
number,
|
|
36
|
-
number
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
number,
|
|
40
|
-
number
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
number,
|
|
44
|
-
number
|
|
45
|
-
]
|
|
46
|
-
];
|
|
47
|
-
cluster?: boolean;
|
|
48
|
-
clusterMaxZoom?: number;
|
|
49
|
-
clusterMinPoints?: number;
|
|
50
|
-
clusterRadius?: number;
|
|
51
|
-
clusterProperties?: {
|
|
52
|
-
[propertyName: string]: ExpressionField;
|
|
53
|
-
};
|
|
54
|
-
data?: string | object;
|
|
55
|
-
filter?: FilterExpression;
|
|
56
|
-
generateId?: boolean;
|
|
57
|
-
lineMetrics?: boolean;
|
|
58
|
-
tolerance?: number;
|
|
59
|
-
}
|
|
60
|
-
interface MapLibreJSON {
|
|
61
|
-
layers?: MapLibreJSONLayer[];
|
|
62
|
-
sources?: {
|
|
63
|
-
[key: string]: MapLibreJSONSource;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
interface StyleProps {
|
|
67
|
-
/**
|
|
68
|
-
* A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON.
|
|
69
|
-
*/
|
|
70
|
-
json?: MapLibreJSON | URL;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.
|
|
74
|
-
* Only [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.
|
|
75
|
-
* Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.
|
|
76
|
-
*
|
|
77
|
-
* TODO: Maintainer forking this project does not understand the above comment regarding what is supported.
|
|
78
|
-
*/
|
|
79
|
-
declare const Style: (props: StyleProps) => ReactElement;
|
|
80
|
-
export default Style;
|
|
81
|
-
//# sourceMappingURL=Style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Style.d.ts","sourceRoot":"","sources":["../../../../../src/components/Style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAgBf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AAmEnC,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAChC,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAwCD,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC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|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copy properties from origObject to newObject, which not exists in newObject,
|
|
3
|
-
* calls onDeprecatedCalled callback in case a copied property is invoked.
|
|
4
|
-
*/
|
|
5
|
-
export declare function copyPropertiesAsDeprecated<DeprecatedType extends object, WithDeprecatedType extends Record<string, unknown>>(origObject: DeprecatedType, newObject: WithDeprecatedType, onDeprecatedCalled: (key: string) => void, accessors?: Record<string, (value: any) => unknown>): WithDeprecatedType;
|
|
6
|
-
//# sourceMappingURL=deprecation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../src/utils/deprecation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,0BAA0B,CACxC,cAAc,SAAS,MAAM,EAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAElD,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,kBAAkB,EAC7B,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EACzC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAM,GACtD,kBAAkB,CAiBpB"}
|