@maplibre/maplibre-react-native 10.0.0-alpha.23 → 10.0.0-alpha.25
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/.husky/pre-commit +1 -1
- package/CHANGELOG.md +10 -0
- package/CONTRIBUTING.md +1 -1
- package/android/rctmln/build.gradle +5 -0
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java +9 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +1 -1
- package/docs/Annotation.md +2 -11
- package/docs/BackgroundLayer.md +2 -1
- package/docs/Callout.md +2 -1
- package/docs/Camera.md +28 -29
- package/docs/CircleLayer.md +2 -1
- package/docs/FillExtrusionLayer.md +2 -1
- package/docs/FillLayer.md +2 -1
- package/docs/HeadingIndicator.md +2 -1
- package/docs/HeatmapLayer.md +2 -1
- package/docs/ImageSource.md +2 -1
- package/docs/Images.md +2 -1
- package/docs/Light.md +2 -1
- package/docs/LineLayer.md +2 -1
- package/docs/MapView.md +7 -12
- package/docs/MarkerView.md +2 -1
- package/docs/NativeUserLocation.md +2 -1
- package/docs/PointAnnotation.md +2 -1
- package/docs/RasterLayer.md +2 -1
- package/docs/RasterSource.md +2 -1
- package/docs/ShapeSource.md +3 -5
- package/docs/Style.md +2 -1
- package/docs/SymbolLayer.md +2 -1
- package/docs/UserLocation.md +2 -1
- package/docs/VectorSource.md +3 -2
- package/docs/coordinates.md +2 -1
- package/docs/docs.json +49 -88
- package/docs/location.md +2 -1
- package/docs/offlineManager.md +3 -2
- package/docs/snapshotManager.md +2 -1
- package/ios/RCTMLN/RCTMLNCamera.h +0 -3
- package/ios/RCTMLN/RCTMLNCamera.m +1 -1
- package/ios/RCTMLN/RCTMLNCameraManager.m +0 -3
- package/javascript/MLNModule.ts +10 -1
- package/javascript/Maplibre.ts +1 -1
- package/javascript/components/{annotations/Annotation.tsx → Annotation.tsx} +5 -5
- package/javascript/components/Camera.tsx +257 -388
- package/javascript/components/UserLocation.tsx +1 -1
- package/javascript/hooks/useNativeRef.ts +2 -1
- package/javascript/types/CameraMode.ts +6 -0
- package/package.json +8 -9
- package/scripts/codegen.ts +341 -0
- package/scripts/templates/MaplibreStyles.ts.ejs +8 -7
- package/scripts/templates/RCTMLNStyle.h.ejs +4 -3
- package/scripts/templates/RCTMLNStyle.m.ejs +11 -10
- package/scripts/templates/RCTMLNStyleFactory.java.ejs +12 -11
- package/scripts/templates/component.md.ejs +14 -12
- package/scripts/templates/index.d.ts.ejs +2 -1
- package/scripts/templates/styleMap.ts.ejs +2 -1
- package/scripts/utils/{DocJSONBuilder.js → DocJSONBuilder.ts} +133 -128
- package/scripts/utils/{JSDocNodeTree.js → JSDocNodeTree.ts} +14 -13
- package/scripts/utils/MarkdownBuilder.ts +44 -0
- package/scripts/utils/{template-globals.js → TemplateHelpers.ts} +66 -95
- package/scripts/utils/getNativeVersion.ts +53 -0
- package/tsconfig.json +2 -3
- package/docs/OfflineManager.md +0 -246
- package/scripts/download-style-spec.sh +0 -15
- package/scripts/generate-docs.js +0 -396
- package/scripts/utils/MarkdownBuilder.js +0 -37
- package/style-spec/v8.json +0 -6645
package/.husky/pre-commit
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ PR Title ([#123](link to my pr))
|
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
## 10.0.0-alpha.25
|
|
10
|
+
|
|
11
|
+
feat: make Camera pure ([#471](https://github.com/maplibre/maplibre-react-native/pull/471))
|
|
12
|
+
|
|
13
|
+
docs: update scripts to TypeScript ([#484](https://github.com/maplibre/maplibre-react-native/pull/484))
|
|
14
|
+
|
|
15
|
+
## 10.0.0-alpha.24
|
|
16
|
+
|
|
17
|
+
feat: support new arch through interop layer ([#483](https://github.com/maplibre/maplibre-react-native/pull/483))
|
|
18
|
+
|
|
9
19
|
## 10.0.0-alpha.23
|
|
10
20
|
|
|
11
21
|
fix: keep @ts-ignore for headingIcon in library ([#477](https://github.com/maplibre/maplibre-react-native/pull/477))
|
package/CONTRIBUTING.md
CHANGED
|
@@ -55,7 +55,7 @@ can mitigate some of the pain with this.
|
|
|
55
55
|
|
|
56
56
|
Documentation is generated from code blocks and comments. It will be auto-generated when you commit changes. If any
|
|
57
57
|
changes are generated from your edits, the changed files will need to be added using `git add` before attempting the
|
|
58
|
-
commit again. To manually generate the changes, run `yarn
|
|
58
|
+
commit again. To manually generate the changes, run `yarn codegen`.
|
|
59
59
|
|
|
60
60
|
Notice, that changing the documentation in the individual <COMPONENT>.md within `/docs` will not suffice. The correct
|
|
61
61
|
way is the above described
|
|
@@ -4,6 +4,10 @@ def safeExtGet(prop, fallback) {
|
|
|
4
4
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
def isNewArchitectureEnabled() {
|
|
8
|
+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
android {
|
|
8
12
|
compileSdkVersion safeExtGet("compileSdkVersion", 33)
|
|
9
13
|
buildToolsVersion safeExtGet("buildToolsVersion", '33.0.1')
|
|
@@ -13,6 +17,7 @@ android {
|
|
|
13
17
|
targetSdkVersion safeExtGet('targetSdkVersion', 26)
|
|
14
18
|
versionCode 1
|
|
15
19
|
versionName "1.0"
|
|
20
|
+
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
compileOptions {
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java
CHANGED
|
@@ -2,12 +2,16 @@ package com.maplibre.rctmln.components;
|
|
|
2
2
|
|
|
3
3
|
import android.view.ViewGroup;
|
|
4
4
|
|
|
5
|
+
import com.maplibre.rctmln.BuildConfig;
|
|
5
6
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
6
7
|
import com.facebook.react.common.MapBuilder;
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
9
|
+
import com.facebook.react.uimanager.UIManagerHelper;
|
|
8
10
|
import com.facebook.react.uimanager.UIManagerModule;
|
|
9
11
|
import com.facebook.react.uimanager.ViewGroupManager;
|
|
10
12
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
13
|
+
import com.facebook.react.uimanager.common.UIManagerType;
|
|
14
|
+
|
|
11
15
|
import com.maplibre.rctmln.events.IEvent;
|
|
12
16
|
|
|
13
17
|
import java.util.HashMap;
|
|
@@ -45,7 +49,11 @@ abstract public class AbstractEventEmitter<T extends ViewGroup> extends ViewGrou
|
|
|
45
49
|
|
|
46
50
|
@Override
|
|
47
51
|
protected void addEventEmitters(ThemedReactContext context, @Nonnull T view) {
|
|
48
|
-
|
|
52
|
+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
53
|
+
mEventDispatcher = UIManagerHelper.getUIManager(context, UIManagerType.FABRIC).getEventDispatcher();
|
|
54
|
+
} else {
|
|
55
|
+
mEventDispatcher = context.getNativeModule(UIManagerModule.class).getEventDispatcher();
|
|
56
|
+
}
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
@Nullable
|
|
@@ -18,7 +18,7 @@ import com.maplibre.rctmln.location.LocationManager;
|
|
|
18
18
|
|
|
19
19
|
@ReactModule(name = RCTMLNLocationModule.REACT_CLASS)
|
|
20
20
|
public class RCTMLNLocationModule extends ReactContextBaseJavaModule {
|
|
21
|
-
public static final String REACT_CLASS = "
|
|
21
|
+
public static final String REACT_CLASS = "MLNLocationModule";
|
|
22
22
|
public static final String LOCATION_UPDATE = "MapboxUserLocationUpdate";
|
|
23
23
|
|
|
24
24
|
private boolean isEnabled;
|
|
@@ -13,7 +13,7 @@ import android.util.Log;
|
|
|
13
13
|
|
|
14
14
|
@ReactModule(name = RCTMLNLogging.REACT_CLASS)
|
|
15
15
|
public class RCTMLNLogging extends ReactContextBaseJavaModule {
|
|
16
|
-
public static final String REACT_CLASS = "
|
|
16
|
+
public static final String REACT_CLASS = "MLNLogging";
|
|
17
17
|
private ReactApplicationContext mReactContext;
|
|
18
18
|
|
|
19
19
|
public RCTMLNLogging(ReactApplicationContext reactApplicationContext) {
|
|
@@ -36,7 +36,7 @@ import javax.annotation.Nullable;
|
|
|
36
36
|
|
|
37
37
|
@ReactModule(name = RCTMLNModule.REACT_CLASS)
|
|
38
38
|
public class RCTMLNModule extends ReactContextBaseJavaModule {
|
|
39
|
-
public static final String REACT_CLASS = "
|
|
39
|
+
public static final String REACT_CLASS = "MLNModule";
|
|
40
40
|
|
|
41
41
|
private static boolean customHeaderInterceptorAdded = false;
|
|
42
42
|
|
|
@@ -38,7 +38,7 @@ import java.util.Locale;
|
|
|
38
38
|
|
|
39
39
|
@ReactModule(name = RCTMLNOfflineModule.REACT_CLASS)
|
|
40
40
|
public class RCTMLNOfflineModule extends ReactContextBaseJavaModule {
|
|
41
|
-
public static final String REACT_CLASS = "
|
|
41
|
+
public static final String REACT_CLASS = "MLNOfflineModule";
|
|
42
42
|
|
|
43
43
|
public static final int INACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_INACTIVE;
|
|
44
44
|
public static final int ACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_ACTIVE;
|
|
@@ -40,7 +40,7 @@ import static android.content.Context.CONTEXT_IGNORE_SECURITY;
|
|
|
40
40
|
|
|
41
41
|
@ReactModule(name = RCTMLNSnapshotModule.REACT_CLASS)
|
|
42
42
|
public class RCTMLNSnapshotModule extends ReactContextBaseJavaModule {
|
|
43
|
-
public static final String REACT_CLASS = "
|
|
43
|
+
public static final String REACT_CLASS = "MLNSnapshotModule";
|
|
44
44
|
|
|
45
45
|
private ReactApplicationContext mContext;
|
|
46
46
|
|
package/docs/Annotation.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/Annotation.tsx -->
|
|
2
3
|
## <MapLibreGL.Annotation />
|
|
3
4
|
###
|
|
4
5
|
|
|
@@ -25,14 +26,4 @@
|
|
|
25
26
|
| `event` | `OnPressEvent` | `Yes` | undefined |
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
#### symbolStyle()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
##### arguments
|
|
33
|
-
| Name | Type | Required | Description |
|
|
34
|
-
| ---- | :--: | :------: | :----------: |
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
29
|
|
package/docs/BackgroundLayer.md
CHANGED
package/docs/Callout.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/Callout.tsx -->
|
|
2
3
|
## <MapLibreGL.Callout />
|
|
3
4
|
### Callout that displays information about a selected annotation near the annotation.
|
|
4
5
|
|
package/docs/Camera.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/Camera.tsx -->
|
|
2
3
|
## <MapLibreGL.Camera />
|
|
3
4
|
###
|
|
4
5
|
|
|
@@ -11,63 +12,61 @@
|
|
|
11
12
|
| pitch | `number` | `none` | `false` | The pitch of the map. |
|
|
12
13
|
| zoomLevel | `number` | `none` | `false` | The zoom level of the map. |
|
|
13
14
|
| padding | `CameraPadding` | `none` | `false` | The viewport padding in points. |
|
|
14
|
-
| animationDuration | `number` | `
|
|
15
|
-
| animationMode | `"flyTo" \| "easeTo" \| "linearTo" \| "moveTo"` | `
|
|
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. |
|
|
15
|
+
| animationDuration | `number` | `none` | `false` | The duration the map takes to animate to a new configuration. |
|
|
16
|
+
| animationMode | `"flyTo" \| "easeTo" \| "linearTo" \| "moveTo"` | `none` | `false` | The easing or path the camera uses to animate to a new configuration. |
|
|
17
17
|
| defaultSettings | `CameraStop` | `none` | `false` | Default view settings applied on camera |
|
|
18
|
-
| minZoomLevel | `number` | `none` | `false` |
|
|
19
|
-
| maxZoomLevel | `number` | `none` | `false` |
|
|
18
|
+
| minZoomLevel | `number` | `none` | `false` | Minimum zoom level of the map |
|
|
19
|
+
| maxZoomLevel | `number` | `none` | `false` | Maximum zoom level of the map |
|
|
20
20
|
| maxBounds | `CameraBounds` | `none` | `false` | Restrict map panning so that the center is within these bounds |
|
|
21
21
|
| followUserLocation | `boolean` | `none` | `false` | Should the map orientation follow the user's. |
|
|
22
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](/packages/examples/src/examples/Camera/SetUserTrackingModes.js) |
|
|
23
23
|
| followZoomLevel | `number` | `none` | `false` | The zoomLevel on map while followUserLocation is set to `true` |
|
|
24
24
|
| followPitch | `number` | `none` | `false` | The pitch on map while followUserLocation is set to `true` |
|
|
25
25
|
| followHeading | `number` | `none` | `false` | The heading on map while followUserLocation is set to `true` |
|
|
26
|
-
|
|
|
27
|
-
| onUserTrackingModeChange | `func` | `none` | `false` | FIX ME NO DESCRIPTION<br/>*signature:*`(event:MaplibreGLEvent) => void` |
|
|
26
|
+
| onUserTrackingModeChange | `func` | `none` | `false` | Triggered when `followUserLocation` or `followUserMode` changes<br/>*signature:*`(event:MaplibreGLEvent) => void` |
|
|
28
27
|
|
|
29
28
|
### methods
|
|
30
|
-
#### fitBounds(
|
|
29
|
+
#### fitBounds(ne, sw, [padding], [animationDuration])
|
|
31
30
|
|
|
32
31
|
Map camera transitions to fit provided bounds
|
|
33
32
|
|
|
34
33
|
##### arguments
|
|
35
34
|
| Name | Type | Required | Description |
|
|
36
35
|
| ---- | :--: | :------: | :----------: |
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `padding` | `
|
|
40
|
-
| `animationDuration` | `
|
|
36
|
+
| `ne` | `GeoJSON.Position` | `Yes` | North east coordinate of bound |
|
|
37
|
+
| `sw` | `GeoJSON.Position` | `Yes` | South west coordinate of bound |
|
|
38
|
+
| `padding` | `number \| number[]` | `No` | Padding for the bounds |
|
|
39
|
+
| `animationDuration` | `number` | `No` | Duration of camera animation |
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
|
|
44
43
|
```javascript
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
cameraRef.current?.fitBounds([lng, lat], [lng, lat])
|
|
45
|
+
cameraRef.current?.fitBounds([lng, lat], [lng, lat], 20, 1000) // padding for all sides
|
|
46
|
+
cameraRef.current?.fitBounds([lng, lat], [lng, lat], [verticalPadding, horizontalPadding], 1000)
|
|
47
|
+
cameraRef.current?.fitBounds([lng, lat], [lng, lat], [top, right, bottom, left], 1000)
|
|
49
48
|
```
|
|
50
49
|
|
|
51
50
|
|
|
52
|
-
#### flyTo(coordinates
|
|
51
|
+
#### flyTo(coordinates, [animationDuration])
|
|
53
52
|
|
|
54
53
|
Map camera will fly to new coordinate
|
|
55
54
|
|
|
56
55
|
##### arguments
|
|
57
56
|
| Name | Type | Required | Description |
|
|
58
57
|
| ---- | :--: | :------: | :----------: |
|
|
59
|
-
| `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will jump
|
|
58
|
+
| `coordinates` | `GeoJSON.Position` | `Yes` | Coordinates that map camera will jump to |
|
|
60
59
|
| `animationDuration` | `Number` | `No` | Duration of camera animation |
|
|
61
60
|
|
|
62
61
|
|
|
63
62
|
|
|
64
63
|
```javascript
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
cameraRef.current?.flyTo([lng, lat])
|
|
65
|
+
cameraRef.current?.flyTo([lng, lat], 12000)
|
|
67
66
|
```
|
|
68
67
|
|
|
69
68
|
|
|
70
|
-
#### moveTo(coordinates
|
|
69
|
+
#### moveTo(coordinates, [animationDuration])
|
|
71
70
|
|
|
72
71
|
Map camera will move to new coordinate at the same zoom level
|
|
73
72
|
|
|
@@ -80,12 +79,12 @@ Map camera will move to new coordinate at the same zoom level
|
|
|
80
79
|
|
|
81
80
|
|
|
82
81
|
```javascript
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
cameraRef.current?.moveTo([lng, lat], 200) // eases camera to new location based on duration
|
|
83
|
+
cameraRef.current?.moveTo([lng, lat]) // snaps camera to new location without any easing
|
|
85
84
|
```
|
|
86
85
|
|
|
87
86
|
|
|
88
|
-
#### zoomTo(zoomLevel
|
|
87
|
+
#### zoomTo(zoomLevel, [animationDuration])
|
|
89
88
|
|
|
90
89
|
Map camera will zoom to specified level
|
|
91
90
|
|
|
@@ -98,8 +97,8 @@ Map camera will zoom to specified level
|
|
|
98
97
|
|
|
99
98
|
|
|
100
99
|
```javascript
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
cameraRef.current?.zoomTo(16)
|
|
101
|
+
cameraRef.current?.zoomTo(16, 100)
|
|
103
102
|
```
|
|
104
103
|
|
|
105
104
|
|
|
@@ -115,13 +114,13 @@ Map camera will perform updates based on provided config. Advanced use only!
|
|
|
115
114
|
|
|
116
115
|
|
|
117
116
|
```javascript
|
|
118
|
-
|
|
117
|
+
cameraRef.current?.setCamera({
|
|
119
118
|
centerCoordinate: [lng, lat],
|
|
120
119
|
zoomLevel: 16,
|
|
121
120
|
animationDuration: 2000,
|
|
122
121
|
})
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
cameraRef.current?.setCamera({
|
|
125
124
|
stops: [
|
|
126
125
|
{ pitch: 45, animationDuration: 200 },
|
|
127
126
|
{ heading: 180, animationDuration: 300 },
|
package/docs/CircleLayer.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/CircleLayer.tsx -->
|
|
2
3
|
## <MapLibreGL.CircleLayer />
|
|
3
4
|
### CircleLayer is a style layer that renders one or more filled circles on the map.
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/FillExtrusionLayer.tsx -->
|
|
2
3
|
## <MapLibreGL.FillExtrusionLayer />
|
|
3
4
|
### FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
|
|
4
5
|
|
package/docs/FillLayer.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/FillLayer.tsx -->
|
|
2
3
|
## <MapLibreGL.FillLayer />
|
|
3
4
|
### FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.
|
|
4
5
|
|
package/docs/HeadingIndicator.md
CHANGED
package/docs/HeatmapLayer.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/HeatmapLayer.tsx -->
|
|
2
3
|
## <MapLibreGL.HeatmapLayer />
|
|
3
4
|
### HeatmapLayer is a style layer that renders one or more filled circles on the map.
|
|
4
5
|
|
package/docs/ImageSource.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/ImageSource.tsx -->
|
|
2
3
|
## <MapLibreGL.ImageSource />
|
|
3
4
|
### ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.<br/>The georeferenced image scales and rotates as the user zooms and rotates the map
|
|
4
5
|
|
package/docs/Images.md
CHANGED
package/docs/Light.md
CHANGED
package/docs/LineLayer.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/LineLayer.tsx -->
|
|
2
3
|
## <MapLibreGL.LineLayer />
|
|
3
4
|
### LineLayer is a style layer that renders one or more stroked polylines on the map.
|
|
4
5
|
|
package/docs/MapView.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/MapView.tsx -->
|
|
2
3
|
## <MapLibreGL.MapView />
|
|
3
4
|
### MapView backed by MapLibre Native
|
|
4
5
|
|
|
@@ -16,16 +17,10 @@
|
|
|
16
17
|
| pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
|
|
17
18
|
| rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
|
|
18
19
|
| attributionEnabled | `boolean` | `true` | `false` | Enable/Disable attribution on map.<br/><br/>This must be enabled for Mapbox-hosted tiles and styles. Please refer to the Mapbox Terms of Service.<br/>Other providers do not require this. |
|
|
19
|
-
| attributionPosition |
|
|
20
|
-
\| { top?: number; right?: number }
|
|
21
|
-
\| { bottom?: number; left?: number }
|
|
22
|
-
\| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
|
|
20
|
+
| attributionPosition | `{ top?: number; left?: number } \| { top?: number; right?: number } \| { bottom?: number; left?: number } \| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
|
|
23
21
|
| tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
|
|
24
22
|
| logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. |
|
|
25
|
-
| logoPosition |
|
|
26
|
-
\| { top?: number; right?: number }
|
|
27
|
-
\| { bottom?: number; left?: number }
|
|
28
|
-
\| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
|
|
23
|
+
| logoPosition | `{ top?: number; left?: number } \| { top?: number; right?: number } \| { bottom?: number; left?: number } \| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
|
|
29
24
|
| compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
|
|
30
25
|
| compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
|
|
31
26
|
| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
|
|
@@ -84,7 +79,7 @@ const visibleBounds = await this._map.getVisibleBounds();
|
|
|
84
79
|
```
|
|
85
80
|
|
|
86
81
|
|
|
87
|
-
#### queryRenderedFeaturesAtPoint(point
|
|
82
|
+
#### queryRenderedFeaturesAtPoint(point, [filter], [layerIDs])
|
|
88
83
|
|
|
89
84
|
Returns an array of rendered map features that intersect with a given point.
|
|
90
85
|
|
|
@@ -102,7 +97,7 @@ this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1'
|
|
|
102
97
|
```
|
|
103
98
|
|
|
104
99
|
|
|
105
|
-
#### queryRenderedFeaturesInRect(bbox
|
|
100
|
+
#### queryRenderedFeaturesInRect(bbox, [filter], [layerIDs])
|
|
106
101
|
|
|
107
102
|
Returns an array of rendered map features that intersect with the given rectangle,<br/>restricted to the given style layers and filtered by the given predicate.
|
|
108
103
|
|
|
@@ -172,7 +167,7 @@ const center = await this._map.getCenter();
|
|
|
172
167
|
```
|
|
173
168
|
|
|
174
169
|
|
|
175
|
-
#### setSourceVisibility(visible, sourceId
|
|
170
|
+
#### setSourceVisibility(visible, sourceId, [sourceLayerId])
|
|
176
171
|
|
|
177
172
|
Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId`
|
|
178
173
|
|
package/docs/MarkerView.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/MarkerView.tsx -->
|
|
2
3
|
## <MapLibreGL.MarkerView />
|
|
3
4
|
### MarkerView allows you to place a interactive react native marker to the map.<br/><br/>If you have static view consider using PointAnnotation or SymbolLayer they'll offer much better performance<br/>.<br/>This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android<br/>and PointAnnotation on iOS.
|
|
4
5
|
|
package/docs/PointAnnotation.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/PointAnnotation.tsx -->
|
|
2
3
|
## <MapLibreGL.PointAnnotation />
|
|
3
4
|
### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.<br/><br/>Consider using ShapeSource and SymbolLayer instead, if you have many points and you have static images,<br/>they'll offer much better performance<br/><br/>.<br/>If you need interctive views please use MarkerView,<br/>as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.
|
|
4
5
|
|
package/docs/RasterLayer.md
CHANGED
package/docs/RasterSource.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/RasterSource.tsx -->
|
|
2
3
|
## <MapLibreGL.RasterSource />
|
|
3
4
|
### RasterSource is a map content source that supplies raster image tiles to be shown on the map.<br/>The location of and metadata about the tiles are defined either by an option dictionary<br/>or by an external file that conforms to the TileJSON specification.
|
|
4
5
|
|
package/docs/ShapeSource.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/ShapeSource.tsx -->
|
|
2
3
|
## <MapLibreGL.ShapeSource />
|
|
3
4
|
### ShapeSource is a map content source that supplies vector shapes to be shown on the map.<br/>The shape may be a url or a GeoJSON object
|
|
4
5
|
|
|
@@ -7,10 +8,7 @@
|
|
|
7
8
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
9
|
| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
|
|
9
10
|
| url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
|
|
10
|
-
| shape |
|
|
11
|
-
\| GeoJSON.Feature
|
|
12
|
-
\| GeoJSON.FeatureCollection
|
|
13
|
-
\| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
|
|
11
|
+
| shape | `GeoJSON.GeometryCollection \| GeoJSON.Feature \| GeoJSON.FeatureCollection \| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
|
|
14
12
|
| cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
|
|
15
13
|
| clusterRadius | `number` | `none` | `false` | Specifies the radius of each cluster if clustering is enabled.<br/>A value of 512 produces a radius equal to the width of a tile.<br/>The default value is 50. |
|
|
16
14
|
| clusterMaxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to cluster points if clustering is enabled.<br/>Defaults to one zoom level less than the value of maxZoomLevel so that, at the maximum zoom level,<br/>the shapes are not clustered. |
|
package/docs/Style.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/Style.tsx -->
|
|
2
3
|
## <MapLibreGL.Style />
|
|
3
4
|
### Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.<br/>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.<br/>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.<br/><br/>TODO: Maintainer forking this project does not understand the above comment regarding what is supported.
|
|
4
5
|
|
package/docs/SymbolLayer.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/SymbolLayer.tsx -->
|
|
2
3
|
## <MapLibreGL.SymbolLayer />
|
|
3
4
|
### SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
|
|
4
5
|
|
package/docs/UserLocation.md
CHANGED
package/docs/VectorSource.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- DO NOT MODIFY! -->
|
|
2
|
+
<!-- This file is auto-generated from javascript/components/VectorSource.tsx -->
|
|
2
3
|
## <MapLibreGL.VectorSource />
|
|
3
4
|
### VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.<br/>The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification.
|
|
4
5
|
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
| children | `React.ReactElement \| React.ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
20
21
|
|
|
21
22
|
### methods
|
|
22
|
-
#### features([layerIDs]
|
|
23
|
+
#### features([layerIDs], [filter])
|
|
23
24
|
|
|
24
25
|
Returns all features that match the query parameters regardless of whether or not the feature is<br/>currently rendered on the map. The domain of the query includes all currently-loaded vector tiles<br/>and GeoJSON source tiles. This function does not check tiles outside of the visible viewport.
|
|
25
26
|
|
package/docs/coordinates.md
CHANGED