@maplibre/maplibre-react-native 10.0.0-alpha.7 → 10.0.0-alpha.9
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- 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 +1 -1
- package/docs/MapView.md +9 -9
- package/docs/MarkerView.md +1 -1
- package/docs/NativeUserLocation.md +1 -1
- package/docs/PointAnnotation.md +2 -2
- package/docs/UserLocation.md +2 -2
- package/docs/docs.json +12 -12
- package/javascript/@types/assets.d.ts +1 -1
- package/javascript/MLNModule.ts +2 -2
- package/javascript/Maplibre.ts +37 -42
- package/javascript/components/BackgroundLayer.tsx +9 -9
- package/javascript/components/Callout.tsx +19 -19
- package/javascript/components/Camera.tsx +29 -29
- package/javascript/components/CircleLayer.tsx +9 -9
- package/javascript/components/FillExtrusionLayer.tsx +9 -9
- package/javascript/components/FillLayer.tsx +9 -9
- package/javascript/components/HeadingIndicator.tsx +7 -8
- package/javascript/components/HeatmapLayer.tsx +10 -10
- package/javascript/components/ImageSource.tsx +8 -8
- package/javascript/components/Images.tsx +19 -20
- package/javascript/components/Light.tsx +15 -15
- package/javascript/components/LineLayer.tsx +9 -9
- package/javascript/components/MapView.tsx +74 -70
- package/javascript/components/MarkerView.tsx +9 -10
- package/javascript/components/NativeUserLocation.tsx +4 -4
- package/javascript/components/PointAnnotation.tsx +17 -17
- package/javascript/components/RasterLayer.tsx +9 -9
- package/javascript/components/RasterSource.tsx +10 -10
- package/javascript/components/ShapeSource.tsx +63 -61
- package/javascript/components/Style.tsx +69 -59
- package/javascript/components/SymbolLayer.tsx +10 -10
- package/javascript/components/UserLocation.tsx +23 -23
- package/javascript/components/VectorSource.tsx +19 -19
- package/javascript/components/annotations/Annotation.tsx +16 -15
- package/javascript/hooks/useAbstractLayer.ts +15 -12
- package/javascript/hooks/useAbstractSource.ts +2 -2
- package/javascript/hooks/useNativeBridge.ts +7 -7
- package/javascript/hooks/useNativeRef.ts +2 -2
- package/javascript/hooks/useOnce.ts +1 -1
- package/javascript/index.ts +2 -2
- package/javascript/modules/location/locationManager.ts +4 -4
- package/javascript/modules/offline/OfflineCreatePackOptions.ts +5 -5
- package/javascript/modules/offline/OfflinePack.ts +3 -3
- package/javascript/modules/offline/offlineManager.ts +11 -12
- package/javascript/modules/snapshot/SnapshotOptions.ts +4 -4
- package/javascript/modules/snapshot/snapshotManager.ts +2 -2
- package/javascript/requestAndroidLocationPermissions.ts +3 -3
- package/javascript/types/OnPressEvent.ts +1 -1
- package/javascript/types/index.ts +6 -2
- package/javascript/utils/BridgeValue.ts +20 -20
- package/javascript/utils/Logger.ts +14 -14
- package/javascript/utils/MaplibreStyles.d.ts +359 -359
- package/javascript/utils/StyleValue.ts +12 -12
- package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +6 -6
- package/javascript/utils/animated/Animated.ts +38 -16
- package/javascript/utils/animated/AnimatedCoordinatesArray.ts +7 -11
- package/javascript/utils/animated/AnimatedExtractCoordinateFromArray.ts +3 -3
- package/javascript/utils/animated/AnimatedPoint.ts +7 -7
- package/javascript/utils/animated/AnimatedRouteCoordinatesArray.ts +16 -20
- package/javascript/utils/animated/AnimatedShape.ts +15 -15
- package/javascript/utils/deprecation.ts +6 -3
- package/javascript/utils/filterUtils.ts +1 -1
- package/javascript/utils/geoUtils.ts +8 -8
- package/javascript/utils/index.ts +14 -14
- package/javascript/utils/styleMap.ts +18 -18
- package/package.json +28 -15
- package/plugin/build/withMapLibre.d.ts +2 -2
- package/plugin/build/withMapLibre.js +24 -24
- package/scripts/autogenerate.js +1 -1
- package/scripts/templates/RCTMLNStyleFactory.java.ejs +14 -14
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -169
- package/.prettierrc.js +0 -7
- package/.yarn/sdks/eslint/bin/eslint.js +0 -27
- package/.yarn/sdks/eslint/lib/api.js +0 -27
- package/.yarn/sdks/eslint/lib/unsupported-api.js +0 -27
- package/.yarn/sdks/eslint/package.json +0 -14
- package/.yarn/sdks/integrations.yml +0 -5
- package/.yarn/sdks/prettier/bin/prettier.cjs +0 -27
- package/.yarn/sdks/prettier/index.cjs +0 -27
- package/.yarn/sdks/prettier/package.json +0 -7
- package/.yarn/sdks/typescript/bin/tsc +0 -27
- package/.yarn/sdks/typescript/bin/tsserver +0 -27
- package/.yarn/sdks/typescript/lib/tsc.js +0 -27
- package/.yarn/sdks/typescript/lib/tsserver.js +0 -239
- package/.yarn/sdks/typescript/lib/tsserverlibrary.js +0 -239
- package/.yarn/sdks/typescript/lib/typescript.js +0 -27
- package/.yarn/sdks/typescript/package.json +0 -10
package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java
CHANGED
|
@@ -8,12 +8,12 @@ import android.view.View;
|
|
|
8
8
|
|
|
9
9
|
import com.facebook.react.bridge.ReadableMap;
|
|
10
10
|
import com.facebook.react.common.MapBuilder;
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
11
|
+
import org.maplibre.geojson.Feature;
|
|
12
|
+
import org.maplibre.android.geometry.LatLng;
|
|
13
|
+
import org.maplibre.android.log.Logger;
|
|
14
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
15
|
+
import org.maplibre.android.maps.Style;
|
|
16
|
+
import org.maplibre.android.style.sources.Source;
|
|
17
17
|
import com.maplibre.rctmln.components.AbstractMapFeature;
|
|
18
18
|
import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
|
|
19
19
|
import com.maplibre.rctmln.components.styles.layers.RCTLayer;
|
|
@@ -35,7 +35,7 @@ public abstract class RCTSource<T extends Source> extends AbstractMapFeature {
|
|
|
35
35
|
public static final double DEFAULT_HITBOX_HEIGHT = 44.0;
|
|
36
36
|
|
|
37
37
|
protected RCTMLNMapView mMapView;
|
|
38
|
-
protected
|
|
38
|
+
protected MapLibreMap mMap;
|
|
39
39
|
|
|
40
40
|
protected String mID;
|
|
41
41
|
protected T mSource;
|
|
@@ -6,8 +6,8 @@ import android.view.View;
|
|
|
6
6
|
import com.facebook.react.bridge.Arguments;
|
|
7
7
|
import com.facebook.react.bridge.WritableArray;
|
|
8
8
|
import com.facebook.react.bridge.WritableMap;
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import org.maplibre.geojson.Feature;
|
|
10
|
+
import org.maplibre.android.geometry.LatLng;
|
|
11
11
|
import com.maplibre.rctmln.components.styles.sources.RCTSource;
|
|
12
12
|
import com.maplibre.rctmln.events.constants.EventKeys;
|
|
13
13
|
import com.maplibre.rctmln.events.constants.EventTypes;
|
|
@@ -6,7 +6,7 @@ import android.view.View;
|
|
|
6
6
|
|
|
7
7
|
import com.facebook.react.bridge.WritableMap;
|
|
8
8
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
9
|
-
import
|
|
9
|
+
import org.maplibre.android.geometry.LatLng;
|
|
10
10
|
|
|
11
11
|
import com.maplibre.rctmln.events.constants.EventKeys;
|
|
12
12
|
import com.maplibre.rctmln.events.constants.EventTypes;
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java
CHANGED
|
@@ -6,8 +6,8 @@ import android.view.View;
|
|
|
6
6
|
|
|
7
7
|
import com.facebook.react.bridge.WritableMap;
|
|
8
8
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import org.maplibre.android.plugins.markerview.MarkerView;
|
|
10
|
+
import org.maplibre.android.geometry.LatLng;
|
|
11
11
|
import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation;
|
|
12
12
|
import com.maplibre.rctmln.events.constants.EventKeys;
|
|
13
13
|
import com.maplibre.rctmln.events.constants.EventTypes;
|
package/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java
CHANGED
|
@@ -6,8 +6,8 @@ import android.view.View;
|
|
|
6
6
|
|
|
7
7
|
import com.facebook.react.bridge.WritableMap;
|
|
8
8
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import org.maplibre.android.plugins.markerview.MarkerView;
|
|
10
|
+
import org.maplibre.android.geometry.LatLng;
|
|
11
11
|
import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation;
|
|
12
12
|
import com.maplibre.rctmln.events.constants.EventKeys;
|
|
13
13
|
import com.maplibre.rctmln.events.constants.EventTypes;
|
|
@@ -5,18 +5,18 @@ import android.location.Location;
|
|
|
5
5
|
import android.os.Looper;
|
|
6
6
|
import android.util.Log;
|
|
7
7
|
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import org.maplibre.android.location.engine.LocationEngine;
|
|
9
|
+
import org.maplibre.android.location.engine.LocationEngineCallback;
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
import com.mapbox.android.core.location.LocationEngineListener;
|
|
13
13
|
import com.mapbox.android.core.location.LocationEnginePriority;
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
16
|
+
import org.maplibre.android.location.engine.LocationEngineDefault;
|
|
17
|
+
import org.maplibre.android.location.engine.LocationEngineRequest;
|
|
18
|
+
import org.maplibre.android.location.engine.LocationEngineResult;
|
|
19
|
+
import org.maplibre.android.location.permissions.PermissionsManager;
|
|
20
20
|
|
|
21
21
|
import java.lang.ref.WeakReference;
|
|
22
22
|
import java.util.ArrayList;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
package com.maplibre.rctmln.location;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
import
|
|
4
|
+
import org.maplibre.android.plugins.locationlayer.modes.RenderMode;
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import org.maplibre.android.location.modes.CameraMode;
|
|
8
|
+
import org.maplibre.android.location.modes.RenderMode;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Created by nickitaliano on 12/13/17.
|
|
@@ -10,8 +10,8 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
|
10
10
|
import com.facebook.react.bridge.ReactMethod;
|
|
11
11
|
import com.facebook.react.module.annotations.ReactModule;
|
|
12
12
|
import com.facebook.react.modules.core.RCTNativeAppEventEmitter;
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import org.maplibre.android.location.engine.LocationEngineCallback;
|
|
14
|
+
import org.maplibre.android.location.engine.LocationEngineResult;
|
|
15
15
|
import com.maplibre.rctmln.events.EventEmitter;
|
|
16
16
|
import com.maplibre.rctmln.events.LocationEvent;
|
|
17
17
|
import com.maplibre.rctmln.location.LocationManager;
|
|
@@ -7,8 +7,8 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
7
7
|
import com.facebook.react.bridge.WritableMap;
|
|
8
8
|
import com.facebook.react.module.annotations.ReactModule;
|
|
9
9
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import org.maplibre.android.log.Logger;
|
|
11
|
+
import org.maplibre.android.log.LoggerDefinition;
|
|
12
12
|
import android.util.Log;
|
|
13
13
|
|
|
14
14
|
@ReactModule(name = RCTMLNLogging.REACT_CLASS)
|
|
@@ -9,9 +9,9 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
|
9
9
|
import com.facebook.react.bridge.ReactMethod;
|
|
10
10
|
import com.facebook.react.common.MapBuilder;
|
|
11
11
|
import com.facebook.react.module.annotations.ReactModule;
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import org.maplibre.android.MapLibre;
|
|
13
|
+
import org.maplibre.android.WellKnownTileServer;
|
|
14
|
+
import org.maplibre.android.style.layers.Property;
|
|
15
15
|
import com.maplibre.rctmln.components.camera.constants.CameraMode;
|
|
16
16
|
import com.maplibre.rctmln.components.styles.RCTMLNStyleValue;
|
|
17
17
|
import com.maplibre.rctmln.components.styles.sources.RCTSource;
|
|
@@ -23,7 +23,7 @@ import com.maplibre.rctmln.location.UserTrackingMode;
|
|
|
23
23
|
import okhttp3.Dispatcher;
|
|
24
24
|
import okhttp3.OkHttpClient;
|
|
25
25
|
|
|
26
|
-
import
|
|
26
|
+
import org.maplibre.android.module.http.HttpRequestUtil;
|
|
27
27
|
|
|
28
28
|
import java.util.HashMap;
|
|
29
29
|
import java.util.Map;
|
|
@@ -281,9 +281,9 @@ public class RCTMLNModule extends ReactContextBaseJavaModule {
|
|
|
281
281
|
@Override
|
|
282
282
|
public void run() {
|
|
283
283
|
if (accessToken == null) {
|
|
284
|
-
|
|
284
|
+
MapLibre.getInstance(getReactApplicationContext());
|
|
285
285
|
} else {
|
|
286
|
-
|
|
286
|
+
MapLibre.getInstance(getReactApplicationContext(), accessToken, WellKnownTileServer.Mapbox);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
});
|
|
@@ -320,7 +320,7 @@ public class RCTMLNModule extends ReactContextBaseJavaModule {
|
|
|
320
320
|
// TODO: How to handle this? Underlying API has changed significantly on Android
|
|
321
321
|
@ReactMethod
|
|
322
322
|
public void getAccessToken(Promise promise) {
|
|
323
|
-
String token =
|
|
323
|
+
String token = MapLibre.getApiKey();
|
|
324
324
|
if(token == null) {
|
|
325
325
|
promise.reject("missing_access_token", "No access token has been set");
|
|
326
326
|
} else {
|
|
@@ -333,7 +333,7 @@ public class RCTMLNModule extends ReactContextBaseJavaModule {
|
|
|
333
333
|
mReactContext.runOnUiQueueThread(new Runnable() {
|
|
334
334
|
@Override
|
|
335
335
|
public void run() {
|
|
336
|
-
|
|
336
|
+
MapLibre.setConnected(connected);
|
|
337
337
|
}
|
|
338
338
|
});
|
|
339
339
|
}
|
|
@@ -8,22 +8,22 @@ import android.util.Log;
|
|
|
8
8
|
import com.facebook.react.bridge.*;
|
|
9
9
|
import com.facebook.react.module.annotations.ReactModule;
|
|
10
10
|
import com.facebook.react.modules.core.RCTNativeAppEventEmitter;
|
|
11
|
-
import
|
|
12
|
-
// import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
11
|
+
import org.maplibre.geojson.FeatureCollection;
|
|
12
|
+
// import org.maplibre.android.constants.Style;
|
|
13
|
+
import org.maplibre.android.geometry.LatLngBounds;
|
|
14
|
+
import org.maplibre.android.offline.OfflineManager;
|
|
15
|
+
import org.maplibre.android.offline.OfflineRegion;
|
|
16
|
+
import org.maplibre.android.offline.OfflineRegionDefinition;
|
|
17
|
+
import org.maplibre.android.offline.OfflineRegionError;
|
|
18
|
+
import org.maplibre.android.offline.OfflineRegionStatus;
|
|
19
|
+
import org.maplibre.android.offline.OfflineTilePyramidRegionDefinition;
|
|
20
|
+
import org.maplibre.android.storage.FileSource;
|
|
21
21
|
import com.maplibre.rctmln.events.IEvent;
|
|
22
22
|
import com.maplibre.rctmln.events.OfflineEvent;
|
|
23
23
|
import com.maplibre.rctmln.events.constants.EventTypes;
|
|
24
24
|
import com.maplibre.rctmln.utils.ConvertUtils;
|
|
25
25
|
import com.maplibre.rctmln.utils.GeoJSONUtils;
|
|
26
|
-
import
|
|
26
|
+
import org.maplibre.android.maps.Style;
|
|
27
27
|
|
|
28
28
|
import org.json.JSONException;
|
|
29
29
|
import org.json.JSONObject;
|
|
@@ -16,13 +16,13 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
|
16
16
|
import com.facebook.react.bridge.ReactMethod;
|
|
17
17
|
import com.facebook.react.bridge.ReadableMap;
|
|
18
18
|
import com.facebook.react.module.annotations.ReactModule;
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
19
|
+
import org.maplibre.geojson.Feature;
|
|
20
|
+
import org.maplibre.geojson.FeatureCollection;
|
|
21
|
+
import org.maplibre.geojson.Point;
|
|
22
|
+
import org.maplibre.android.camera.CameraPosition;
|
|
23
|
+
import org.maplibre.android.snapshotter.MapSnapshot;
|
|
24
|
+
import org.maplibre.android.snapshotter.MapSnapshotter;
|
|
25
|
+
import org.maplibre.android.storage.FileSource;
|
|
26
26
|
import com.maplibre.rctmln.utils.BitmapUtils;
|
|
27
27
|
import com.maplibre.rctmln.utils.GeoJSONUtils;
|
|
28
28
|
|
|
@@ -20,8 +20,8 @@ import com.facebook.imagepipeline.image.CloseableStaticBitmap;
|
|
|
20
20
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
21
21
|
import com.facebook.imagepipeline.request.ImageRequestBuilder;
|
|
22
22
|
import com.facebook.react.views.imagehelper.ImageSource;
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
24
|
+
import org.maplibre.android.maps.Style;
|
|
25
25
|
|
|
26
26
|
import java.io.File;
|
|
27
27
|
import java.lang.ref.WeakReference;
|
|
@@ -41,12 +41,12 @@ public class DownloadMapImageTask extends AsyncTask<Map.Entry<String, ImageEntry
|
|
|
41
41
|
public static final String LOG_TAG = "DownloadMapImageTask";
|
|
42
42
|
|
|
43
43
|
private WeakReference<Context> mContext;
|
|
44
|
-
private WeakReference<
|
|
44
|
+
private WeakReference<MapLibreMap> mMap;
|
|
45
45
|
@Nullable
|
|
46
46
|
private OnAllImagesLoaded mCallback;
|
|
47
47
|
private final Object mCallerContext;
|
|
48
48
|
|
|
49
|
-
public DownloadMapImageTask(Context context,
|
|
49
|
+
public DownloadMapImageTask(Context context, MapLibreMap map, @Nullable OnAllImagesLoaded callback) {
|
|
50
50
|
mContext = new WeakReference<>(context.getApplicationContext());
|
|
51
51
|
mMap = new WeakReference<>(map);
|
|
52
52
|
mCallback = callback;
|
|
@@ -130,7 +130,7 @@ public class DownloadMapImageTask extends AsyncTask<Map.Entry<String, ImageEntry
|
|
|
130
130
|
|
|
131
131
|
@Override
|
|
132
132
|
protected void onPostExecute(List<Map.Entry<String, Bitmap>> images) {
|
|
133
|
-
|
|
133
|
+
MapLibreMap map = mMap.get();
|
|
134
134
|
if (map != null && images != null && images.size() > 0) {
|
|
135
135
|
Style style = map.getStyle();
|
|
136
136
|
if (style != null) {
|
|
@@ -4,8 +4,8 @@ import com.facebook.react.bridge.Dynamic;
|
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray;
|
|
5
5
|
import com.facebook.react.bridge.ReadableMap;
|
|
6
6
|
import com.google.gson.JsonArray;
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import org.maplibre.android.style.expressions.Expression;
|
|
8
|
+
import org.maplibre.android.style.expressions.Expression.Converter;
|
|
9
9
|
|
|
10
10
|
import org.json.JSONArray;
|
|
11
11
|
|
|
@@ -6,19 +6,19 @@ import com.facebook.react.bridge.WritableArray;
|
|
|
6
6
|
import com.facebook.react.bridge.WritableMap;
|
|
7
7
|
import com.facebook.react.bridge.WritableNativeArray;
|
|
8
8
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
9
|
+
import org.maplibre.geojson.Feature;
|
|
10
|
+
import org.maplibre.geojson.FeatureCollection;
|
|
11
|
+
import org.maplibre.geojson.Geometry;
|
|
12
|
+
import org.maplibre.geojson.GeometryCollection;
|
|
13
|
+
import org.maplibre.geojson.LineString;
|
|
14
|
+
import org.maplibre.geojson.MultiPoint;
|
|
15
|
+
import org.maplibre.geojson.Point;
|
|
16
|
+
import org.maplibre.geojson.Polygon;
|
|
17
|
+
import org.maplibre.android.geometry.LatLng;
|
|
18
|
+
import org.maplibre.android.geometry.LatLngBounds;
|
|
19
|
+
import org.maplibre.android.geometry.LatLngQuad;
|
|
20
|
+
import org.maplibre.android.style.light.Position;
|
|
21
|
+
import org.maplibre.turf.TurfMeasurement;
|
|
22
22
|
|
|
23
23
|
import java.util.ArrayList;
|
|
24
24
|
import java.util.List;
|
|
@@ -2,9 +2,9 @@ package com.maplibre.rctmln.utils;
|
|
|
2
2
|
|
|
3
3
|
import android.graphics.PointF;
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import org.maplibre.android.geometry.LatLng;
|
|
6
|
+
import org.maplibre.android.geometry.LatLngBounds;
|
|
7
|
+
import org.maplibre.android.geometry.VisibleRegion;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Created by nickitaliano on 1/5/18.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
package com.maplibre.rctmln.utils;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import org.maplibre.android.maps.MapLibreMap;
|
|
4
4
|
|
|
5
5
|
import com.maplibre.rctmln.components.AbstractEventEmitter;
|
|
6
6
|
import com.maplibre.rctmln.events.IEvent;
|
|
@@ -9,7 +9,7 @@ import com.maplibre.rctmln.events.IEvent;
|
|
|
9
9
|
* Created by nickitaliano on 8/31/17.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
public class SimpleEventCallback implements
|
|
12
|
+
public class SimpleEventCallback implements MapLibreMap.CancelableCallback {
|
|
13
13
|
private AbstractEventEmitter mEventEmitter;
|
|
14
14
|
private IEvent mEvent;
|
|
15
15
|
|
package/docs/Camera.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| zoomLevel | `number` | `none` | `false` | The zoom level of the map. |
|
|
13
13
|
| padding | `CameraPadding` | `none` | `false` | The viewport padding in points. |
|
|
14
14
|
| animationDuration | `number` | `2000` | `false` | The duration the map takes to animate to a new configuration. |
|
|
15
|
-
| animationMode | `
|
|
15
|
+
| animationMode | `"flyTo" \| "easeTo" \| "linearTo" \| "moveTo"` | `"easeTo"` | `false` | The easing or path the camera uses to animate to a new configuration. |
|
|
16
16
|
| allowUpdates | `boolean` | `true` | `false` | If false, the camera will not send any props to the native module. Intended to be used to prevent unnecessary tile fetching and improve performance when the map is not visible. Defaults to true. |
|
|
17
17
|
| defaultSettings | `CameraStop` | `none` | `false` | Default view settings applied on camera |
|
|
18
18
|
| minZoomLevel | `number` | `none` | `false` | The minimun zoom level of the map |
|
package/docs/MapView.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| contentInset | `number[] \| number` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
|
|
9
|
-
| style | `ViewProps[
|
|
9
|
+
| style | `ViewProps["style"]` | `none` | `false` | Style for wrapping React Native View |
|
|
10
10
|
| styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.Default` |
|
|
11
11
|
| styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec |
|
|
12
12
|
| preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.<br/>The default value for this property is MLNMapViewPreferredFramesPerSecondDefault,<br/>which will adaptively set the preferred frame rate based on the capability of<br/>the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.<br/><br/>Android: The maximum frame rate at which the map view is rendered, but it can't excess the ability of device hardware.<br/>This property can be set to arbitrary integer values. |
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
| pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
|
|
17
17
|
| rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
|
|
18
18
|
| 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 | `\| {top?: number; left?: number}
|
|
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 |
|
|
19
|
+
| attributionPosition | `\| { top?: number; left?: number }
|
|
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 |
|
|
23
23
|
| tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
|
|
24
24
|
| logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. |
|
|
25
|
-
| logoPosition | `\| {top?: number; left?: number}
|
|
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 |
|
|
25
|
+
| logoPosition | `\| { top?: number; left?: number }
|
|
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 |
|
|
29
29
|
| compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
|
|
30
30
|
| compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
|
|
31
31
|
| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |
|
package/docs/MarkerView.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
|
|
9
|
-
| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
9
|
+
| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
10
10
|
| x | `number` | `none` | `true` | `x` of anchor |
|
|
11
11
|
| y | `number` | `none` | `true` | `y` of anchor |
|
|
12
12
|
| allowOverlap | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
### props
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
|
-
| androidRenderMode | `
|
|
8
|
+
| androidRenderMode | `"normal" \| "compass" \| "gps"` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
|
|
9
9
|
| iosShowsUserHeadingIndicator | `boolean` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.<br/><br/>@platform ios |
|
|
10
10
|
|
|
11
11
|
|
package/docs/PointAnnotation.md
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
| selected | `boolean` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} |
|
|
12
12
|
| draggable | `boolean` | `false` | `false` | Enable or disable dragging. Defaults to false. |
|
|
13
13
|
| coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
|
|
14
|
-
| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
14
|
+
| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
|
|
15
15
|
| x | `number` | `none` | `true` | See anchor |
|
|
16
16
|
| y | `number` | `none` | `true` | See anchor |
|
|
17
17
|
| children | `React.ReactElement \| [React.ReactElement, React.ReactElement]` | `none` | `true` | Expects one child, and an optional callout can be added as well |
|
|
18
|
-
| style | `ViewProps[
|
|
18
|
+
| style | `ViewProps["style"]` | `none` | `false` | FIX ME NO DESCRIPTION |
|
|
19
19
|
|
|
20
20
|
### methods
|
|
21
21
|
#### refresh()
|
package/docs/UserLocation.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
| Prop | Type | Default | Required | Description |
|
|
7
7
|
| ---- | :--: | :-----: | :------: | :----------: |
|
|
8
8
|
| animated | `boolean` | `true` | `false` | Whether location icon is animated between updates |
|
|
9
|
-
| renderMode | `
|
|
10
|
-
| androidRenderMode | `
|
|
9
|
+
| renderMode | `"normal" \| "native"` | `"normal"` | `false` | Which render mode to use.<br/>Can either be `normal` or `native` |
|
|
10
|
+
| androidRenderMode | `"normal" \| "compass" \| "gps"` | `none` | `false` | native/android only render mode<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
|
|
11
11
|
| visible | `boolean` | `true` | `false` | Whether location icon is visible |
|
|
12
12
|
| showsUserHeadingIndicator | `boolean` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. |
|
|
13
13
|
| minDisplacement | `number` | `0` | `false` | Minimum amount of movement before GPS location is updated in meters |
|
package/docs/docs.json
CHANGED
|
@@ -477,8 +477,8 @@
|
|
|
477
477
|
{
|
|
478
478
|
"name": "animationMode",
|
|
479
479
|
"required": false,
|
|
480
|
-
"type": "
|
|
481
|
-
"default": "
|
|
480
|
+
"type": "\"flyTo\" \\| \"easeTo\" \\| \"linearTo\" \\| \"moveTo\"",
|
|
481
|
+
"default": "\"easeTo\"",
|
|
482
482
|
"description": "The easing or path the camera uses to animate to a new configuration."
|
|
483
483
|
},
|
|
484
484
|
{
|
|
@@ -2415,7 +2415,7 @@
|
|
|
2415
2415
|
{
|
|
2416
2416
|
"name": "style",
|
|
2417
2417
|
"required": false,
|
|
2418
|
-
"type": "ViewProps[
|
|
2418
|
+
"type": "ViewProps[\"style\"]",
|
|
2419
2419
|
"default": "none",
|
|
2420
2420
|
"description": "Style for wrapping React Native View"
|
|
2421
2421
|
},
|
|
@@ -2485,7 +2485,7 @@
|
|
|
2485
2485
|
{
|
|
2486
2486
|
"name": "attributionPosition",
|
|
2487
2487
|
"required": false,
|
|
2488
|
-
"type": "\\| {top?: number; left?: number}\n\\| {top?: number; right?: number}\n\\| {bottom?: number; left?: number}\n\\| {bottom?: number; right?: number}",
|
|
2488
|
+
"type": "\\| { top?: number; left?: number }\n\\| { top?: number; right?: number }\n\\| { bottom?: number; left?: number }\n\\| { bottom?: number; right?: number }",
|
|
2489
2489
|
"default": "none",
|
|
2490
2490
|
"description": "Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map"
|
|
2491
2491
|
},
|
|
@@ -2506,7 +2506,7 @@
|
|
|
2506
2506
|
{
|
|
2507
2507
|
"name": "logoPosition",
|
|
2508
2508
|
"required": false,
|
|
2509
|
-
"type": "\\| {top?: number; left?: number}\n\\| {top?: number; right?: number}\n\\| {bottom?: number; left?: number}\n\\| {bottom?: number; right?: number}",
|
|
2509
|
+
"type": "\\| { top?: number; left?: number }\n\\| { top?: number; right?: number }\n\\| { bottom?: number; left?: number }\n\\| { bottom?: number; right?: number }",
|
|
2510
2510
|
"default": "none",
|
|
2511
2511
|
"description": "Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map"
|
|
2512
2512
|
},
|
|
@@ -2610,7 +2610,7 @@
|
|
|
2610
2610
|
}
|
|
2611
2611
|
]
|
|
2612
2612
|
},
|
|
2613
|
-
"default": "{x: 0.5, y: 0.5}",
|
|
2613
|
+
"default": "{ x: 0.5, y: 0.5 }",
|
|
2614
2614
|
"description": "Specifies the anchor being set on a particular point of the annotation.\nThe anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],\nwhere (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.\nNote this is only for custom annotations not the default pin view.\nDefaults to the center of the view."
|
|
2615
2615
|
},
|
|
2616
2616
|
{
|
|
@@ -2649,7 +2649,7 @@
|
|
|
2649
2649
|
{
|
|
2650
2650
|
"name": "androidRenderMode",
|
|
2651
2651
|
"required": false,
|
|
2652
|
-
"type": "
|
|
2652
|
+
"type": "\"normal\" \\| \"compass\" \\| \"gps\"",
|
|
2653
2653
|
"default": "none",
|
|
2654
2654
|
"description": "Android render mode.\n\n - normal: just a circle\n - compass: triangle with heading\n - gps: large arrow\n\n@platform android"
|
|
2655
2655
|
},
|
|
@@ -2747,7 +2747,7 @@
|
|
|
2747
2747
|
}
|
|
2748
2748
|
]
|
|
2749
2749
|
},
|
|
2750
|
-
"default": "{x: 0.5, y: 0.5}",
|
|
2750
|
+
"default": "{ x: 0.5, y: 0.5 }",
|
|
2751
2751
|
"description": "Specifies the anchor being set on a particular point of the annotation.\nThe anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],\nwhere (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.\nNote this is only for custom annotations not the default pin view.\nDefaults to the center of the view."
|
|
2752
2752
|
},
|
|
2753
2753
|
{
|
|
@@ -2760,7 +2760,7 @@
|
|
|
2760
2760
|
{
|
|
2761
2761
|
"name": "style",
|
|
2762
2762
|
"required": false,
|
|
2763
|
-
"type": "ViewProps[
|
|
2763
|
+
"type": "ViewProps[\"style\"]",
|
|
2764
2764
|
"default": "none",
|
|
2765
2765
|
"description": "FIX ME NO DESCRIPTION"
|
|
2766
2766
|
}
|
|
@@ -4811,14 +4811,14 @@
|
|
|
4811
4811
|
{
|
|
4812
4812
|
"name": "renderMode",
|
|
4813
4813
|
"required": false,
|
|
4814
|
-
"type": "
|
|
4815
|
-
"default": "
|
|
4814
|
+
"type": "\"normal\" \\| \"native\"",
|
|
4815
|
+
"default": "\"normal\"",
|
|
4816
4816
|
"description": "Which render mode to use.\nCan either be `normal` or `native`"
|
|
4817
4817
|
},
|
|
4818
4818
|
{
|
|
4819
4819
|
"name": "androidRenderMode",
|
|
4820
4820
|
"required": false,
|
|
4821
|
-
"type": "
|
|
4821
|
+
"type": "\"normal\" \\| \"compass\" \\| \"gps\"",
|
|
4822
4822
|
"default": "none",
|
|
4823
4823
|
"description": "native/android only render mode\n\n - normal: just a circle\n - compass: triangle with heading\n - gps: large arrow\n\n@platform android"
|
|
4824
4824
|
},
|
package/javascript/MLNModule.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {NativeModules} from
|
|
1
|
+
import { NativeModules } from "react-native";
|
|
2
2
|
|
|
3
3
|
interface IMLNModule {
|
|
4
4
|
StyleURL: {
|
|
@@ -24,7 +24,7 @@ interface IMLNModule {
|
|
|
24
24
|
setConnected(connected: boolean): void;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const MLNModule: IMLNModule = {...NativeModules.MLNModule};
|
|
27
|
+
const MLNModule: IMLNModule = { ...NativeModules.MLNModule };
|
|
28
28
|
|
|
29
29
|
export const {
|
|
30
30
|
StyleURL,
|