@maplibre/maplibre-react-native 10.0.0-alpha.5 → 10.0.0-alpha.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/.eslintrc.js +3 -1
- package/.yarn/sdks/eslint/bin/eslint.js +8 -1
- package/.yarn/sdks/eslint/lib/api.js +8 -1
- package/.yarn/sdks/eslint/lib/unsupported-api.js +8 -1
- package/.yarn/sdks/prettier/bin/prettier.cjs +8 -1
- package/.yarn/sdks/prettier/index.cjs +8 -1
- package/.yarn/sdks/typescript/bin/tsc +8 -1
- package/.yarn/sdks/typescript/bin/tsserver +8 -1
- package/.yarn/sdks/typescript/lib/tsc.js +8 -1
- package/.yarn/sdks/typescript/lib/tsserver.js +20 -6
- package/.yarn/sdks/typescript/lib/tsserverlibrary.js +20 -6
- package/.yarn/sdks/typescript/lib/typescript.js +8 -1
- package/CHANGELOG.md +57 -48
- package/CONTRIBUTING.md +10 -9
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java +5 -3
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java +7 -7
- package/docs/Camera.md +3 -3
- package/docs/MapView.md +9 -33
- package/docs/UserLocation.md +10 -2
- package/docs/docs.json +17 -32
- package/docs/offlineManager.md +246 -0
- package/javascript/Maplibre.ts +5 -1
- package/javascript/components/BackgroundLayer.tsx +27 -20
- package/javascript/components/Callout.tsx +40 -40
- package/javascript/components/Camera.tsx +421 -478
- package/javascript/components/CircleLayer.tsx +29 -22
- package/javascript/components/FillExtrusionLayer.tsx +23 -23
- package/javascript/components/FillLayer.tsx +22 -19
- package/javascript/components/HeatmapLayer.tsx +21 -19
- package/javascript/components/ImageSource.tsx +25 -32
- package/javascript/components/Images.tsx +36 -35
- package/javascript/components/Light.tsx +20 -47
- package/javascript/components/LineLayer.tsx +23 -20
- package/javascript/components/MapView.tsx +604 -554
- package/javascript/components/MarkerView.tsx +23 -38
- package/javascript/components/NativeUserLocation.tsx +3 -5
- package/javascript/components/PointAnnotation.tsx +111 -87
- package/javascript/components/RasterLayer.tsx +21 -18
- package/javascript/components/RasterSource.tsx +39 -42
- package/javascript/components/ShapeSource.tsx +287 -239
- package/javascript/components/Style.tsx +1 -1
- package/javascript/components/SymbolLayer.tsx +34 -28
- package/javascript/components/UserLocation.tsx +164 -151
- package/javascript/components/VectorSource.tsx +128 -117
- package/javascript/components/annotations/Annotation.tsx +105 -79
- package/javascript/{components/AbstractLayer.tsx → hooks/useAbstractLayer.ts} +54 -37
- package/javascript/hooks/useAbstractSource.ts +34 -0
- package/javascript/hooks/useNativeBridge.ts +125 -0
- package/javascript/hooks/useNativeRef.ts +13 -0
- package/javascript/hooks/useOnce.ts +12 -0
- package/javascript/utils/Logger.ts +3 -3
- package/package.json +2 -1
- package/javascript/components/AbstractSource.tsx +0 -27
- package/javascript/components/NativeBridgeComponent.tsx +0 -117
package/.eslintrc.js
CHANGED
|
@@ -159,8 +159,10 @@ module.exports = {
|
|
|
159
159
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
160
160
|
'no-unused-vars': 'off',
|
|
161
161
|
'no-use-before-define': 'off',
|
|
162
|
-
'@typescript-eslint/no-use-before-define':
|
|
162
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
163
163
|
'react/prop-types': 'off',
|
|
164
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
165
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
164
166
|
},
|
|
165
167
|
},
|
|
166
168
|
],
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require eslint/bin/eslint.js
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require eslint
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require eslint/use-at-your-own-risk
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require prettier/bin/prettier.cjs
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require prettier
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require typescript/bin/tsc
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require typescript/bin/tsserver
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require typescript/lib/tsc.js
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
16
|
+
if (existsSync(absPnpApiPath)) {
|
|
17
|
+
if (!process.versions.pnp) {
|
|
18
|
+
// Setup the environment to be able to require typescript/lib/tsserver.js
|
|
19
|
+
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
const moduleWrapper = tsserver => {
|
|
13
27
|
if (!process.versions.pnp) {
|
|
14
28
|
return tsserver;
|
|
@@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
|
|
|
214
228
|
return tsserver;
|
|
215
229
|
};
|
|
216
230
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
231
|
+
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
|
|
232
|
+
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
|
|
233
|
+
// Ref https://github.com/microsoft/TypeScript/pull/55326
|
|
234
|
+
if (major > 5 || (major === 5 && minor >= 5)) {
|
|
235
|
+
moduleWrapper(absRequire(`typescript`));
|
|
222
236
|
}
|
|
223
237
|
|
|
224
238
|
// Defer to the real typescript/lib/tsserver.js your application uses
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
16
|
+
if (existsSync(absPnpApiPath)) {
|
|
17
|
+
if (!process.versions.pnp) {
|
|
18
|
+
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
|
|
19
|
+
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
const moduleWrapper = tsserver => {
|
|
13
27
|
if (!process.versions.pnp) {
|
|
14
28
|
return tsserver;
|
|
@@ -214,11 +228,11 @@ const moduleWrapper = tsserver => {
|
|
|
214
228
|
return tsserver;
|
|
215
229
|
};
|
|
216
230
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
231
|
+
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
|
|
232
|
+
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
|
|
233
|
+
// Ref https://github.com/microsoft/TypeScript/pull/55326
|
|
234
|
+
if (major > 5 || (major === 5 && minor >= 5)) {
|
|
235
|
+
moduleWrapper(absRequire(`typescript`));
|
|
222
236
|
}
|
|
223
237
|
|
|
224
238
|
// Defer to the real typescript/lib/tsserverlibrary.js your application uses
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const {existsSync} = require(`fs`);
|
|
4
|
-
const {createRequire} = require(`module`);
|
|
4
|
+
const {createRequire, register} = require(`module`);
|
|
5
5
|
const {resolve} = require(`path`);
|
|
6
|
+
const {pathToFileURL} = require(`url`);
|
|
6
7
|
|
|
7
8
|
const relPnpApiPath = "../../../../.pnp.cjs";
|
|
8
9
|
|
|
9
10
|
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
|
10
11
|
const absRequire = createRequire(absPnpApiPath);
|
|
11
12
|
|
|
13
|
+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
|
14
|
+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
|
15
|
+
|
|
12
16
|
if (existsSync(absPnpApiPath)) {
|
|
13
17
|
if (!process.versions.pnp) {
|
|
14
18
|
// Setup the environment to be able to require typescript
|
|
15
19
|
require(absPnpApiPath).setup();
|
|
20
|
+
if (isPnpLoaderEnabled && register) {
|
|
21
|
+
register(pathToFileURL(absPnpLoaderPath));
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
25
|
|
package/CHANGELOG.md
CHANGED
|
@@ -5,12 +5,21 @@ Please add unreleased changes in the following style:
|
|
|
5
5
|
PR Title ([#123](link to my pr))
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
+
## 10.0.0-alpha.7
|
|
9
|
+
|
|
10
|
+
feat: [Migrate MapView to react function component (#408)](https://github.com/maplibre/maplibre-react-native/pull/408)
|
|
11
|
+
|
|
12
|
+
## 10.0.0-alpha.6
|
|
13
|
+
fix: [cameraRef?.current?.setCamera causing markerpoint get detached from maps-base](https://github.com/maplibre/maplibre-react-native/issues/409)
|
|
14
|
+
fix: round compass margins and attribution position to nearest integers [android] ([#294](https://github.com/maplibre/maplibre-react-native/pull/294))
|
|
15
|
+
|
|
8
16
|
## 10.0.0-alpha.5
|
|
9
17
|
Fix: [remove AbortController test mock](https://github.com/maplibre/maplibre-react-native/pull/403)
|
|
10
18
|
Fix: [ExpoPlugin after Class renaming](thttps://github.com/maplibre/maplibre-react-native/pull/405)
|
|
11
19
|
Fix: [android example crashing](https://github.com/maplibre/maplibre-react-native/pull/372) on launch
|
|
12
20
|
|
|
13
21
|
## 10.0.0-alpha.4
|
|
22
|
+
|
|
14
23
|
Update maplibre-native to use [new metal renderer on iOS](https://github.com/maplibre/maplibre-native/releases/tag/ios-v6.4.0)
|
|
15
24
|
|
|
16
25
|
## 10.0.0-alpha.3
|
|
@@ -62,54 +71,54 @@ fix(iOS): correct import of UIView+React.h header ([#1672](https://github.com/rn
|
|
|
62
71
|
|
|
63
72
|
## 8.5.0
|
|
64
73
|
|
|
65
|
-
build: update install guide and `/example` project for android dependencies ([#1640](https://github.com/rnmapbox/maps/pull/1640))
|
|
66
|
-
build(turf): update to version 6.5.0 ([#1638](https://github.com/rnmapbox/maps/pull/1638))
|
|
67
|
-
fix(Camera) fix `zoomTo` method and expand Fit example ([#1631](https://github.com/rnmapbox/maps/pull/1631))
|
|
68
|
-
ci: two scripts for linting with and without fix ([#1630](https://github.com/rnmapbox/maps/pull/1630))
|
|
69
|
-
feat(Camera) add an optional `allowUpdates` boolean prop ([#1619](https://github.com/rnmapbox/maps/pull/1619))
|
|
70
|
-
refactor(example): remove unused modules and scripts ([#1618](https://github.com/rnmapbox/maps/pull/1618))
|
|
71
|
-
fix(react-native): update api to get rid of EventEmitter warnings ([#1615](https://github.com/rnmapbox/maps/pull/1615))
|
|
72
|
-
fix(Camera) persist zoom when changing from `bounds` to `centerCoordinate`, fix zero padding not causing map to update, create unified example showcasing bounds/centerCoordinate/zoom/padding ([#1614](https://github.com/rnmapbox/maps/pull/1614))
|
|
73
|
-
Update MapLibre to 5.12.1 on iOS ([#1596](https://github.com/rnmapbox/maps/pull/1596))
|
|
74
|
+
build: update install guide and `/example` project for android dependencies ([#1640](https://github.com/rnmapbox/maps/pull/1640))
|
|
75
|
+
build(turf): update to version 6.5.0 ([#1638](https://github.com/rnmapbox/maps/pull/1638))
|
|
76
|
+
fix(Camera) fix `zoomTo` method and expand Fit example ([#1631](https://github.com/rnmapbox/maps/pull/1631))
|
|
77
|
+
ci: two scripts for linting with and without fix ([#1630](https://github.com/rnmapbox/maps/pull/1630))
|
|
78
|
+
feat(Camera) add an optional `allowUpdates` boolean prop ([#1619](https://github.com/rnmapbox/maps/pull/1619))
|
|
79
|
+
refactor(example): remove unused modules and scripts ([#1618](https://github.com/rnmapbox/maps/pull/1618))
|
|
80
|
+
fix(react-native): update api to get rid of EventEmitter warnings ([#1615](https://github.com/rnmapbox/maps/pull/1615))
|
|
81
|
+
fix(Camera) persist zoom when changing from `bounds` to `centerCoordinate`, fix zero padding not causing map to update, create unified example showcasing bounds/centerCoordinate/zoom/padding ([#1614](https://github.com/rnmapbox/maps/pull/1614))
|
|
82
|
+
Update MapLibre to 5.12.1 on iOS ([#1596](https://github.com/rnmapbox/maps/pull/1596))
|
|
74
83
|
Update ShapeSource methods to make it usable with any cluster ( Use cluster itself instead of cluster_id as first argument for getClusterExpansionZoom/getClusterLeaves/getClusterChildren methods. Version < 9 methods still supports passing cluster_id as a first argument but a deprecation warning will be shown. ) ([#1499](https://github.com/rnmapbox/maps/pull/1499))
|
|
75
84
|
|
|
76
85
|
---
|
|
77
86
|
|
|
78
87
|
## 8.4.0
|
|
79
88
|
|
|
80
|
-
fix(iOS): pin mapLibre back to `5.12.0` ([#1589](https://github.com/rnmapbox/maps/pull/1589))
|
|
81
|
-
chore: improve GH workflows ([#1588](https://github.com/rnmapbox/maps/pull/1588))
|
|
82
|
-
build(deps): bump @expo/config-plugins from 3.1.0 to 4.0.3 ([#1585](https://github.com/rnmapbox/maps/pull/1585))
|
|
83
|
-
chore(pre-commit): run lint on TS files, change PR template ([#1584](https://github.com/rnmapbox/maps/pull/1584))
|
|
84
|
-
feat(example): update vertical alignment example ([#1579](https://github.com/rnmapbox/maps/pull/1579))
|
|
85
|
-
fix incorrect anchor calculation for PointAnnotation on iOS ([#1576](https://github.com/rnmapbox/maps/pull/1576))
|
|
86
|
-
style(eslint): align root and example with the same configuration ([#1575](https://github.com/rnmapbox/maps/pull/1575))
|
|
87
|
-
fix(mapLibre): support version `5.12.0` upwards ([#1571](https://github.com/rnmapbox/maps/pull/1571))
|
|
88
|
-
build: upgrade to RN `0.66` ([#1570](https://github.com/rnmapbox/maps/pull/1570))
|
|
89
|
-
build(android): add telemetry dependency to default build setup ([#1550](https://github.com/rnmapbox/maps/pull/1550))
|
|
90
|
-
feat(camera): Enable `padding` as a root-level prop on the camera, with `bounds.padding*` as fallbacks ([#1538](https://github.com/rnmapbox/maps/pull/1538/files))
|
|
89
|
+
fix(iOS): pin mapLibre back to `5.12.0` ([#1589](https://github.com/rnmapbox/maps/pull/1589))
|
|
90
|
+
chore: improve GH workflows ([#1588](https://github.com/rnmapbox/maps/pull/1588))
|
|
91
|
+
build(deps): bump @expo/config-plugins from 3.1.0 to 4.0.3 ([#1585](https://github.com/rnmapbox/maps/pull/1585))
|
|
92
|
+
chore(pre-commit): run lint on TS files, change PR template ([#1584](https://github.com/rnmapbox/maps/pull/1584))
|
|
93
|
+
feat(example): update vertical alignment example ([#1579](https://github.com/rnmapbox/maps/pull/1579))
|
|
94
|
+
fix incorrect anchor calculation for PointAnnotation on iOS ([#1576](https://github.com/rnmapbox/maps/pull/1576))
|
|
95
|
+
style(eslint): align root and example with the same configuration ([#1575](https://github.com/rnmapbox/maps/pull/1575))
|
|
96
|
+
fix(mapLibre): support version `5.12.0` upwards ([#1571](https://github.com/rnmapbox/maps/pull/1571))
|
|
97
|
+
build: upgrade to RN `0.66` ([#1570](https://github.com/rnmapbox/maps/pull/1570))
|
|
98
|
+
build(android): add telemetry dependency to default build setup ([#1550](https://github.com/rnmapbox/maps/pull/1550))
|
|
99
|
+
feat(camera): Enable `padding` as a root-level prop on the camera, with `bounds.padding*` as fallbacks ([#1538](https://github.com/rnmapbox/maps/pull/1538/files))
|
|
91
100
|
fix: revert pinned mapLibre version to `5.11.0` ([8a2b00e67ba6398f3f6e6f52e98b0f0cea437e4d](https://github.com/rnmapbox/maps/commit/8a2b00e67ba6398f3f6e6f52e98b0f0cea437e4d))
|
|
92
101
|
|
|
93
102
|
---
|
|
94
103
|
|
|
95
104
|
## 8.3.0
|
|
96
105
|
|
|
97
|
-
Fix TypeScript type for Callout's textStyle prop ([#1450](https://github.com/rnmapbox/maps/pull/1450))
|
|
98
|
-
Build(ios): pin maplibre version to 5.12.0 ([#1454](https://github.com/rnmapbox/maps/pull/1454))
|
|
99
|
-
Update geoUtils helpers types to correspond with `turf/helpers` ([#1455](https://github.com/rnmapbox/maps/pull/1455))
|
|
100
|
-
Fix crash with missing okhttp dependency ([#1452](https://github.com/rnmapbox/maps/pull/1452))
|
|
101
|
-
Move from react-native-testing-library => @testing-library/react-native ([#1453](https://github.com/rnmapbox/maps/pull/1453))
|
|
102
|
-
Feat(camera): maxBounds/(min|max)ZoomLevel can be updated dynamically ([#1462](https://github.com/rnmapbox/maps/pull/1462))
|
|
103
|
-
Refactor(example): clean up folder structure ([#1464](https://github.com/rnmapbox/maps/pull/1464))
|
|
104
|
-
Fix lineGradient showing wrong colors ([#1471](https://github.com/rnmapbox/maps/pull/1471))
|
|
105
|
-
Support tintColor on Android ([#1465](https://github.com/rnmapbox/maps/pull/1465))
|
|
106
|
-
Feat(android): dynamically update tintColor & add example ([#1469](https://github.com/rnmapbox/maps/pull/1469)
|
|
107
|
-
Examples: align install steps with yarn, ignore created env files ([#1484](https://github.com/rnmapbox/maps/pull/1484)
|
|
108
|
-
Fix(plugin): Exclude arm64 architectures for simulator builds ([#1490](https://github.com/rnmapbox/maps/pull/1490)
|
|
109
|
-
Feat(android): dynamically update tintColor & add example ([#1469](https://github.com/rnmapbox/maps/pull/1469))
|
|
110
|
-
Docs: make background in example pngs transparent ([#1483](https://github.com/rnmapbox/maps/pull/1483))
|
|
111
|
-
Style: run yarn lint ([#1486](https://github.com/rnmapbox/maps/pull/1486))
|
|
112
|
-
Test: add unit tests for component light ([#1489](https://github.com/rnmapbox/maps/pull/1489))
|
|
106
|
+
Fix TypeScript type for Callout's textStyle prop ([#1450](https://github.com/rnmapbox/maps/pull/1450))
|
|
107
|
+
Build(ios): pin maplibre version to 5.12.0 ([#1454](https://github.com/rnmapbox/maps/pull/1454))
|
|
108
|
+
Update geoUtils helpers types to correspond with `turf/helpers` ([#1455](https://github.com/rnmapbox/maps/pull/1455))
|
|
109
|
+
Fix crash with missing okhttp dependency ([#1452](https://github.com/rnmapbox/maps/pull/1452))
|
|
110
|
+
Move from react-native-testing-library => @testing-library/react-native ([#1453](https://github.com/rnmapbox/maps/pull/1453))
|
|
111
|
+
Feat(camera): maxBounds/(min|max)ZoomLevel can be updated dynamically ([#1462](https://github.com/rnmapbox/maps/pull/1462))
|
|
112
|
+
Refactor(example): clean up folder structure ([#1464](https://github.com/rnmapbox/maps/pull/1464))
|
|
113
|
+
Fix lineGradient showing wrong colors ([#1471](https://github.com/rnmapbox/maps/pull/1471))
|
|
114
|
+
Support tintColor on Android ([#1465](https://github.com/rnmapbox/maps/pull/1465))
|
|
115
|
+
Feat(android): dynamically update tintColor & add example ([#1469](https://github.com/rnmapbox/maps/pull/1469)
|
|
116
|
+
Examples: align install steps with yarn, ignore created env files ([#1484](https://github.com/rnmapbox/maps/pull/1484)
|
|
117
|
+
Fix(plugin): Exclude arm64 architectures for simulator builds ([#1490](https://github.com/rnmapbox/maps/pull/1490)
|
|
118
|
+
Feat(android): dynamically update tintColor & add example ([#1469](https://github.com/rnmapbox/maps/pull/1469))
|
|
119
|
+
Docs: make background in example pngs transparent ([#1483](https://github.com/rnmapbox/maps/pull/1483))
|
|
120
|
+
Style: run yarn lint ([#1486](https://github.com/rnmapbox/maps/pull/1486))
|
|
121
|
+
Test: add unit tests for component light ([#1489](https://github.com/rnmapbox/maps/pull/1489))
|
|
113
122
|
Feat: add Adds getClusterChildren method to ShapeSource ([#1495](https://github.com/rnmapbox/maps/pull/1495))
|
|
114
123
|
|
|
115
124
|
## 8.2.1
|
|
@@ -118,22 +127,22 @@ fix issue when publishing to npm with `prepare` script
|
|
|
118
127
|
|
|
119
128
|
## 8.2.0
|
|
120
129
|
|
|
121
|
-
getClusterLeaves method for ShapeSource ([#1411](https://github.com/rnmapbox/maps/pull/1411))
|
|
122
|
-
Add logoPosition props to `MapView` to position the mapbox logo ([#1396](https://github.com/rnmapbox/maps/pull/1396))
|
|
123
|
-
Add compatibility with React 17/ npm7 ([#1387](https://github.com/rnmapbox/maps/pull/1387))
|
|
124
|
-
Add Expo config plugin ([#1388](https://github.com/rnmapbox/maps/pull/1388))
|
|
125
|
-
Android: Bump `okhttp` to `4.9.0` ([#1390](https://github.com/rnmapbox/maps/pull/1390))
|
|
126
|
-
Support dynamically changing local JSON in styleURL ([#1399](https://github.com/rnmapbox/maps/pull/1399))
|
|
127
|
-
Add missing types to `SymbolLayerStyle` & `ImagesProps` ([#1360](https://github.com/rnmapbox/maps/pull/1360))
|
|
130
|
+
getClusterLeaves method for ShapeSource ([#1411](https://github.com/rnmapbox/maps/pull/1411))
|
|
131
|
+
Add logoPosition props to `MapView` to position the mapbox logo ([#1396](https://github.com/rnmapbox/maps/pull/1396))
|
|
132
|
+
Add compatibility with React 17/ npm7 ([#1387](https://github.com/rnmapbox/maps/pull/1387))
|
|
133
|
+
Add Expo config plugin ([#1388](https://github.com/rnmapbox/maps/pull/1388))
|
|
134
|
+
Android: Bump `okhttp` to `4.9.0` ([#1390](https://github.com/rnmapbox/maps/pull/1390))
|
|
135
|
+
Support dynamically changing local JSON in styleURL ([#1399](https://github.com/rnmapbox/maps/pull/1399))
|
|
136
|
+
Add missing types to `SymbolLayerStyle` & `ImagesProps` ([#1360](https://github.com/rnmapbox/maps/pull/1360))
|
|
128
137
|
Fix error while updating coordinates of RCTMGLImageSource ([#1310](https://github.com/rnmapbox/maps/pull/1310))
|
|
129
138
|
|
|
130
139
|
## 8.2.0-beta2
|
|
131
140
|
|
|
132
|
-
Add types for `Logger` class ([#1316](https://github.com/rnmapbox/maps/pull/1316))
|
|
133
|
-
Enable linear easing on map camera ([#1281](https://github.com/rnmapbox/maps/pull/1281))
|
|
134
|
-
Allow MapLibre as an option ([#1311](https://github.com/rnmapbox/maps/pull/1311))
|
|
135
|
-
Fix native UserLocation on Android ([#1284](https://github.com/rnmapbox/maps/pull/1284))
|
|
136
|
-
Add getClusterExpansionZoom to ShapeSource ([#1279](https://github.com/rnmapbox/maps/pull/1279))
|
|
141
|
+
Add types for `Logger` class ([#1316](https://github.com/rnmapbox/maps/pull/1316))
|
|
142
|
+
Enable linear easing on map camera ([#1281](https://github.com/rnmapbox/maps/pull/1281))
|
|
143
|
+
Allow MapLibre as an option ([#1311](https://github.com/rnmapbox/maps/pull/1311))
|
|
144
|
+
Fix native UserLocation on Android ([#1284](https://github.com/rnmapbox/maps/pull/1284))
|
|
145
|
+
Add getClusterExpansionZoom to ShapeSource ([#1279](https://github.com/rnmapbox/maps/pull/1279))
|
|
137
146
|
Add type definition for AnimatedPoint ([#1280](https://github.com/rnmapbox/maps/pull/1280))
|
|
138
147
|
|
|
139
148
|
## 8.2.0-beta1
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
3
|
PRs are most welcome! This doc covers some basic things you'll need to know to set up
|
|
4
|
-
your dev environment and streamline the review process.
|
|
4
|
+
your dev environment and streamline the review process.
|
|
5
5
|
|
|
6
6
|
## Environment Setup
|
|
7
7
|
|
|
@@ -12,6 +12,8 @@ This project uses `yarn` as a package manager. DO NOT install `yarn` using `npm`
|
|
|
12
12
|
the outdated 1.x branch. Full instructions are in the [yarn docs](https://yarnpkg.com/getting-started/install),
|
|
13
13
|
but here's the quick checklist at the time of this writing.
|
|
14
14
|
|
|
15
|
+
Make sure to correctly configure your Editor following [this docs](https://yarnpkg.com/getting-started/editor-sdks).
|
|
16
|
+
|
|
15
17
|
1. `corepack enable`
|
|
16
18
|
2. `corepack prepare yarn@stable --activate`
|
|
17
19
|
3. On first install, the above may change your yarn config away from `pnp`; check your git working copy for changes and revert if necessary.
|
|
@@ -19,8 +21,8 @@ but here's the quick checklist at the time of this writing.
|
|
|
19
21
|
|
|
20
22
|
## Testing
|
|
21
23
|
|
|
22
|
-
The metro bundler under `/example` is set up to use the libraries files under root.
|
|
23
|
-
Which means, when you change something within `javascript/components/UserLocation.js`
|
|
24
|
+
The metro bundler under `/example` is set up to use the libraries files under root.
|
|
25
|
+
Which means, when you change something within `javascript/components/UserLocation.js`
|
|
24
26
|
it will be reflected in any scene in example that uses that component.
|
|
25
27
|
|
|
26
28
|
TODO: A better overview of how we use jest, detox, etc. (issue #22)
|
|
@@ -33,7 +35,6 @@ While it's not easy to do this out of the box with `yarn` or `npm`.
|
|
|
33
35
|
[`yalc`](https://www.viget.com/articles/how-to-use-local-unpublished-node-packages-as-project-dependencies/)
|
|
34
36
|
can mitigate some of the pain with this.
|
|
35
37
|
|
|
36
|
-
|
|
37
38
|
## Best practices for PRs
|
|
38
39
|
|
|
39
40
|
- If you add a feature, make sure you add it to the documentation
|
|
@@ -45,10 +46,10 @@ can mitigate some of the pain with this.
|
|
|
45
46
|
|
|
46
47
|
## Documentation
|
|
47
48
|
|
|
48
|
-
Documentation is generated from code blocks and comments.
|
|
49
|
-
It will be auto-generated when you commit changes.
|
|
50
|
-
If any changes are generated from your edits, the changed files will need to be added using `git add` before attempting the commit again.
|
|
51
|
-
To manually generate the changes, run `yarn generate`.
|
|
49
|
+
Documentation is generated from code blocks and comments.
|
|
50
|
+
It will be auto-generated when you commit changes.
|
|
51
|
+
If any changes are generated from your edits, the changed files will need to be added using `git add` before attempting the commit again.
|
|
52
|
+
To manually generate the changes, run `yarn generate`.
|
|
52
53
|
|
|
53
|
-
Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice.
|
|
54
|
+
Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice.
|
|
54
55
|
The correct way is the above described
|
|
@@ -54,9 +54,11 @@ public class MarkerViewManager extends com.mapbox.mapboxsdk.plugins.markerview.M
|
|
|
54
54
|
|
|
55
55
|
public void updateMarkers(){
|
|
56
56
|
|
|
57
|
-
try {
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
try {
|
|
58
|
+
if (markerUpdate != null) {
|
|
59
|
+
for( int i = 0; i < markers.size(); i++ ){
|
|
60
|
+
markerUpdate.invoke(markers.get(i));
|
|
61
|
+
}
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
catch (IllegalArgumentException e) { System.out.println(e.toString()); }
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
CHANGED
|
@@ -925,10 +925,10 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
925
925
|
}
|
|
926
926
|
float density = getDisplayDensity();
|
|
927
927
|
mAttributionMargin = new int[]{
|
|
928
|
-
position.hasKey("left") ? (
|
|
929
|
-
position.hasKey("top") ? (
|
|
930
|
-
position.hasKey("right") ? (
|
|
931
|
-
position.hasKey("bottom") ? (
|
|
928
|
+
position.hasKey("left") ? Math.round(density * position.getInt("left")) : 0,
|
|
929
|
+
position.hasKey("top") ? Math.round(density * position.getInt("top")) : 0,
|
|
930
|
+
position.hasKey("right") ? Math.round(density * position.getInt("right")) : 0,
|
|
931
|
+
position.hasKey("bottom") ? Math.round(density * position.getInt("bottom")) : 0
|
|
932
932
|
};
|
|
933
933
|
updateUISettings();
|
|
934
934
|
}
|
|
@@ -1181,10 +1181,10 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
1183
|
if (mCompassViewMargins != null && uiSettings.isCompassEnabled()) {
|
|
1184
|
-
|
|
1184
|
+
float pixelDensity = getResources().getDisplayMetrics().density;
|
|
1185
1185
|
|
|
1186
|
-
int x = mCompassViewMargins.getInt("x") * pixelDensity;
|
|
1187
|
-
int y = mCompassViewMargins.getInt("y") * pixelDensity;
|
|
1186
|
+
int x = Math.round(mCompassViewMargins.getInt("x") * pixelDensity);
|
|
1187
|
+
int y = Math.round(mCompassViewMargins.getInt("y") * pixelDensity);
|
|
1188
1188
|
|
|
1189
1189
|
switch (uiSettings.getCompassGravity()) {
|
|
1190
1190
|
case Gravity.TOP | Gravity.START:
|
package/docs/Camera.md
CHANGED
|
@@ -34,9 +34,9 @@ Map camera transitions to fit provided bounds
|
|
|
34
34
|
##### arguments
|
|
35
35
|
| Name | Type | Required | Description |
|
|
36
36
|
| ---- | :--: | :------: | :----------: |
|
|
37
|
-
| `northEastCoordinates` | `
|
|
38
|
-
| `southWestCoordinates` | `
|
|
39
|
-
| `padding` | `Number` | `No` |
|
|
37
|
+
| `northEastCoordinates` | `GeoJSON.Position` | `Yes` | North east coordinate of bound |
|
|
38
|
+
| `southWestCoordinates` | `GeoJSON.Position` | `Yes` | South west coordinate of bound |
|
|
39
|
+
| `padding` | `Number \| Array` | `No` | Padding for the bounds |
|
|
40
40
|
| `animationDuration` | `Number` | `No` | Duration of camera animation |
|
|
41
41
|
|
|
42
42
|
|