@maplibre/maplibre-react-native 10.0.0-alpha.6 → 10.0.0-alpha.8
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 +7 -0
- package/CONTRIBUTING.md +10 -9
- package/android/build.gradle +1 -1
- package/android/rctmln/build.gradle +5 -5
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java +6 -6
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java +5 -5
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java +9 -8
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java +14 -12
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java +10 -10
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java +26 -26
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java +12 -12
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java +9 -9
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java +7 -7
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java +9 -9
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java +43 -43
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java +6 -6
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java +3 -3
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +14 -14
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java +8 -8
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java +6 -6
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java +3 -3
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java +3 -3
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java +9 -9
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java +4 -4
- package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java +7 -7
- package/android/rctmln/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/location/LocationManager.java +6 -6
- package/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserLocation.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java +3 -3
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +8 -8
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +11 -11
- package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +7 -7
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java +1 -1
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java +5 -5
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java +13 -13
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java +3 -3
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java +2 -2
- package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java +1 -1
- package/docs/Camera.md +3 -3
- package/docs/MapView.md +9 -33
- package/docs/UserLocation.md +10 -2
- package/docs/docs.json +16 -31
- 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/scripts/templates/RCTMLNStyleFactory.java.ejs +14 -14
- package/javascript/components/AbstractSource.tsx +0 -27
- package/javascript/components/NativeBridgeComponent.tsx +0 -117
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java
CHANGED
|
@@ -2,9 +2,9 @@ package com.maplibre.rctmln.components.camera;
|
|
|
2
2
|
|
|
3
3
|
import androidx.annotation.NonNull;
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import org.maplibre.android.camera.CameraUpdate;
|
|
6
|
+
import org.maplibre.android.constants.MapLibreConstants;
|
|
7
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
8
8
|
import com.maplibre.rctmln.components.camera.constants.CameraMode;
|
|
9
9
|
|
|
10
10
|
import java.lang.ref.WeakReference;
|
|
@@ -23,16 +23,16 @@ import java.util.concurrent.TimeoutException;
|
|
|
23
23
|
|
|
24
24
|
public class CameraUpdateItem implements RunnableFuture<Void> {
|
|
25
25
|
private int mDuration;
|
|
26
|
-
private
|
|
26
|
+
private MapLibreMap.CancelableCallback mCallback;
|
|
27
27
|
private CameraUpdate mCameraUpdate;
|
|
28
28
|
private int mCameraMode;
|
|
29
29
|
|
|
30
30
|
private boolean isCameraActionFinished;
|
|
31
31
|
private boolean isCameraActionCancelled;
|
|
32
32
|
|
|
33
|
-
private WeakReference<
|
|
33
|
+
private WeakReference<MapLibreMap> mMap;
|
|
34
34
|
|
|
35
|
-
public CameraUpdateItem(
|
|
35
|
+
public CameraUpdateItem(MapLibreMap map, CameraUpdate update, int duration, MapLibreMap.CancelableCallback callback, @CameraMode.Mode int cameraMode) {
|
|
36
36
|
mCameraUpdate = update;
|
|
37
37
|
mDuration = duration;
|
|
38
38
|
mCallback = callback;
|
|
@@ -46,7 +46,7 @@ public class CameraUpdateItem implements RunnableFuture<Void> {
|
|
|
46
46
|
|
|
47
47
|
@Override
|
|
48
48
|
public void run() {
|
|
49
|
-
final
|
|
49
|
+
final MapLibreMap.CancelableCallback callback = new MapLibreMap.CancelableCallback() {
|
|
50
50
|
@Override
|
|
51
51
|
public void onCancel() {
|
|
52
52
|
handleCallbackResponse(true);
|
|
@@ -58,7 +58,7 @@ public class CameraUpdateItem implements RunnableFuture<Void> {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
MapLibreMap map = mMap.get();
|
|
62
62
|
if (map == null) {
|
|
63
63
|
isCameraActionCancelled = true;
|
|
64
64
|
return;
|
|
@@ -71,8 +71,8 @@ public class CameraUpdateItem implements RunnableFuture<Void> {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// On iOS a duration of -1 means default or dynamic duration (based on flight-path length)
|
|
74
|
-
// On Android we can fallback to
|
|
75
|
-
int duration = mDuration < 0 ?
|
|
74
|
+
// On Android we can fallback to MapLibre's default duration as there is no such API
|
|
75
|
+
int duration = mDuration < 0 ? MapLibreConstants.ANIMATION_DURATION : mDuration;
|
|
76
76
|
|
|
77
77
|
if (mCameraMode == CameraMode.FLIGHT) {
|
|
78
78
|
map.animateCamera(mCameraUpdate, duration, callback);
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java
CHANGED
|
@@ -3,21 +3,21 @@ package com.maplibre.rctmln.components.camera;
|
|
|
3
3
|
import android.content.Context;
|
|
4
4
|
import android.location.Location;
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
// import
|
|
6
|
+
import org.maplibre.android.camera.CameraPosition;
|
|
7
|
+
import org.maplibre.android.camera.CameraUpdate;
|
|
8
|
+
import org.maplibre.android.camera.CameraUpdateFactory;
|
|
9
|
+
import org.maplibre.android.geometry.LatLng;
|
|
10
|
+
import org.maplibre.android.geometry.LatLngBounds;
|
|
11
|
+
import org.maplibre.android.geometry.VisibleRegion;
|
|
12
|
+
import org.maplibre.android.location.OnCameraTrackingChangedListener;
|
|
13
|
+
import org.maplibre.android.location.modes.CameraMode;
|
|
14
|
+
import org.maplibre.android.location.modes.RenderMode;
|
|
15
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
16
|
+
import org.maplibre.android.maps.Style;
|
|
17
|
+
import org.maplibre.android.location.LocationComponent;
|
|
18
|
+
import org.maplibre.android.location.LocationComponentOptions;
|
|
19
|
+
import org.maplibre.android.location.LocationComponentActivationOptions;
|
|
20
|
+
// import org.maplibre.android.plugins.locationlayer.LocationLayerPlugin;
|
|
21
21
|
import com.maplibre.rctmln.components.AbstractMapFeature;
|
|
22
22
|
import com.maplibre.rctmln.components.location.LocationComponentManager;
|
|
23
23
|
import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
|
|
@@ -38,9 +38,9 @@ import com.maplibre.rctmln.events.constants.EventTypes;
|
|
|
38
38
|
import com.facebook.react.bridge.WritableMap;
|
|
39
39
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
40
40
|
|
|
41
|
-
import
|
|
41
|
+
import org.maplibre.geojson.Point;
|
|
42
42
|
|
|
43
|
-
import
|
|
43
|
+
import org.maplibre.android.location.permissions.PermissionsManager;
|
|
44
44
|
|
|
45
45
|
import androidx.annotation.NonNull;
|
|
46
46
|
|
|
@@ -96,7 +96,7 @@ public class RCTMLNCamera extends AbstractMapFeature {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
private
|
|
99
|
+
private MapLibreMap.CancelableCallback mCameraCallback = new MapLibreMap.CancelableCallback() {
|
|
100
100
|
@Override
|
|
101
101
|
public void onCancel() {
|
|
102
102
|
if (!hasSentFirstRegion) {
|
|
@@ -170,14 +170,14 @@ public class RCTMLNCamera extends AbstractMapFeature {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
private void updateMaxBounds() {
|
|
173
|
-
|
|
173
|
+
MapLibreMap map = getMapboxMap();
|
|
174
174
|
if (map != null && mMaxBounds != null) {
|
|
175
175
|
map.setLatLngBoundsForCameraTarget(mMaxBounds);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
private void updateMaxMinZoomLevel() {
|
|
180
|
-
|
|
180
|
+
MapLibreMap map = getMapboxMap();
|
|
181
181
|
if (map != null) {
|
|
182
182
|
if (mMinZoomLevel >= 0.0) {
|
|
183
183
|
map.setMinZoomPreference(mMinZoomLevel);
|
|
@@ -281,15 +281,15 @@ public class RCTMLNCamera extends AbstractMapFeature {
|
|
|
281
281
|
|
|
282
282
|
double zoom = mZoomLevel;
|
|
283
283
|
if (zoom < 0) {
|
|
284
|
-
double
|
|
285
|
-
if (
|
|
284
|
+
double cameraZoom = mMapView.getMapboxMap().getCameraPosition().zoom;
|
|
285
|
+
if (cameraZoom < minimumZoomLevelForUserTracking) {
|
|
286
286
|
zoom = defaultZoomLevelForUserTracking;
|
|
287
287
|
} else {
|
|
288
|
-
zoom =
|
|
288
|
+
zoom = cameraZoom;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(getUserLocationUpdateCameraPosition(zoom));
|
|
292
|
-
|
|
292
|
+
MapLibreMap.CancelableCallback cameraCallback = new MapLibreMap.CancelableCallback() {
|
|
293
293
|
@Override
|
|
294
294
|
public void onCancel() {
|
|
295
295
|
mUserTrackingState = UserTrackingState.CHANGED;
|
|
@@ -314,7 +314,7 @@ public class RCTMLNCamera extends AbstractMapFeature {
|
|
|
314
314
|
CameraPosition cameraPosition = mMapView.getCameraPosition();
|
|
315
315
|
CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(getUserLocationUpdateCameraPosition(cameraPosition.zoom));
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
MapLibreMap.CancelableCallback callback = new MapLibreMap.CancelableCallback() {
|
|
318
318
|
@Override
|
|
319
319
|
public void onCancel() {
|
|
320
320
|
mUserTrackingState = UserTrackingState.CHANGED;
|
|
@@ -497,7 +497,7 @@ public class RCTMLNCamera extends AbstractMapFeature {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
|
|
500
|
+
MapLibreMap getMapboxMap() {
|
|
501
501
|
if (mMapView == null) {
|
|
502
502
|
return null;
|
|
503
503
|
}
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
package com.maplibre.rctmln.components.camera;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import org.maplibre.geojson.FeatureCollection;
|
|
4
4
|
import com.facebook.common.logging.FLog;
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
6
6
|
import com.facebook.react.bridge.ReadableMap;
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java
CHANGED
|
@@ -8,9 +8,9 @@ import androidx.annotation.NonNull;
|
|
|
8
8
|
import androidx.annotation.Nullable;
|
|
9
9
|
import androidx.core.content.res.ResourcesCompat;
|
|
10
10
|
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
12
|
+
import org.maplibre.android.maps.Style;
|
|
13
|
+
import org.maplibre.android.utils.BitmapUtils;
|
|
14
14
|
import com.maplibre.rctmln.R;
|
|
15
15
|
import com.maplibre.rctmln.components.AbstractMapFeature;
|
|
16
16
|
import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
|
|
@@ -35,7 +35,7 @@ public class RCTMLNImages extends AbstractMapFeature {
|
|
|
35
35
|
private Map<String, BitmapDrawable> mNativeImages;
|
|
36
36
|
private RCTMLNImagesManager mManager;
|
|
37
37
|
private boolean mSendMissingImageEvents = false;
|
|
38
|
-
private
|
|
38
|
+
private MapLibreMap mMap;
|
|
39
39
|
|
|
40
40
|
protected String mID;
|
|
41
41
|
|
|
@@ -132,7 +132,7 @@ public class RCTMLNImages extends AbstractMapFeature {
|
|
|
132
132
|
return Collections.singletonList((Map.Entry<K,V>)new AbstractMap.SimpleEntry<K, V>(k, v));
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
public boolean addMissingImageToStyle(@NonNull String id, @NonNull
|
|
135
|
+
public boolean addMissingImageToStyle(@NonNull String id, @NonNull MapLibreMap map) {
|
|
136
136
|
if (mNativeImages != null) {
|
|
137
137
|
BitmapDrawable drawable = mNativeImages.get(id);
|
|
138
138
|
if (drawable != null) {
|
|
@@ -151,25 +151,25 @@ public class RCTMLNImages extends AbstractMapFeature {
|
|
|
151
151
|
return false;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
public void addImagesToStyle(Map<String, ImageEntry> images, @NonNull
|
|
154
|
+
public void addImagesToStyle(Map<String, ImageEntry> images, @NonNull MapLibreMap map) {
|
|
155
155
|
if (images != null) {
|
|
156
156
|
addRemoteImages(new ArrayList<>(images.entrySet()), map);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
public void addNativeImagesToStyle(Map<String, BitmapDrawable> images, @NonNull
|
|
160
|
+
public void addNativeImagesToStyle(Map<String, BitmapDrawable> images, @NonNull MapLibreMap map) {
|
|
161
161
|
if (images != null) {
|
|
162
162
|
addNativeImages(new ArrayList<>(images.entrySet()), map);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
public void sendImageMissingEvent(@NonNull String id, @NonNull
|
|
166
|
+
public void sendImageMissingEvent(@NonNull String id, @NonNull MapLibreMap map) {
|
|
167
167
|
if (mSendMissingImageEvents) {
|
|
168
168
|
mManager.handleEvent(ImageMissingEvent.makeImageMissingEvent(this, id));
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
private boolean hasImage(String imageId, @NonNull
|
|
172
|
+
private boolean hasImage(String imageId, @NonNull MapLibreMap map) {
|
|
173
173
|
Style style = map.getStyle();
|
|
174
174
|
return style != null && style.getImage(imageId) != null;
|
|
175
175
|
}
|
|
@@ -182,7 +182,7 @@ public class RCTMLNImages extends AbstractMapFeature {
|
|
|
182
182
|
mapView.getStyle(new Style.OnStyleLoaded() {
|
|
183
183
|
@Override
|
|
184
184
|
public void onStyleLoaded(@NonNull Style style) {
|
|
185
|
-
|
|
185
|
+
MapLibreMap map = mapView.getMapboxMap();
|
|
186
186
|
mMap = map;
|
|
187
187
|
addNativeImagesToStyle(mNativeImages, map);
|
|
188
188
|
addImagesToStyle(mImages, map);
|
|
@@ -191,7 +191,7 @@ public class RCTMLNImages extends AbstractMapFeature {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
private void addNativeImages(@Nullable List<Map.Entry<String, BitmapDrawable>> imageEntries, @NonNull
|
|
194
|
+
private void addNativeImages(@Nullable List<Map.Entry<String, BitmapDrawable>> imageEntries, @NonNull MapLibreMap map) {
|
|
195
195
|
Style style = map.getStyle();
|
|
196
196
|
if (style == null || imageEntries == null) return;
|
|
197
197
|
|
|
@@ -203,7 +203,7 @@ public class RCTMLNImages extends AbstractMapFeature {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
private void addRemoteImages(@Nullable List<Map.Entry<String, ImageEntry>> imageEntries, @NonNull
|
|
206
|
+
private void addRemoteImages(@Nullable List<Map.Entry<String, ImageEntry>> imageEntries, @NonNull MapLibreMap map) {
|
|
207
207
|
Style style = map.getStyle();
|
|
208
208
|
if (style == null || imageEntries == null) return;
|
|
209
209
|
|
|
@@ -3,14 +3,14 @@ package com.maplibre.rctmln.components.location;
|
|
|
3
3
|
import android.annotation.SuppressLint;
|
|
4
4
|
import android.content.Context;
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
6
|
+
import org.maplibre.android.location.LocationComponent;
|
|
7
|
+
import org.maplibre.android.location.LocationComponentActivationOptions;
|
|
8
|
+
import org.maplibre.android.location.LocationComponentOptions;
|
|
9
|
+
import org.maplibre.android.location.OnCameraTrackingChangedListener;
|
|
10
|
+
import org.maplibre.android.location.modes.CameraMode;
|
|
11
|
+
import org.maplibre.android.location.modes.RenderMode;
|
|
12
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
13
|
+
import org.maplibre.android.maps.Style;
|
|
14
14
|
import com.maplibre.rctmln.R;
|
|
15
15
|
import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
|
|
16
16
|
import com.maplibre.rctmln.location.LocationManager;
|
|
@@ -24,7 +24,7 @@ import androidx.annotation.NonNull;
|
|
|
24
24
|
*/
|
|
25
25
|
public class LocationComponentManager {
|
|
26
26
|
private RCTMLNMapView mMapView = null;
|
|
27
|
-
private
|
|
27
|
+
private MapLibreMap mMap = null;
|
|
28
28
|
|
|
29
29
|
private LocationManager mLocationManager = null;
|
|
30
30
|
private LocationComponent mLocationComponent = null;
|
|
@@ -4,17 +4,17 @@ import android.annotation.SuppressLint;
|
|
|
4
4
|
import android.content.Context;
|
|
5
5
|
import androidx.annotation.NonNull;
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
7
|
+
import org.maplibre.android.location.permissions.PermissionsManager;
|
|
8
|
+
import org.maplibre.android.location.modes.RenderMode;
|
|
9
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
10
|
+
import org.maplibre.android.maps.OnMapReadyCallback;
|
|
11
|
+
import org.maplibre.android.maps.Style;
|
|
12
12
|
import com.maplibre.rctmln.components.AbstractMapFeature;
|
|
13
13
|
import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
|
|
14
14
|
|
|
15
15
|
public class RCTMLNNativeUserLocation extends AbstractMapFeature implements OnMapReadyCallback, Style.OnStyleLoaded {
|
|
16
16
|
private boolean mEnabled = true;
|
|
17
|
-
private
|
|
17
|
+
private MapLibreMap mMap;
|
|
18
18
|
private RCTMLNMapView mMapView;
|
|
19
19
|
private @RenderMode.Mode int mRenderMode = RenderMode.COMPASS;
|
|
20
20
|
|
|
@@ -38,7 +38,7 @@ public class RCTMLNNativeUserLocation extends AbstractMapFeature implements OnMa
|
|
|
38
38
|
|
|
39
39
|
@SuppressLint("MissingPermission")
|
|
40
40
|
@Override
|
|
41
|
-
public void onMapReady(@NonNull
|
|
41
|
+
public void onMapReady(@NonNull MapLibreMap mapboxMap) {
|
|
42
42
|
mMap = mapboxMap;
|
|
43
43
|
mapboxMap.getStyle(this);
|
|
44
44
|
}
|
|
@@ -3,7 +3,7 @@ package com.maplibre.rctmln.components.location;
|
|
|
3
3
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
4
4
|
import com.facebook.react.uimanager.ViewGroupManager;
|
|
5
5
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
6
|
-
import
|
|
6
|
+
import org.maplibre.android.location.modes.RenderMode;
|
|
7
7
|
|
|
8
8
|
import javax.annotation.Nonnull;
|
|
9
9
|
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
package com.maplibre.rctmln.components.mapview;
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
3
|
+
import org.maplibre.android.style.layers.CircleLayer;
|
|
4
|
+
import org.maplibre.android.style.layers.FillExtrusionLayer;
|
|
5
|
+
import org.maplibre.android.style.layers.FillLayer;
|
|
6
|
+
import org.maplibre.android.style.layers.HeatmapLayer;
|
|
7
|
+
import org.maplibre.android.style.layers.HillshadeLayer;
|
|
8
|
+
import org.maplibre.android.style.layers.Layer;
|
|
9
|
+
import org.maplibre.android.style.layers.LineLayer;
|
|
10
|
+
import org.maplibre.android.style.layers.RasterLayer;
|
|
11
|
+
import org.maplibre.android.style.layers.SymbolLayer;
|
|
12
12
|
|
|
13
13
|
import javax.annotation.Nullable;
|
|
14
14
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
package com.maplibre.rctmln.components.mapview;
|
|
2
2
|
|
|
3
3
|
import android.content.Context;
|
|
4
|
-
import
|
|
4
|
+
import org.maplibre.android.maps.MapLibreMapOptions;
|
|
5
5
|
/**
|
|
6
6
|
* Created by hernanmateo on 12/11/18.
|
|
7
7
|
*/
|
|
@@ -10,7 +10,7 @@ import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
|
|
|
10
10
|
public class RCTMLNAndroidTextureMapView extends RCTMLNMapView {
|
|
11
11
|
public static final String LOG_TAG = "RCTMLNAndroidTextureMapView";
|
|
12
12
|
|
|
13
|
-
public RCTMLNAndroidTextureMapView(Context context, RCTMLNAndroidTextureMapViewManager manager,
|
|
13
|
+
public RCTMLNAndroidTextureMapView(Context context, RCTMLNAndroidTextureMapViewManager manager, MapLibreMapOptions options) {
|
|
14
14
|
super(context, manager, options);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
package com.maplibre.rctmln.components.mapview;
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
4
|
-
import
|
|
4
|
+
import org.maplibre.android.maps.MapLibreMapOptions;
|
|
5
5
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
6
6
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
7
7
|
|
|
@@ -24,7 +24,7 @@ public class RCTMLNAndroidTextureMapViewManager extends RCTMLNMapViewManager {
|
|
|
24
24
|
|
|
25
25
|
@Override
|
|
26
26
|
protected RCTMLNAndroidTextureMapView createViewInstance(ThemedReactContext themedReactContext) {
|
|
27
|
-
|
|
27
|
+
MapLibreMapOptions options = new MapLibreMapOptions();
|
|
28
28
|
options.textureMode(true);
|
|
29
29
|
return new RCTMLNAndroidTextureMapView(themedReactContext, this, options);
|
|
30
30
|
}
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
CHANGED
|
@@ -17,7 +17,7 @@ import android.view.MotionEvent;
|
|
|
17
17
|
import android.view.View;
|
|
18
18
|
import android.view.ViewGroup;
|
|
19
19
|
import android.widget.FrameLayout;
|
|
20
|
-
import
|
|
20
|
+
import org.maplibre.android.log.Logger;
|
|
21
21
|
|
|
22
22
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
23
23
|
import com.facebook.react.bridge.ReactContext;
|
|
@@ -28,27 +28,27 @@ import com.facebook.react.bridge.WritableMap;
|
|
|
28
28
|
import com.facebook.react.bridge.WritableNativeArray;
|
|
29
29
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
30
30
|
import com.mapbox.android.gestures.MoveGestureDetector;
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
31
|
+
import org.maplibre.geojson.Feature;
|
|
32
|
+
import org.maplibre.geojson.FeatureCollection;
|
|
33
|
+
import org.maplibre.android.camera.CameraPosition;
|
|
34
|
+
import org.maplibre.android.camera.CameraUpdate;
|
|
35
|
+
import org.maplibre.android.geometry.LatLng;
|
|
36
|
+
import org.maplibre.android.geometry.VisibleRegion;
|
|
37
|
+
import org.maplibre.android.maps.AttributionDialogManager;
|
|
38
|
+
import org.maplibre.android.maps.MapView;
|
|
39
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
40
|
+
import org.maplibre.android.maps.MapLibreMapOptions;
|
|
41
|
+
import org.maplibre.android.maps.OnMapReadyCallback;
|
|
42
|
+
import org.maplibre.android.maps.Style;
|
|
43
|
+
import org.maplibre.android.maps.UiSettings;
|
|
44
|
+
import org.maplibre.android.plugins.localization.LocalizationPlugin;
|
|
45
|
+
import org.maplibre.android.plugins.annotation.OnSymbolClickListener;
|
|
46
|
+
import org.maplibre.android.plugins.annotation.OnSymbolDragListener;
|
|
47
|
+
import org.maplibre.android.plugins.annotation.Symbol;
|
|
48
|
+
import org.maplibre.android.plugins.annotation.SymbolManager;
|
|
49
|
+
import org.maplibre.android.style.expressions.Expression;
|
|
50
|
+
import org.maplibre.android.style.layers.Layer;
|
|
51
|
+
import org.maplibre.android.style.layers.Property;
|
|
52
52
|
import com.maplibre.rctmln.R;
|
|
53
53
|
import com.maplibre.rctmln.components.AbstractMapFeature;
|
|
54
54
|
import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation;
|
|
@@ -84,7 +84,7 @@ import org.json.*;
|
|
|
84
84
|
|
|
85
85
|
import javax.annotation.Nullable;
|
|
86
86
|
|
|
87
|
-
import static
|
|
87
|
+
import static org.maplibre.android.style.layers.PropertyFactory.visibility;
|
|
88
88
|
import static com.maplibre.rctmln.modules.RCTMLNOfflineModule.DEFAULT_STYLE_URL;
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -92,11 +92,11 @@ import static com.maplibre.rctmln.modules.RCTMLNOfflineModule.DEFAULT_STYLE_URL;
|
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
94
|
@SuppressWarnings({ "MissingPermission" })
|
|
95
|
-
public class RCTMLNMapView extends MapView implements OnMapReadyCallback,
|
|
96
|
-
|
|
95
|
+
public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLibreMap.OnMapClickListener,
|
|
96
|
+
MapLibreMap.OnMapLongClickListener, MapView.OnCameraIsChangingListener, MapView.OnCameraDidChangeListener,
|
|
97
97
|
MapView.OnDidFailLoadingMapListener, MapView.OnDidFinishLoadingMapListener,
|
|
98
|
-
MapView.OnWillStartRenderingFrameListener, MapView.
|
|
99
|
-
MapView.
|
|
98
|
+
MapView.OnWillStartRenderingFrameListener, MapView.OnWillStartRenderingMapListener,
|
|
99
|
+
MapView.OnDidFinishRenderingFrameListener, MapView.OnDidFinishRenderingMapListener,
|
|
100
100
|
MapView.OnDidFinishLoadingStyleListener, MapView.OnStyleImageMissingListener {
|
|
101
101
|
public static final String LOG_TAG = "RCTMLNMapView";
|
|
102
102
|
|
|
@@ -117,7 +117,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
117
117
|
private CameraChangeTracker mCameraChangeTracker = new CameraChangeTracker();
|
|
118
118
|
private List<Pair<Integer, ReadableArray>> mPreRenderMethods = new ArrayList<>();
|
|
119
119
|
|
|
120
|
-
private
|
|
120
|
+
private MapLibreMap mMap;
|
|
121
121
|
|
|
122
122
|
private LocalizationPlugin mLocalizationPlugin;
|
|
123
123
|
|
|
@@ -156,7 +156,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
156
156
|
|
|
157
157
|
private @Nullable Integer mTintColor = null;
|
|
158
158
|
|
|
159
|
-
public RCTMLNMapView(Context context, RCTMLNMapViewManager manager,
|
|
159
|
+
public RCTMLNMapView(Context context, RCTMLNMapViewManager manager, MapLibreMapOptions options) {
|
|
160
160
|
super(context, options);
|
|
161
161
|
|
|
162
162
|
mContext = context;
|
|
@@ -338,11 +338,11 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
338
338
|
return mMap.getCameraPosition();
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
public void animateCamera(CameraUpdate cameraUpdate,
|
|
341
|
+
public void animateCamera(CameraUpdate cameraUpdate, MapLibreMap.CancelableCallback callback) {
|
|
342
342
|
mMap.animateCamera(cameraUpdate, callback);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
public void moveCamera(CameraUpdate cameraUpdate,
|
|
345
|
+
public void moveCamera(CameraUpdate cameraUpdate, MapLibreMap.CancelableCallback callback) {
|
|
346
346
|
mMap.moveCamera(cameraUpdate, callback);
|
|
347
347
|
}
|
|
348
348
|
|
|
@@ -350,7 +350,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
350
350
|
mMap.moveCamera(cameraUpdate);
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator,
|
|
353
|
+
public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator, MapLibreMap.CancelableCallback callback) {
|
|
354
354
|
mMap.easeCamera(cameraUpdate, duration, easingInterpolator, callback);
|
|
355
355
|
}
|
|
356
356
|
|
|
@@ -386,7 +386,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
386
386
|
return null;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
public
|
|
389
|
+
public MapLibreMap getMapboxMap() {
|
|
390
390
|
return mMap;
|
|
391
391
|
}
|
|
392
392
|
|
|
@@ -437,7 +437,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
437
437
|
|
|
438
438
|
|
|
439
439
|
@Override
|
|
440
|
-
public void onMapReady(final
|
|
440
|
+
public void onMapReady(final MapLibreMap mapboxMap) {
|
|
441
441
|
mMap = mapboxMap;
|
|
442
442
|
|
|
443
443
|
if (isJSONValid(mStyleURL)) {
|
|
@@ -463,14 +463,14 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
463
463
|
updateInsets();
|
|
464
464
|
updateUISettings();
|
|
465
465
|
|
|
466
|
-
mMap.addOnCameraIdleListener(new
|
|
466
|
+
mMap.addOnCameraIdleListener(new MapLibreMap.OnCameraIdleListener() {
|
|
467
467
|
@Override
|
|
468
468
|
public void onCameraIdle() {
|
|
469
469
|
sendRegionDidChangeEvent();
|
|
470
470
|
}
|
|
471
471
|
});
|
|
472
472
|
|
|
473
|
-
mMap.addOnCameraMoveStartedListener(new
|
|
473
|
+
mMap.addOnCameraMoveStartedListener(new MapLibreMap.OnCameraMoveStartedListener() {
|
|
474
474
|
@Override
|
|
475
475
|
public void onCameraMoveStarted(int reason) {
|
|
476
476
|
mCameraChangeTracker.setReason(reason);
|
|
@@ -478,7 +478,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
478
478
|
}
|
|
479
479
|
});
|
|
480
480
|
|
|
481
|
-
mMap.addOnCameraMoveListener(new
|
|
481
|
+
mMap.addOnCameraMoveListener(new MapLibreMap.OnCameraMoveListener() {
|
|
482
482
|
@Override
|
|
483
483
|
public void onCameraMove() {
|
|
484
484
|
if (markerViewManager != null) {
|
|
@@ -487,7 +487,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
|
|
490
|
-
mMap.addOnMoveListener(new
|
|
490
|
+
mMap.addOnMoveListener(new MapLibreMap.OnMoveListener() {
|
|
491
491
|
@Override
|
|
492
492
|
public void onMoveBegin(MoveGestureDetector detector) {
|
|
493
493
|
mCameraChangeTracker.setReason(CameraChangeTracker.USER_GESTURE);
|
|
@@ -732,7 +732,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
732
732
|
}
|
|
733
733
|
|
|
734
734
|
@Override
|
|
735
|
-
public void onDidFinishRenderingFrame(boolean fully) {
|
|
735
|
+
public void onDidFinishRenderingFrame(boolean fully, double frameEncodingTime, double frameRenderingTime) {
|
|
736
736
|
if (fully) {
|
|
737
737
|
handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_FRAME_FULLY);
|
|
738
738
|
} else {
|
|
@@ -848,7 +848,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
848
848
|
if (position == null) {
|
|
849
849
|
// reset from explicit to default
|
|
850
850
|
if (mLogoGravity != null) {
|
|
851
|
-
|
|
851
|
+
MapLibreMapOptions defaultOptions = MapLibreMapOptions.createFromAttributes(mContext);
|
|
852
852
|
mLogoGravity = defaultOptions.getLogoGravity();
|
|
853
853
|
mLogoMargins = Arrays.copyOf(defaultOptions.getLogoMargins(), 4);
|
|
854
854
|
updateUISettings();
|
|
@@ -903,7 +903,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
903
903
|
if (position == null) {
|
|
904
904
|
// reset from explicit to default
|
|
905
905
|
if (mAttributionGravity != null) {
|
|
906
|
-
|
|
906
|
+
MapLibreMapOptions defaultOptions = MapLibreMapOptions.createFromAttributes(mContext);
|
|
907
907
|
mAttributionGravity = defaultOptions.getAttributionGravity();
|
|
908
908
|
mAttributionMargin = Arrays.copyOf(defaultOptions.getAttributionMargins(), 4);
|
|
909
909
|
updateUISettings();
|
|
@@ -1016,7 +1016,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
1016
1016
|
throw new Error("takeSnap should only be called after the map has rendered");
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
|
-
mMap.snapshot(new
|
|
1019
|
+
mMap.snapshot(new MapLibreMap.SnapshotReadyCallback() {
|
|
1020
1020
|
@Override
|
|
1021
1021
|
public void onSnapshotReady(Bitmap snapshot) {
|
|
1022
1022
|
WritableMap payload = new WritableNativeMap();
|
|
@@ -1496,7 +1496,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox
|
|
|
1496
1496
|
return mOffscreenAnnotationViewContainer;
|
|
1497
1497
|
}
|
|
1498
1498
|
|
|
1499
|
-
public MarkerViewManager getMarkerViewManager(
|
|
1499
|
+
public MarkerViewManager getMarkerViewManager(MapLibreMap map) {
|
|
1500
1500
|
if (markerViewManager == null) {
|
|
1501
1501
|
if (map == null) {
|
|
1502
1502
|
throw new Error("makerViewManager should be called one the map has loaded");
|