@maplibre/maplibre-react-native 9.0.1 → 10.0.0-alpha.1
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/.eslintrc.js +10 -2
- package/.husky/pre-commit +5 -0
- package/.yarn/plugins/@yarnpkg/plugin-typescript.cjs +9 -0
- package/.yarn/sdks/eslint/bin/eslint.js +20 -0
- package/.yarn/sdks/eslint/lib/api.js +20 -0
- package/.yarn/sdks/eslint/package.json +6 -0
- package/.yarn/sdks/integrations.yml +5 -0
- package/.yarn/sdks/prettier/index.js +20 -0
- package/.yarn/sdks/prettier/package.json +6 -0
- package/.yarn/sdks/typescript/bin/tsc +20 -0
- package/.yarn/sdks/typescript/bin/tsserver +20 -0
- package/.yarn/sdks/typescript/lib/tsc.js +20 -0
- package/.yarn/sdks/typescript/lib/tsserver.js +225 -0
- package/.yarn/sdks/typescript/lib/tsserverlibrary.js +225 -0
- package/.yarn/sdks/typescript/lib/typescript.js +20 -0
- package/.yarn/sdks/typescript/package.json +6 -0
- package/CHANGELOG.md +15 -1
- package/android/build.gradle +2 -2
- package/android/rctmgl/build.gradle +2 -4
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSource.java +14 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/styles/sources/RCTMGLShapeSourceManager.java +26 -0
- package/android/rctmgl/src/main/java/com/mapbox/rctmgl/utils/ClusterPropertyEntry.java +13 -0
- package/docs/Annotation.md +8 -9
- package/docs/BackgroundLayer.md +2 -10
- package/docs/Callout.md +5 -5
- package/docs/Camera.md +18 -47
- package/docs/CircleLayer.md +2 -10
- package/docs/FillExtrusionLayer.md +2 -10
- package/docs/FillLayer.md +2 -10
- package/docs/HeatmapLayer.md +2 -10
- package/docs/ImageSource.md +3 -2
- package/docs/Images.md +5 -3
- package/docs/Light.md +1 -1
- package/docs/LineLayer.md +2 -10
- package/docs/MapView.md +53 -37
- package/docs/MarkerView.md +4 -2
- package/docs/NativeUserLocation.md +2 -2
- package/docs/PointAnnotation.md +5 -8
- package/docs/RasterLayer.md +2 -10
- package/docs/RasterSource.md +3 -2
- package/docs/ShapeSource.md +12 -6
- package/docs/Style.md +1 -1
- package/docs/SymbolLayer.md +3 -10
- package/docs/UserLocation.md +8 -10
- package/docs/VectorSource.md +6 -5
- package/docs/coordinates.md +6 -0
- package/docs/docs.json +561 -1308
- package/docs/location.md +6 -0
- package/docs/snapshotManager.md +3 -3
- package/ios/RCTMGL/RCTMGLShapeSource.h +1 -0
- package/ios/RCTMGL/RCTMGLShapeSource.m +14 -0
- package/ios/RCTMGL/RCTMGLShapeSourceManager.m +1 -0
- package/ios/RCTMGL.xcodeproj/project.pbxproj +1 -0
- package/javascript/@types/assets.d.ts +4 -0
- package/javascript/MGLModule.ts +37 -0
- package/javascript/Maplibre.ts +65 -0
- package/javascript/components/AbstractLayer.tsx +107 -0
- package/javascript/components/AbstractSource.tsx +27 -0
- package/javascript/components/BackgroundLayer.tsx +43 -0
- package/javascript/components/{Callout.js → Callout.tsx} +67 -65
- package/javascript/components/{Camera.js → Camera.tsx} +266 -251
- package/javascript/components/CircleLayer.tsx +46 -0
- package/javascript/components/FillExtrusionLayer.tsx +47 -0
- package/javascript/components/FillLayer.tsx +41 -0
- package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +8 -8
- package/javascript/components/HeatmapLayer.tsx +44 -0
- package/javascript/components/ImageSource.tsx +78 -0
- package/javascript/components/Images.tsx +134 -0
- package/javascript/components/Light.tsx +67 -0
- package/javascript/components/LineLayer.tsx +42 -0
- package/javascript/components/{MapView.js → MapView.tsx} +365 -354
- package/javascript/components/MarkerView.tsx +104 -0
- package/javascript/components/{NativeBridgeComponent.js → NativeBridgeComponent.tsx} +44 -13
- package/javascript/components/NativeUserLocation.tsx +33 -0
- package/javascript/components/PointAnnotation.tsx +221 -0
- package/javascript/components/RasterLayer.tsx +41 -0
- package/javascript/components/RasterSource.tsx +117 -0
- package/javascript/components/ShapeSource.tsx +383 -0
- package/javascript/components/{Style.js → Style.tsx} +132 -38
- package/javascript/components/SymbolLayer.tsx +72 -0
- package/javascript/components/{UserLocation.js → UserLocation.tsx} +111 -110
- package/javascript/components/VectorSource.tsx +207 -0
- package/javascript/components/annotations/Annotation.tsx +134 -0
- package/javascript/index.ts +4 -0
- package/javascript/modules/location/{locationManager.js → locationManager.ts} +71 -10
- package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +20 -4
- package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +23 -7
- package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -24
- package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +43 -6
- package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +5 -5
- package/javascript/requestAndroidLocationPermissions.ts +29 -0
- package/javascript/types/BaseProps.ts +5 -0
- package/javascript/types/OnPressEvent.ts +13 -0
- package/javascript/types/index.ts +7 -0
- package/javascript/utils/BridgeValue.ts +90 -0
- package/javascript/utils/{Logger.js → Logger.ts} +37 -18
- package/javascript/utils/MaplibreStyles.d.ts +1486 -0
- package/javascript/utils/StyleValue.ts +49 -0
- package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +134 -0
- package/javascript/utils/animated/AnimatedCoordinatesArray.ts +112 -0
- package/javascript/utils/animated/{AnimatedExtractCoordinateFromArray.js → AnimatedExtractCoordinateFromArray.ts} +5 -5
- package/javascript/utils/animated/{AnimatedPoint.js → AnimatedPoint.ts} +20 -12
- package/javascript/utils/animated/{AnimatedRouteCoordinatesArray.js → AnimatedRouteCoordinatesArray.ts} +39 -14
- package/javascript/utils/animated/{AnimatedShape.js → AnimatedShape.ts} +31 -10
- package/javascript/utils/{deprecation.js → deprecation.ts} +9 -6
- package/javascript/utils/filterUtils.ts +9 -0
- package/javascript/utils/geoUtils.ts +79 -0
- package/javascript/utils/{index.js → index.ts} +44 -24
- package/javascript/utils/styleMap.ts +264 -0
- package/package.json +43 -34
- package/plugin/build/withMapLibre.js +3 -2
- package/scripts/autogenHelpers/globals.js +1 -1
- package/scripts/autogenerate.js +14 -6
- package/scripts/templates/MaplibreStyles.ts.ejs +99 -0
- package/scripts/templates/index.d.ts.ejs +71 -42
- package/scripts/templates/{styleMap.js.ejs → styleMap.ts.ejs} +3 -33
- package/setup-jest.js +3 -10
- package/tsconfig.json +20 -61
- package/index.d.ts +0 -954
- package/javascript/components/AbstractLayer.js +0 -75
- package/javascript/components/AbstractSource.js +0 -15
- package/javascript/components/BackgroundLayer.js +0 -97
- package/javascript/components/CircleLayer.js +0 -101
- package/javascript/components/FillExtrusionLayer.js +0 -98
- package/javascript/components/FillLayer.js +0 -94
- package/javascript/components/HeatmapLayer.js +0 -99
- package/javascript/components/ImageSource.js +0 -82
- package/javascript/components/Images.js +0 -119
- package/javascript/components/Light.js +0 -47
- package/javascript/components/LineLayer.js +0 -94
- package/javascript/components/MarkerView.js +0 -87
- package/javascript/components/NativeUserLocation.js +0 -41
- package/javascript/components/PointAnnotation.js +0 -216
- package/javascript/components/RasterLayer.js +0 -95
- package/javascript/components/RasterSource.js +0 -124
- package/javascript/components/ShapeSource.js +0 -357
- package/javascript/components/SymbolLayer.js +0 -120
- package/javascript/components/VectorSource.js +0 -200
- package/javascript/components/annotations/Annotation.js +0 -122
- package/javascript/index.js +0 -149
- package/javascript/utils/BridgeValue.js +0 -81
- package/javascript/utils/animated/AnimatedCoordinatesArray.js +0 -191
- package/javascript/utils/filterUtils.js +0 -7
- package/javascript/utils/geoUtils.js +0 -73
- package/javascript/utils/styleMap.js +0 -1932
- /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const {existsSync} = require(`fs`);
|
|
4
|
+
const {createRequire} = require(`module`);
|
|
5
|
+
const {resolve} = require(`path`);
|
|
6
|
+
|
|
7
|
+
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
|
+
|
|
9
|
+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
|
+
const absRequire = createRequire(absPnpApiPath);
|
|
11
|
+
|
|
12
|
+
const moduleWrapper = tsserver => {
|
|
13
|
+
if (!process.versions.pnp) {
|
|
14
|
+
return tsserver;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {isAbsolute} = require(`path`);
|
|
18
|
+
const pnpApi = require(`pnpapi`);
|
|
19
|
+
|
|
20
|
+
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
|
|
21
|
+
const isPortal = str => str.startsWith("portal:/");
|
|
22
|
+
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
|
|
23
|
+
|
|
24
|
+
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
|
|
25
|
+
return `${locator.name}@${locator.reference}`;
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
// VSCode sends the zip paths to TS using the "zip://" prefix, that TS
|
|
29
|
+
// doesn't understand. This layer makes sure to remove the protocol
|
|
30
|
+
// before forwarding it to TS, and to add it back on all returned paths.
|
|
31
|
+
|
|
32
|
+
function toEditorPath(str) {
|
|
33
|
+
// We add the `zip:` prefix to both `.zip/` paths and virtual paths
|
|
34
|
+
if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
|
|
35
|
+
// We also take the opportunity to turn virtual paths into physical ones;
|
|
36
|
+
// this makes it much easier to work with workspaces that list peer
|
|
37
|
+
// dependencies, since otherwise Ctrl+Click would bring us to the virtual
|
|
38
|
+
// file instances instead of the real ones.
|
|
39
|
+
//
|
|
40
|
+
// We only do this to modules owned by the the dependency tree roots.
|
|
41
|
+
// This avoids breaking the resolution when jumping inside a vendor
|
|
42
|
+
// with peer dep (otherwise jumping into react-dom would show resolution
|
|
43
|
+
// errors on react).
|
|
44
|
+
//
|
|
45
|
+
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
|
|
46
|
+
if (resolved) {
|
|
47
|
+
const locator = pnpApi.findPackageLocator(resolved);
|
|
48
|
+
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
|
|
49
|
+
str = resolved;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
str = normalize(str);
|
|
54
|
+
|
|
55
|
+
if (str.match(/\.zip\//)) {
|
|
56
|
+
switch (hostInfo) {
|
|
57
|
+
// Absolute VSCode `Uri.fsPath`s need to start with a slash.
|
|
58
|
+
// VSCode only adds it automatically for supported schemes,
|
|
59
|
+
// so we have to do it manually for the `zip` scheme.
|
|
60
|
+
// The path needs to start with a caret otherwise VSCode doesn't handle the protocol
|
|
61
|
+
//
|
|
62
|
+
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
|
|
63
|
+
//
|
|
64
|
+
// 2021-10-08: VSCode changed the format in 1.61.
|
|
65
|
+
// Before | ^zip:/c:/foo/bar.zip/package.json
|
|
66
|
+
// After | ^/zip//c:/foo/bar.zip/package.json
|
|
67
|
+
//
|
|
68
|
+
// 2022-04-06: VSCode changed the format in 1.66.
|
|
69
|
+
// Before | ^/zip//c:/foo/bar.zip/package.json
|
|
70
|
+
// After | ^/zip/c:/foo/bar.zip/package.json
|
|
71
|
+
//
|
|
72
|
+
// 2022-05-06: VSCode changed the format in 1.68
|
|
73
|
+
// Before | ^/zip/c:/foo/bar.zip/package.json
|
|
74
|
+
// After | ^/zip//c:/foo/bar.zip/package.json
|
|
75
|
+
//
|
|
76
|
+
case `vscode <1.61`: {
|
|
77
|
+
str = `^zip:${str}`;
|
|
78
|
+
} break;
|
|
79
|
+
|
|
80
|
+
case `vscode <1.66`: {
|
|
81
|
+
str = `^/zip/${str}`;
|
|
82
|
+
} break;
|
|
83
|
+
|
|
84
|
+
case `vscode <1.68`: {
|
|
85
|
+
str = `^/zip${str}`;
|
|
86
|
+
} break;
|
|
87
|
+
|
|
88
|
+
case `vscode`: {
|
|
89
|
+
str = `^/zip/${str}`;
|
|
90
|
+
} break;
|
|
91
|
+
|
|
92
|
+
// To make "go to definition" work,
|
|
93
|
+
// We have to resolve the actual file system path from virtual path
|
|
94
|
+
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
|
|
95
|
+
case `coc-nvim`: {
|
|
96
|
+
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
|
|
97
|
+
str = resolve(`zipfile:${str}`);
|
|
98
|
+
} break;
|
|
99
|
+
|
|
100
|
+
// Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
|
|
101
|
+
// We have to resolve the actual file system path from virtual path,
|
|
102
|
+
// everything else is up to neovim
|
|
103
|
+
case `neovim`: {
|
|
104
|
+
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
|
|
105
|
+
str = `zipfile://${str}`;
|
|
106
|
+
} break;
|
|
107
|
+
|
|
108
|
+
default: {
|
|
109
|
+
str = `zip:${str}`;
|
|
110
|
+
} break;
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return str;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function fromEditorPath(str) {
|
|
121
|
+
switch (hostInfo) {
|
|
122
|
+
case `coc-nvim`: {
|
|
123
|
+
str = str.replace(/\.zip::/, `.zip/`);
|
|
124
|
+
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
|
|
125
|
+
// So in order to convert it back, we use .* to match all the thing
|
|
126
|
+
// before `zipfile:`
|
|
127
|
+
return process.platform === `win32`
|
|
128
|
+
? str.replace(/^.*zipfile:\//, ``)
|
|
129
|
+
: str.replace(/^.*zipfile:/, ``);
|
|
130
|
+
} break;
|
|
131
|
+
|
|
132
|
+
case `neovim`: {
|
|
133
|
+
str = str.replace(/\.zip::/, `.zip/`);
|
|
134
|
+
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
|
|
135
|
+
return str.replace(/^zipfile:\/\//, ``);
|
|
136
|
+
} break;
|
|
137
|
+
|
|
138
|
+
case `vscode`:
|
|
139
|
+
default: {
|
|
140
|
+
return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`)
|
|
141
|
+
} break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Force enable 'allowLocalPluginLoads'
|
|
146
|
+
// TypeScript tries to resolve plugins using a path relative to itself
|
|
147
|
+
// which doesn't work when using the global cache
|
|
148
|
+
// https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
|
|
149
|
+
// VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
|
|
150
|
+
// TypeScript already does local loads and if this code is running the user trusts the workspace
|
|
151
|
+
// https://github.com/microsoft/vscode/issues/45856
|
|
152
|
+
const ConfiguredProject = tsserver.server.ConfiguredProject;
|
|
153
|
+
const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
|
|
154
|
+
ConfiguredProject.prototype.enablePluginsWithOptions = function() {
|
|
155
|
+
this.projectService.allowLocalPluginLoads = true;
|
|
156
|
+
return originalEnablePluginsWithOptions.apply(this, arguments);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// And here is the point where we hijack the VSCode <-> TS communications
|
|
160
|
+
// by adding ourselves in the middle. We locate everything that looks
|
|
161
|
+
// like an absolute path of ours and normalize it.
|
|
162
|
+
|
|
163
|
+
const Session = tsserver.server.Session;
|
|
164
|
+
const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
|
|
165
|
+
let hostInfo = `unknown`;
|
|
166
|
+
|
|
167
|
+
Object.assign(Session.prototype, {
|
|
168
|
+
onMessage(/** @type {string | object} */ message) {
|
|
169
|
+
const isStringMessage = typeof message === 'string';
|
|
170
|
+
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
|
|
171
|
+
|
|
172
|
+
if (
|
|
173
|
+
parsedMessage != null &&
|
|
174
|
+
typeof parsedMessage === `object` &&
|
|
175
|
+
parsedMessage.arguments &&
|
|
176
|
+
typeof parsedMessage.arguments.hostInfo === `string`
|
|
177
|
+
) {
|
|
178
|
+
hostInfo = parsedMessage.arguments.hostInfo;
|
|
179
|
+
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
|
|
180
|
+
const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(
|
|
181
|
+
// The RegExp from https://semver.org/ but without the caret at the start
|
|
182
|
+
/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
|
183
|
+
) ?? []).map(Number)
|
|
184
|
+
|
|
185
|
+
if (major === 1) {
|
|
186
|
+
if (minor < 61) {
|
|
187
|
+
hostInfo += ` <1.61`;
|
|
188
|
+
} else if (minor < 66) {
|
|
189
|
+
hostInfo += ` <1.66`;
|
|
190
|
+
} else if (minor < 68) {
|
|
191
|
+
hostInfo += ` <1.68`;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
|
|
198
|
+
return typeof value === 'string' ? fromEditorPath(value) : value;
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
return originalOnMessage.call(
|
|
202
|
+
this,
|
|
203
|
+
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
|
|
204
|
+
);
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
send(/** @type {any} */ msg) {
|
|
208
|
+
return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
|
|
209
|
+
return typeof value === `string` ? toEditorPath(value) : value;
|
|
210
|
+
})));
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
return tsserver;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
if (existsSync(absPnpApiPath)) {
|
|
218
|
+
if (!process.versions.pnp) {
|
|
219
|
+
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
|
|
220
|
+
require(absPnpApiPath).setup();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Defer to the real typescript/lib/tsserverlibrary.js your application uses
|
|
225
|
+
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const {existsSync} = require(`fs`);
|
|
4
|
+
const {createRequire} = require(`module`);
|
|
5
|
+
const {resolve} = require(`path`);
|
|
6
|
+
|
|
7
|
+
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
|
+
|
|
9
|
+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
|
+
const absRequire = createRequire(absPnpApiPath);
|
|
11
|
+
|
|
12
|
+
if (existsSync(absPnpApiPath)) {
|
|
13
|
+
if (!process.versions.pnp) {
|
|
14
|
+
// Setup the environment to be able to require typescript/lib/typescript.js
|
|
15
|
+
require(absPnpApiPath).setup();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Defer to the real typescript/lib/typescript.js your application uses
|
|
20
|
+
module.exports = absRequire(`typescript/lib/typescript.js`);
|
package/CHANGELOG.md
CHANGED
|
@@ -5,9 +5,23 @@ Please add unreleased changes in the following style:
|
|
|
5
5
|
PR Title ([#123](link to my pr))
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 10.0.0-alpha.1
|
|
9
9
|
|
|
10
|
+
fix: plugin for debug simulator ([#164](https://github.com/maplibre/maplibre-react-native/pull/164)
|
|
11
|
+
|
|
12
|
+
## 10.0-alpha.0
|
|
13
|
+
|
|
14
|
+
chore: update detox ([#207](https://github.com/maplibre/maplibre-react-native/pull/207))
|
|
15
|
+
chore: update expo-config and expo-scripts ([#47](https://github.com/maplibre/maplibre-react-native/pull/104) and [#69](https://github.com/maplibre/maplibre-react-native/pull/69))
|
|
16
|
+
chore: update prettier and eslint-plugin-prettier ([#111](https://github.com/maplibre/maplibre-react-native/pull/111))
|
|
17
|
+
feat: **breaking** migrate repo to typescript ([#55](https://github.com/maplibre/maplibre-react-native/pull/55))
|
|
18
|
+
|
|
19
|
+
## 9.1.0
|
|
20
|
+
|
|
21
|
+
Update react to 18.2.0 and react-native to 0.72.1. ([#49](https://github.com/maplibre/maplibre-react-native/pull/49))
|
|
22
|
+
fix(markerview): make PointAnnotationProps component extend ViewProps ([#41](https://github.com/maplibre/maplibre-react-native/issues/41))
|
|
10
23
|
Fix build issue on iOS ([#29](https://github.com/maplibre/maplibre-react-native/issues/29))
|
|
24
|
+
Add clusterProperties to ShapeSource ([#46](https://github.com/maplibre/maplibre-react-native/pull/46))
|
|
11
25
|
|
|
12
26
|
## 9.0.0
|
|
13
27
|
|
package/android/build.gradle
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
buildscript {
|
|
4
4
|
ext {
|
|
5
|
-
buildToolsVersion = "
|
|
5
|
+
buildToolsVersion = "33.0.0"
|
|
6
6
|
minSdkVersion = 16
|
|
7
7
|
compileSdkVersion = 33
|
|
8
8
|
targetSdkVersion = 33
|
|
@@ -13,7 +13,7 @@ buildscript {
|
|
|
13
13
|
jcenter()
|
|
14
14
|
}
|
|
15
15
|
dependencies {
|
|
16
|
-
classpath 'com.android.tools.build:gradle
|
|
16
|
+
classpath 'com.android.tools.build:gradle'
|
|
17
17
|
|
|
18
18
|
// NOTE: Do not place your application dependencies here; they belong
|
|
19
19
|
// in the individual module build.gradle files
|
|
@@ -29,10 +29,8 @@ android {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
dependencies {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// React Native
|
|
35
|
-
implementation "com.facebook.react:react-native:+"
|
|
32
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
33
|
+
implementation("com.facebook.react:react-android")
|
|
36
34
|
|
|
37
35
|
// MapLibre SDK
|
|
38
36
|
implementation "org.maplibre.gl:android-sdk:9.6.0"
|
|
@@ -22,6 +22,7 @@ import com.mapbox.rctmgl.R;
|
|
|
22
22
|
import com.mapbox.rctmgl.components.mapview.RCTMGLMapView;
|
|
23
23
|
import com.mapbox.rctmgl.events.AndroidCallbackEvent;
|
|
24
24
|
import com.mapbox.rctmgl.events.FeatureClickEvent;
|
|
25
|
+
import com.mapbox.rctmgl.utils.ClusterPropertyEntry;
|
|
25
26
|
import com.mapbox.rctmgl.utils.DownloadMapImageTask;
|
|
26
27
|
import com.mapbox.rctmgl.utils.ImageEntry;
|
|
27
28
|
|
|
@@ -44,6 +45,7 @@ public class RCTMGLShapeSource extends RCTSource<GeoJsonSource> {
|
|
|
44
45
|
private Boolean mCluster;
|
|
45
46
|
private Integer mClusterRadius;
|
|
46
47
|
private Integer mClusterMaxZoom;
|
|
48
|
+
private List<Map.Entry<String, ClusterPropertyEntry>> mClusterProperties;
|
|
47
49
|
|
|
48
50
|
private Integer mMaxZoom;
|
|
49
51
|
private Integer mBuffer;
|
|
@@ -110,6 +112,10 @@ public class RCTMGLShapeSource extends RCTSource<GeoJsonSource> {
|
|
|
110
112
|
mClusterMaxZoom = clusterMaxZoom;
|
|
111
113
|
}
|
|
112
114
|
|
|
115
|
+
public void setClusterProperties(List<Map.Entry<String, ClusterPropertyEntry>> clusterProperties) {
|
|
116
|
+
mClusterProperties = clusterProperties;
|
|
117
|
+
}
|
|
118
|
+
|
|
113
119
|
public void setMaxZoom(int maxZoom) {
|
|
114
120
|
mMaxZoom = maxZoom;
|
|
115
121
|
}
|
|
@@ -145,6 +151,14 @@ public class RCTMGLShapeSource extends RCTSource<GeoJsonSource> {
|
|
|
145
151
|
options.withClusterMaxZoom(mClusterMaxZoom);
|
|
146
152
|
}
|
|
147
153
|
|
|
154
|
+
if (mClusterProperties != null) {
|
|
155
|
+
for (Map.Entry<String, ClusterPropertyEntry> entry : mClusterProperties) {
|
|
156
|
+
ClusterPropertyEntry property = entry.getValue();
|
|
157
|
+
|
|
158
|
+
options.withClusterProperty(entry.getKey(), property.operator, property.mapping);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
148
162
|
if (mMaxZoom != null) {
|
|
149
163
|
options.withMaxZoom(mMaxZoom);
|
|
150
164
|
}
|
|
@@ -18,11 +18,13 @@ import com.facebook.react.common.MapBuilder;
|
|
|
18
18
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
19
19
|
import com.facebook.react.uimanager.ViewGroupManager;
|
|
20
20
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
21
|
+
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
|
21
22
|
import com.mapbox.rctmgl.components.AbstractEventEmitter;
|
|
22
23
|
import com.mapbox.rctmgl.components.annotation.RCTMGLCallout;
|
|
23
24
|
import com.mapbox.rctmgl.components.mapview.RCTMGLMapView;
|
|
24
25
|
import com.mapbox.rctmgl.components.styles.layers.RCTLayer;
|
|
25
26
|
import com.mapbox.rctmgl.events.constants.EventKeys;
|
|
27
|
+
import com.mapbox.rctmgl.utils.ClusterPropertyEntry;
|
|
26
28
|
import com.mapbox.rctmgl.utils.ExpressionParser;
|
|
27
29
|
import com.mapbox.rctmgl.utils.ImageEntry;
|
|
28
30
|
import com.mapbox.rctmgl.utils.ResourceUtils;
|
|
@@ -113,6 +115,30 @@ public class RCTMGLShapeSourceManager extends AbstractEventEmitter<RCTMGLShapeSo
|
|
|
113
115
|
source.setClusterMaxZoom(clusterMaxZoom);
|
|
114
116
|
}
|
|
115
117
|
|
|
118
|
+
@ReactProp(name = "clusterProperties")
|
|
119
|
+
public void setClusterProperties(RCTMGLShapeSource source, ReadableMap map) {
|
|
120
|
+
List<Map.Entry<String, ClusterPropertyEntry>> properties = new ArrayList<>();
|
|
121
|
+
|
|
122
|
+
ReadableMapKeySetIterator iterator = map.keySetIterator();
|
|
123
|
+
while (iterator.hasNextKey()) {
|
|
124
|
+
String name = iterator.nextKey();
|
|
125
|
+
ReadableArray expressions = map.getArray(name);
|
|
126
|
+
|
|
127
|
+
Expression operator;
|
|
128
|
+
if (expressions.getType(0) == ReadableType.Array) {
|
|
129
|
+
operator = ExpressionParser.from(expressions.getArray(0));
|
|
130
|
+
} else {
|
|
131
|
+
operator = Expression.literal(expressions.getString(0));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Expression mapping = ExpressionParser.from(expressions.getArray(1));
|
|
135
|
+
|
|
136
|
+
properties.add(new AbstractMap.SimpleEntry<>(name, new ClusterPropertyEntry(operator, mapping)));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
source.setClusterProperties(properties);
|
|
140
|
+
}
|
|
141
|
+
|
|
116
142
|
@ReactProp(name = "maxZoomLevel")
|
|
117
143
|
public void setMaxZoomLevel(RCTMGLShapeSource source, int maxZoom) {
|
|
118
144
|
source.setMaxZoom(maxZoom);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
package com.mapbox.rctmgl.utils;
|
|
2
|
+
|
|
3
|
+
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
|
4
|
+
|
|
5
|
+
public class ClusterPropertyEntry {
|
|
6
|
+
public Expression operator;
|
|
7
|
+
public Expression mapping;
|
|
8
|
+
|
|
9
|
+
public ClusterPropertyEntry(Expression _operator, Expression _mapping) {
|
|
10
|
+
operator = _operator;
|
|
11
|
+
mapping = _mapping;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/docs/Annotation.md
CHANGED
|
@@ -6,24 +6,23 @@
|
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| id | `string` | `none` | `true` | FIX ME NO DESCRIPTION |
|
|
9
|
-
| animated | `
|
|
9
|
+
| animated | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
|
|
10
10
|
| animationDuration | `number` | `1000` | `false` | FIX ME NO DESCRIPTION |
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| icon | `union` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
11
|
+
| coordinates | `Array` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
12
|
+
| children | `ReactElement \| ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
13
|
+
| style | `object` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
14
|
+
| icon | `string \| number \| object` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
15
|
+
| animationEasingFunction | `FIX ME UNKNOWN TYPE` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |
|
|
17
16
|
|
|
18
17
|
### methods
|
|
19
|
-
#### onPress()
|
|
18
|
+
#### onPress(event)
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
##### arguments
|
|
24
23
|
| Name | Type | Required | Description |
|
|
25
24
|
| ---- | :--: | :------: | :----------: |
|
|
26
|
-
|
|
25
|
+
| `event` | `OnPressEvent` | `Yes` | undefined |
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
#### symbolStyle()
|
package/docs/BackgroundLayer.md
CHANGED
|
@@ -5,16 +5,8 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
|
|
|
9
|
-
| sourceID | `
|
|
10
|
-
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
|
|
11
|
-
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
|
-
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
13
|
-
| layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
|
|
14
|
-
| filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
|
|
15
|
-
| minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
|
|
16
|
-
| maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
|
|
17
|
-
| style | `union` | `none` | `false` | Customizable style attributes |
|
|
8
|
+
| style | `BackgroundLayerStyleProps` | `none` | `false` | Customizable style attributes |
|
|
9
|
+
| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
|
|
18
10
|
|
|
19
11
|
|
|
20
12
|
### styles
|
package/docs/Callout.md
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| title | `string` | `none` | `false` | String that get's displayed in the default callout. |
|
|
9
|
-
| style | `
|
|
10
|
-
| containerStyle | `
|
|
11
|
-
| contentStyle | `
|
|
12
|
-
| tipStyle | `
|
|
13
|
-
| textStyle | `
|
|
9
|
+
| style | `ViewStyle` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this |
|
|
10
|
+
| containerStyle | `ViewStyle` | `none` | `false` | Style property for the native RCTMGLCallout container, set at your own risk. |
|
|
11
|
+
| contentStyle | `ViewStyle` | `none` | `false` | Style property for the content bubble. |
|
|
12
|
+
| tipStyle | `ViewStyle` | `none` | `false` | Style property for the triangle tip under the content. |
|
|
13
|
+
| textStyle | `ViewStyle` | `none` | `false` | Style property for the title in the content bubble. |
|
|
14
14
|
|
|
15
15
|
|
package/docs/Camera.md
CHANGED
|
@@ -5,55 +5,26 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
| heading | `number` | `none` | `false` | Heading on map |
|
|
19
|
-
| pitch | `number` | `none` | `false` | Pitch on map |
|
|
20
|
-
| bounds | `shape` | `none` | `false` | Represents a rectangle in geographical coordinates marking the visible area of the map.<br/>The `bounds.padding*` properties are deprecated; use root `padding` property instead. |
|
|
21
|
-
| ne | `array` | `none` | `true` | North east coordinate of bound |
|
|
22
|
-
| sw | `array` | `none` | `true` | South west coordinate of bound |
|
|
23
|
-
| paddingLeft | `number` | `none` | `false` | Left padding in points (deprecated; use root `padding` property instead) |
|
|
24
|
-
| paddingRight | `number` | `none` | `false` | Right padding in points (deprecated; use root `padding` property instead) |
|
|
25
|
-
| paddingTop | `number` | `none` | `false` | Top padding in points (deprecated; use root `padding` property instead) |
|
|
26
|
-
| paddingBottom | `number` | `none` | `false` | Bottom padding in points (deprecated; use root `padding` property instead) |
|
|
27
|
-
| onUserTrackingModeChange | `func` | `none` | `false` | Callback that is triggered on user tracking mode changes |
|
|
28
|
-
| zoomLevel | `number` | `none` | `false` | Zoom level of the map |
|
|
29
|
-
| centerCoordinate | `array` | `none` | `false` | Center coordinate on map [lng, lat] |
|
|
30
|
-
| padding | `shape` | `none` | `false` | Padding around edges of map in points |
|
|
31
|
-
| paddingLeft | `number` | `none` | `false` | Left padding in points |
|
|
32
|
-
| paddingRight | `number` | `none` | `false` | Right padding in points |
|
|
33
|
-
| paddingTop | `number` | `none` | `false` | Top padding in points |
|
|
34
|
-
| paddingBottom | `number` | `none` | `false` | Bottom padding in points |
|
|
35
|
-
| heading | `number` | `none` | `false` | Heading on map |
|
|
36
|
-
| pitch | `number` | `none` | `false` | Pitch on map |
|
|
37
|
-
| bounds | `shape` | `none` | `false` | Represents a rectangle in geographical coordinates marking the visible area of the map.<br/>The `bounds.padding*` properties are deprecated; use root `padding` property instead. |
|
|
38
|
-
| ne | `array` | `none` | `true` | North east coordinate of bound |
|
|
39
|
-
| sw | `array` | `none` | `true` | South west coordinate of bound |
|
|
40
|
-
| paddingLeft | `number` | `none` | `false` | Left padding in points (deprecated; use root `padding` property instead) |
|
|
41
|
-
| paddingRight | `number` | `none` | `false` | Right padding in points (deprecated; use root `padding` property instead) |
|
|
42
|
-
| paddingTop | `number` | `none` | `false` | Top padding in points (deprecated; use root `padding` property instead) |
|
|
43
|
-
| paddingBottom | `number` | `none` | `false` | Bottom padding in points (deprecated; use root `padding` property instead) |
|
|
44
|
-
| onUserTrackingModeChange | `func` | `none` | `false` | Callback that is triggered on user tracking mode changes |
|
|
45
|
-
| zoomLevel | `number` | `none` | `false` | Zoom level of the map |
|
|
8
|
+
| centerCoordinate | `GeoJSON.Position` | `none` | `false` | The location on which the map should center. |
|
|
9
|
+
| bounds | `CameraBoundsWithPadding` | `none` | `false` | The corners of a box around which the map should bound. Contains padding props for backwards<br/>compatibility; the root `padding` prop should be used instead. |
|
|
10
|
+
| heading | `number` | `none` | `false` | The heading (orientation) of the map. |
|
|
11
|
+
| pitch | `number` | `none` | `false` | The pitch of the map. |
|
|
12
|
+
| zoomLevel | `number` | `none` | `false` | The zoom level of the map. |
|
|
13
|
+
| padding | `CameraPadding` | `none` | `false` | The viewport padding in points. |
|
|
14
|
+
| animationDuration | `number` | `2000` | `false` | The duration the map takes to animate to a new configuration. |
|
|
15
|
+
| animationMode | `'flyTo' \| 'easeTo' \| 'linearTo' \| 'moveTo'` | `'easeTo'` | `false` | The easing or path the camera uses to animate to a new configuration. |
|
|
16
|
+
| allowUpdates | `boolean` | `true` | `false` | If false, the camera will not send any props to the native module. Intended to be used to prevent unnecessary tile fetching and improve performance when the map is not visible. Defaults to true. |
|
|
17
|
+
| defaultSettings | `CameraStop` | `none` | `false` | Default view settings applied on camera |
|
|
46
18
|
| minZoomLevel | `number` | `none` | `false` | The minimun zoom level of the map |
|
|
47
19
|
| maxZoomLevel | `number` | `none` | `false` | The maximun zoom level of the map |
|
|
48
|
-
| maxBounds | `
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| followUserLocation | `bool` | `none` | `false` | Should the map orientation follow the user's. |
|
|
52
|
-
| followUserMode | `enum` | `none` | `false` | The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](../example/src/examples/Camera/SetUserTrackingModes.js) |
|
|
20
|
+
| maxBounds | `CameraBounds` | `none` | `false` | Restrict map panning so that the center is within these bounds |
|
|
21
|
+
| followUserLocation | `boolean` | `none` | `false` | Should the map orientation follow the user's. |
|
|
22
|
+
| followUserMode | `UserTrackingMode` | `none` | `false` | The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `MapLibreGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](../example/src/examples/Camera/SetUserTrackingModes.js) |
|
|
53
23
|
| followZoomLevel | `number` | `none` | `false` | The zoomLevel on map while followUserLocation is set to `true` |
|
|
54
24
|
| followPitch | `number` | `none` | `false` | The pitch on map while followUserLocation is set to `true` |
|
|
55
25
|
| followHeading | `number` | `none` | `false` | The heading on map while followUserLocation is set to `true` |
|
|
56
|
-
| triggerKey | `
|
|
26
|
+
| triggerKey | `string \| number` | `none` | `false` | Manually update the camera - helpful for when props did not update, however you still want the camera to move |
|
|
27
|
+
| onUserTrackingModeChange | `func` | `none` | `false` | FIX ME NO DESCRIPTION<br/>*signature:*`(event:MaplibreGLEvent) => void` |
|
|
57
28
|
|
|
58
29
|
### methods
|
|
59
30
|
#### fitBounds(northEastCoordinates, southWestCoordinates[, padding][, animationDuration])
|
|
@@ -85,7 +56,7 @@ Map camera will fly to new coordinate
|
|
|
85
56
|
##### arguments
|
|
86
57
|
| Name | Type | Required | Description |
|
|
87
58
|
| ---- | :--: | :------: | :----------: |
|
|
88
|
-
| `coordinates` | `
|
|
59
|
+
| `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will jump too |
|
|
89
60
|
| `animationDuration` | `Number` | `No` | Duration of camera animation |
|
|
90
61
|
|
|
91
62
|
|
|
@@ -103,7 +74,7 @@ Map camera will move to new coordinate at the same zoom level
|
|
|
103
74
|
##### arguments
|
|
104
75
|
| Name | Type | Required | Description |
|
|
105
76
|
| ---- | :--: | :------: | :----------: |
|
|
106
|
-
| `coordinates` | `
|
|
77
|
+
| `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will move too |
|
|
107
78
|
| `animationDuration` | `Number` | `No` | Duration of camera animation |
|
|
108
79
|
|
|
109
80
|
|
|
@@ -121,7 +92,7 @@ Map camera will zoom to specified level
|
|
|
121
92
|
##### arguments
|
|
122
93
|
| Name | Type | Required | Description |
|
|
123
94
|
| ---- | :--: | :------: | :----------: |
|
|
124
|
-
| `zoomLevel` | `
|
|
95
|
+
| `zoomLevel` | `number` | `Yes` | Zoom level that the map camera will animate too |
|
|
125
96
|
| `animationDuration` | `Number` | `No` | Duration of camera animation |
|
|
126
97
|
|
|
127
98
|
|
package/docs/CircleLayer.md
CHANGED
|
@@ -5,16 +5,8 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
|
|
|
9
|
-
| sourceID | `
|
|
10
|
-
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property<br/>from which the receiver obtains the data to style. |
|
|
11
|
-
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
|
-
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
13
|
-
| layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
|
|
14
|
-
| filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
|
|
15
|
-
| minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
|
|
16
|
-
| maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
|
|
17
|
-
| style | `union` | `none` | `false` | Customizable style attributes |
|
|
8
|
+
| style | `CircleLayerStyleProps` | `none` | `false` | Customizable style attributes |
|
|
9
|
+
| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
|
|
18
10
|
|
|
19
11
|
|
|
20
12
|
### styles
|
|
@@ -5,16 +5,8 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
|
|
|
9
|
-
| sourceID | `
|
|
10
|
-
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |
|
|
11
|
-
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
|
|
12
|
-
| belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
|
|
13
|
-
| layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
|
|
14
|
-
| filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
|
|
15
|
-
| minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
|
|
16
|
-
| maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
|
|
17
|
-
| style | `union` | `none` | `false` | Customizable style attributes |
|
|
8
|
+
| style | `FillExtrusionLayerStyleProps` | `none` | `false` | Customizable style attributes |
|
|
9
|
+
| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
|
|
18
10
|
|
|
19
11
|
|
|
20
12
|
### styles
|