From af2c8038127283d515f32b44410dc255cc538db9 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Tue, 26 Nov 2024 18:30:53 +0100 Subject: [PATCH 1/9] refactor: rename package from com.maplibre to org.maplibre --- android/src/main/AndroidManifest.xml | 2 +- .../maplibre/rctmln/RCTMLNPackage.java | 54 +++++++++---------- .../rctmln/components/AbstractEvent.java | 2 +- .../components/AbstractEventEmitter.java | 6 +-- .../rctmln/components/AbstractMapFeature.java | 4 +- .../components/annotation/MarkerView.java | 2 +- .../annotation/MarkerViewManager.java | 2 +- .../components/annotation/RCTMLNCallout.java | 2 +- .../annotation/RCTMLNCalloutManager.java | 2 +- .../annotation/RCTMLNMarkerView.java | 8 +-- .../annotation/RCTMLNMarkerViewManager.java | 6 +-- .../annotation/RCTMLNPointAnnotation.java | 16 +++--- .../RCTMLNPointAnnotationManager.java | 8 +-- .../rctmln/components/camera/CameraStop.java | 8 +-- .../components/camera/CameraUpdateItem.java | 4 +- .../components/camera/CameraUpdateQueue.java | 4 +- .../components/camera/RCTMLNCamera.java | 36 ++++++------- .../camera/RCTMLNCameraManager.java | 6 +-- .../camera/constants/CameraMode.java | 2 +- .../components/images/RCTMLNImages.java | 14 ++--- .../images/RCTMLNImagesManager.java | 14 ++--- .../location/LocationComponentManager.java | 8 +-- .../location/RCTMLNNativeUserLocation.java | 6 +-- .../RCTMLNNativeUserLocationManager.java | 2 +- .../components/mapview/LayerSourceInfo.java | 2 +- .../mapview/RCTMLNAndroidTextureMapView.java | 2 +- .../RCTMLNAndroidTextureMapViewManager.java | 2 +- .../components/mapview/RCTMLNMapView.java | 50 ++++++++--------- .../mapview/RCTMLNMapViewManager.java | 12 ++--- .../mapview/helpers/CameraChangeTracker.java | 2 +- .../rctmln/components/styles/RCTMLNStyle.java | 6 +-- .../components/styles/RCTMLNStyleFactory.java | 4 +- .../styles/RCTMLNStyleFunctionParser.java | 2 +- .../components/styles/RCTMLNStyleValue.java | 8 +-- .../components/styles/layers/RCTLayer.java | 8 +-- .../styles/layers/RCTMLNBackgroundLayer.java | 6 +-- .../layers/RCTMLNBackgroundLayerManager.java | 2 +- .../styles/layers/RCTMLNCircleLayer.java | 8 +-- .../layers/RCTMLNCircleLayerManager.java | 2 +- .../layers/RCTMLNFillExtrusionLayer.java | 8 +-- .../RCTMLNFillExtrusionLayerManager.java | 4 +- .../styles/layers/RCTMLNFillLayer.java | 8 +-- .../styles/layers/RCTMLNFillLayerManager.java | 4 +- .../styles/layers/RCTMLNHeatmapLayer.java | 8 +-- .../layers/RCTMLNHeatmapLayerManager.java | 2 +- .../styles/layers/RCTMLNLineLayer.java | 8 +-- .../styles/layers/RCTMLNLineLayerManager.java | 6 +-- .../styles/layers/RCTMLNRasterLayer.java | 6 +-- .../layers/RCTMLNRasterLayerManager.java | 2 +- .../styles/layers/RCTMLNSymbolLayer.java | 8 +-- .../layers/RCTMLNSymbolLayerManager.java | 2 +- .../components/styles/light/RCTMLNLight.java | 10 ++-- .../styles/light/RCTMLNLightManager.java | 2 +- .../styles/sources/RCTMLNImageSource.java | 2 +- .../sources/RCTMLNImageSourceManager.java | 6 +-- .../styles/sources/RCTMLNRasterSource.java | 2 +- .../sources/RCTMLNRasterSourceManager.java | 2 +- .../styles/sources/RCTMLNShapeSource.java | 16 +++--- .../sources/RCTMLNShapeSourceManager.java | 20 +++---- .../styles/sources/RCTMLNTileSource.java | 2 +- .../sources/RCTMLNTileSourceManager.java | 4 +- .../styles/sources/RCTMLNVectorSource.java | 6 +-- .../sources/RCTMLNVectorSourceManager.java | 8 +-- .../components/styles/sources/RCTSource.java | 8 +-- .../maplibre/rctmln/events/AbstractEvent.java | 2 +- .../rctmln/events/AndroidCallbackEvent.java | 4 +- .../maplibre/rctmln/events/EventEmitter.java | 2 +- .../rctmln/events/FeatureClickEvent.java | 12 ++--- .../maplibre/rctmln/events/IEvent.java | 2 +- .../rctmln/events/ImageMissingEvent.java | 6 +-- .../maplibre/rctmln/events/LocationEvent.java | 8 +-- .../rctmln/events/MapChangeEvent.java | 6 +-- .../maplibre/rctmln/events/MapClickEvent.java | 8 +-- .../events/MapUserTrackingModeEvent.java | 8 +-- .../maplibre/rctmln/events/OfflineEvent.java | 2 +- .../events/PointAnnotationClickEvent.java | 12 ++--- .../events/PointAnnotationDragEvent.java | 12 ++--- .../rctmln/events/constants/EventKeys.java | 2 +- .../rctmln/events/constants/EventTypes.java | 2 +- .../rctmln/http/CustomHeadersInterceptor.java | 2 +- .../rctmln/location/LocationManager.java | 2 +- .../rctmln/location/UserLocation.java | 2 +- .../UserLocationVerticalAlignment.java | 2 +- .../rctmln/location/UserTrackingMode.java | 2 +- .../rctmln/location/UserTrackingState.java | 2 +- .../rctmln/modules/RCTMLNLocationModule.java | 8 +-- .../rctmln/modules/RCTMLNLogging.java | 2 +- .../maplibre/rctmln/modules/RCTMLNModule.java | 16 +++--- .../rctmln/modules/RCTMLNOfflineModule.java | 12 ++--- .../rctmln/modules/RCTMLNSnapshotModule.java | 6 +-- .../maplibre/rctmln/utils/BitmapUtils.java | 2 +- .../rctmln/utils/ClusterPropertyEntry.java | 2 +- .../maplibre/rctmln/utils/ConvertUtils.java | 2 +- .../rctmln/utils/DownloadMapImageTask.java | 2 +- .../rctmln/utils/ExpressionParser.java | 2 +- .../maplibre/rctmln/utils/GeoJSONUtils.java | 2 +- .../maplibre/rctmln/utils/GeoViewport.java | 2 +- .../maplibre/rctmln/utils/ImageEntry.java | 2 +- .../maplibre/rctmln/utils/ResourceUtils.java | 2 +- .../rctmln/utils/SimpleEventCallback.java | 6 +-- .../rctmln/utils/SphericalMercator.java | 2 +- ios/RCTMLN/RCTMLNImageQueue.m | 2 +- .../react-native-app/android/app/build.gradle | 2 +- .../MainActivity.kt | 2 +- .../MainApplication.kt | 4 +- scripts/codegen.ts | 2 +- scripts/templates/RCTMLNStyleFactory.java.ejs | 4 +- 107 files changed, 337 insertions(+), 337 deletions(-) rename android/src/main/java/{com => org}/maplibre/rctmln/RCTMLNPackage.java (64%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/AbstractEvent.java (92%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/AbstractEventEmitter.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/AbstractMapFeature.java (80%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/MarkerView.java (90%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/MarkerViewManager.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/RCTMLNCallout.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java (91%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java (89%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/camera/CameraStop.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/camera/CameraUpdateItem.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/camera/CameraUpdateQueue.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/camera/RCTMLNCamera.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/camera/RCTMLNCameraManager.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/camera/constants/CameraMode.java (89%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/images/RCTMLNImages.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/images/RCTMLNImagesManager.java (89%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/location/LocationComponentManager.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/mapview/LayerSourceInfo.java (98%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java (91%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/mapview/RCTMLNMapView.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java (94%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/RCTMLNStyle.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java (98%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/RCTMLNStyleValue.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTLayer.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java (76%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java (84%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java (94%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java (92%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java (75%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/light/RCTMLNLight.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java (92%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java (92%) rename android/src/main/java/{com => org}/maplibre/rctmln/components/styles/sources/RCTSource.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/AbstractEvent.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/AndroidCallbackEvent.java (91%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/EventEmitter.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/FeatureClickEvent.java (89%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/IEvent.java (90%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/ImageMissingEvent.java (87%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/LocationEvent.java (92%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/MapChangeEvent.java (87%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/MapClickEvent.java (87%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/MapUserTrackingModeEvent.java (81%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/OfflineEvent.java (94%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/PointAnnotationClickEvent.java (81%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/PointAnnotationDragEvent.java (83%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/constants/EventKeys.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/events/constants/EventTypes.java (98%) rename android/src/main/java/{com => org}/maplibre/rctmln/http/CustomHeadersInterceptor.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/location/LocationManager.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/location/UserLocation.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/location/UserLocationVerticalAlignment.java (84%) rename android/src/main/java/{com => org}/maplibre/rctmln/location/UserTrackingMode.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/location/UserTrackingState.java (92%) rename android/src/main/java/{com => org}/maplibre/rctmln/modules/RCTMLNLocationModule.java (96%) rename android/src/main/java/{com => org}/maplibre/rctmln/modules/RCTMLNLogging.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/modules/RCTMLNModule.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/modules/RCTMLNOfflineModule.java (98%) rename android/src/main/java/{com => org}/maplibre/rctmln/modules/RCTMLNSnapshotModule.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/BitmapUtils.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/ClusterPropertyEntry.java (89%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/ConvertUtils.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/DownloadMapImageTask.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/ExpressionParser.java (98%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/GeoJSONUtils.java (99%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/GeoViewport.java (97%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/ImageEntry.java (93%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/ResourceUtils.java (95%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/SimpleEventCallback.java (81%) rename android/src/main/java/{com => org}/maplibre/rctmln/utils/SphericalMercator.java (98%) diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 335fa4c02..11df4b1df 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/android/src/main/java/com/maplibre/rctmln/RCTMLNPackage.java b/android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java similarity index 64% rename from android/src/main/java/com/maplibre/rctmln/RCTMLNPackage.java rename to android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java index cf02f0b8b..db0356673 100644 --- a/android/src/main/java/com/maplibre/rctmln/RCTMLNPackage.java +++ b/android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln; +package org.maplibre.rctmln; import com.facebook.react.ReactPackage; import com.facebook.react.bridge.JavaScriptModule; @@ -10,32 +10,32 @@ import java.util.Collections; import java.util.List; -import com.maplibre.rctmln.components.annotation.RCTMLNCalloutManager; -import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotationManager; -import com.maplibre.rctmln.components.annotation.RCTMLNMarkerViewManager; -import com.maplibre.rctmln.components.camera.RCTMLNCameraManager; -import com.maplibre.rctmln.components.images.RCTMLNImagesManager; -import com.maplibre.rctmln.components.location.RCTMLNNativeUserLocationManager; -import com.maplibre.rctmln.components.mapview.RCTMLNMapViewManager; -import com.maplibre.rctmln.components.mapview.RCTMLNAndroidTextureMapViewManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNBackgroundLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNCircleLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNFillExtrusionLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNFillLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNHeatmapLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNLineLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNRasterLayerManager; -import com.maplibre.rctmln.components.styles.layers.RCTMLNSymbolLayerManager; -import com.maplibre.rctmln.components.styles.light.RCTMLNLightManager; -import com.maplibre.rctmln.components.styles.sources.RCTMLNImageSourceManager; -import com.maplibre.rctmln.components.styles.sources.RCTMLNRasterSourceManager; -import com.maplibre.rctmln.components.styles.sources.RCTMLNShapeSourceManager; -import com.maplibre.rctmln.components.styles.sources.RCTMLNVectorSourceManager; -import com.maplibre.rctmln.modules.RCTMLNLocationModule; -import com.maplibre.rctmln.modules.RCTMLNLogging; -import com.maplibre.rctmln.modules.RCTMLNModule; -import com.maplibre.rctmln.modules.RCTMLNOfflineModule; -import com.maplibre.rctmln.modules.RCTMLNSnapshotModule; +import org.maplibre.rctmln.components.annotation.RCTMLNCalloutManager; +import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotationManager; +import org.maplibre.rctmln.components.annotation.RCTMLNMarkerViewManager; +import org.maplibre.rctmln.components.camera.RCTMLNCameraManager; +import org.maplibre.rctmln.components.images.RCTMLNImagesManager; +import org.maplibre.rctmln.components.location.RCTMLNNativeUserLocationManager; +import org.maplibre.rctmln.components.mapview.RCTMLNMapViewManager; +import org.maplibre.rctmln.components.mapview.RCTMLNAndroidTextureMapViewManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNBackgroundLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNCircleLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNFillExtrusionLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNFillLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNHeatmapLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNLineLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNRasterLayerManager; +import org.maplibre.rctmln.components.styles.layers.RCTMLNSymbolLayerManager; +import org.maplibre.rctmln.components.styles.light.RCTMLNLightManager; +import org.maplibre.rctmln.components.styles.sources.RCTMLNImageSourceManager; +import org.maplibre.rctmln.components.styles.sources.RCTMLNRasterSourceManager; +import org.maplibre.rctmln.components.styles.sources.RCTMLNShapeSourceManager; +import org.maplibre.rctmln.components.styles.sources.RCTMLNVectorSourceManager; +import org.maplibre.rctmln.modules.RCTMLNLocationModule; +import org.maplibre.rctmln.modules.RCTMLNLogging; +import org.maplibre.rctmln.modules.RCTMLNModule; +import org.maplibre.rctmln.modules.RCTMLNOfflineModule; +import org.maplibre.rctmln.modules.RCTMLNSnapshotModule; /** * Created by nickitaliano on 8/18/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/AbstractEvent.java b/android/src/main/java/org/maplibre/rctmln/components/AbstractEvent.java similarity index 92% rename from android/src/main/java/com/maplibre/rctmln/components/AbstractEvent.java rename to android/src/main/java/org/maplibre/rctmln/components/AbstractEvent.java index d212d106e..d82eec7a4 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/AbstractEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/components/AbstractEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components; +package org.maplibre.rctmln.components; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.events.Event; diff --git a/android/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java b/android/src/main/java/org/maplibre/rctmln/components/AbstractEventEmitter.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java rename to android/src/main/java/org/maplibre/rctmln/components/AbstractEventEmitter.java index 68acb699d..e4f9e49d8 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java +++ b/android/src/main/java/org/maplibre/rctmln/components/AbstractEventEmitter.java @@ -1,8 +1,8 @@ -package com.maplibre.rctmln.components; +package org.maplibre.rctmln.components; import android.view.ViewGroup; -import com.maplibre.rctmln.BuildConfig; +import org.maplibre.rctmln.BuildConfig; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; @@ -12,7 +12,7 @@ import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.react.uimanager.common.UIManagerType; -import com.maplibre.rctmln.events.IEvent; +import org.maplibre.rctmln.events.IEvent; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/AbstractMapFeature.java b/android/src/main/java/org/maplibre/rctmln/components/AbstractMapFeature.java similarity index 80% rename from android/src/main/java/com/maplibre/rctmln/components/AbstractMapFeature.java rename to android/src/main/java/org/maplibre/rctmln/components/AbstractMapFeature.java index 5b5ced450..9d6a740c4 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/AbstractMapFeature.java +++ b/android/src/main/java/org/maplibre/rctmln/components/AbstractMapFeature.java @@ -1,9 +1,9 @@ -package com.maplibre.rctmln.components; +package org.maplibre.rctmln.components; import android.content.Context; import com.facebook.react.views.view.ReactViewGroup; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; /** * Created by nickitaliano on 9/6/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerView.java similarity index 90% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerView.java index 42704bad7..f324be3e1 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerView.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import android.view.View; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerViewManager.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerViewManager.java index bab8eb92c..444680aff 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerViewManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import androidx.annotation.NonNull; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCallout.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCallout.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCallout.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCallout.java index 3c9b48e73..738dd544e 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCallout.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCallout.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import android.content.Context; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java similarity index 91% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java index 0ed63f22e..36d978786 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java index 488e3899f..87f5476c5 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import android.content.Context; import android.graphics.PointF; @@ -9,9 +9,9 @@ import org.maplibre.geojson.Point; import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.OnMapReadyCallback; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.utils.GeoJSONUtils; public class RCTMLNMarkerView extends AbstractMapFeature implements MarkerView.OnPositionUpdateListener, View.OnLayoutChangeListener { private RCTMLNMarkerViewManager mManager; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java similarity index 89% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java index 3504dafa1..e4b51309d 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.utils.GeoJSONUtils; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java index c353408eb..73c5be64d 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import android.content.Context; import android.graphics.PointF; @@ -14,13 +14,13 @@ import org.maplibre.android.plugins.annotation.SymbolOptions; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.events.PointAnnotationClickEvent; -import com.maplibre.rctmln.events.PointAnnotationDragEvent; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.GeoJSONUtils; -import com.maplibre.rctmln.utils.BitmapUtils; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.events.PointAnnotationClickEvent; +import org.maplibre.rctmln.events.PointAnnotationDragEvent; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.utils.BitmapUtils; public class RCTMLNPointAnnotation extends AbstractMapFeature implements View.OnLayoutChangeListener { private Context mContext; diff --git a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java rename to android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java index 5afae0f0b..77862b5cb 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.annotation; +package org.maplibre.rctmln.components.annotation; import androidx.annotation.Nullable; @@ -8,9 +8,9 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.utils.GeoJSONUtils; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java b/android/src/main/java/org/maplibre/rctmln/components/camera/CameraStop.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java rename to android/src/main/java/org/maplibre/rctmln/components/camera/CameraStop.java index a04c4f800..fed317cf9 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java +++ b/android/src/main/java/org/maplibre/rctmln/components/camera/CameraStop.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.camera; +package org.maplibre.rctmln.components.camera; import android.content.Context; import androidx.annotation.NonNull; @@ -13,10 +13,10 @@ import org.maplibre.android.geometry.LatLng; import org.maplibre.android.geometry.LatLngBounds; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.components.camera.constants.CameraMode; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.camera.constants.CameraMode; +import org.maplibre.rctmln.utils.GeoJSONUtils; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java b/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateItem.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java rename to android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateItem.java index d51aa1471..a56847b7b 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java +++ b/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateItem.java @@ -1,11 +1,11 @@ -package com.maplibre.rctmln.components.camera; +package org.maplibre.rctmln.components.camera; import androidx.annotation.NonNull; import org.maplibre.android.camera.CameraUpdate; import org.maplibre.android.constants.MapLibreConstants; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.components.camera.constants.CameraMode; +import org.maplibre.rctmln.components.camera.constants.CameraMode; import java.lang.ref.WeakReference; import java.util.concurrent.Callable; diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java b/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateQueue.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java rename to android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateQueue.java index f9729e087..04d12fa20 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java +++ b/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateQueue.java @@ -1,7 +1,7 @@ -package com.maplibre.rctmln.components.camera; +package org.maplibre.rctmln.components.camera; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; import java.util.ArrayList; import java.util.Iterator; diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java b/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCamera.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java rename to android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCamera.java index bfd30e4b4..81c6a70bd 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java +++ b/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCamera.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.camera; +package org.maplibre.rctmln.components.camera; import android.content.Context; import android.location.Location; @@ -18,22 +18,22 @@ import org.maplibre.android.location.LocationComponentOptions; import org.maplibre.android.location.LocationComponentActivationOptions; // import org.maplibre.android.plugins.locationlayer.LocationLayerPlugin; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.location.LocationComponentManager; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.events.IEvent; -import com.maplibre.rctmln.events.MapUserTrackingModeEvent; -import com.maplibre.rctmln.events.MapChangeEvent; -import com.maplibre.rctmln.location.LocationManager; -import com.maplibre.rctmln.location.UserLocation; -import com.maplibre.rctmln.location.UserLocationVerticalAlignment; -import com.maplibre.rctmln.location.UserTrackingMode; -import com.maplibre.rctmln.location.UserTrackingState; -import com.maplibre.rctmln.utils.GeoJSONUtils; - -import com.maplibre.rctmln.R; - -import com.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.location.LocationComponentManager; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.events.IEvent; +import org.maplibre.rctmln.events.MapUserTrackingModeEvent; +import org.maplibre.rctmln.events.MapChangeEvent; +import org.maplibre.rctmln.location.LocationManager; +import org.maplibre.rctmln.location.UserLocation; +import org.maplibre.rctmln.location.UserLocationVerticalAlignment; +import org.maplibre.rctmln.location.UserTrackingMode; +import org.maplibre.rctmln.location.UserTrackingState; +import org.maplibre.rctmln.utils.GeoJSONUtils; + +import org.maplibre.rctmln.R; + +import org.maplibre.rctmln.events.constants.EventTypes; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; @@ -191,7 +191,7 @@ private void updateMaxMinZoomLevel() { private void setInitialCamera() { if (mDefaultStop != null) { mDefaultStop.setDuration(0); - mDefaultStop.setMode(com.maplibre.rctmln.components.camera.constants.CameraMode.NONE); + mDefaultStop.setMode(org.maplibre.rctmln.components.camera.constants.CameraMode.NONE); CameraUpdateItem item = mDefaultStop.toCameraUpdate(mMapView); item.run(); } diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java b/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCameraManager.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java rename to android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCameraManager.java index cf1c58577..3dd07cefd 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCameraManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.camera; +package org.maplibre.rctmln.components.camera; import org.maplibre.geojson.FeatureCollection; import com.facebook.common.logging.FLog; @@ -6,8 +6,8 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.utils.GeoJSONUtils; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/constants/CameraMode.java b/android/src/main/java/org/maplibre/rctmln/components/camera/constants/CameraMode.java similarity index 89% rename from android/src/main/java/com/maplibre/rctmln/components/camera/constants/CameraMode.java rename to android/src/main/java/org/maplibre/rctmln/components/camera/constants/CameraMode.java index 4df0b19d5..489e99af6 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/camera/constants/CameraMode.java +++ b/android/src/main/java/org/maplibre/rctmln/components/camera/constants/CameraMode.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.camera.constants; +package org.maplibre.rctmln.components.camera.constants; import androidx.annotation.IntDef; diff --git a/android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java b/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImages.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java rename to android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImages.java index 90ce599f8..105ecbb89 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java +++ b/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImages.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.images; +package org.maplibre.rctmln.components.images; import android.content.Context; import android.graphics.Bitmap; @@ -11,12 +11,12 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; import org.maplibre.android.utils.BitmapUtils; -import com.maplibre.rctmln.R; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.events.ImageMissingEvent; -import com.maplibre.rctmln.utils.DownloadMapImageTask; -import com.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.rctmln.R; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.events.ImageMissingEvent; +import org.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.rctmln.utils.ImageEntry; import java.util.AbstractMap; import java.util.ArrayList; diff --git a/android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImagesManager.java b/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImagesManager.java similarity index 89% rename from android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImagesManager.java rename to android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImagesManager.java index 616b1d9e5..1002e9ca8 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImagesManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImagesManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.images; +package org.maplibre.rctmln.components.images; import android.graphics.drawable.BitmapDrawable; @@ -11,12 +11,12 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.styles.sources.RCTMLNShapeSource; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.utils.ImageEntry; -import com.maplibre.rctmln.utils.ResourceUtils; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.styles.sources.RCTMLNShapeSource; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.rctmln.utils.ResourceUtils; import java.util.AbstractMap; import java.util.ArrayList; diff --git a/android/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java b/android/src/main/java/org/maplibre/rctmln/components/location/LocationComponentManager.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java rename to android/src/main/java/org/maplibre/rctmln/components/location/LocationComponentManager.java index 49a83209e..74bcb6def 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/location/LocationComponentManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.location; +package org.maplibre.rctmln.components.location; import android.annotation.SuppressLint; import android.content.Context; @@ -11,9 +11,9 @@ import org.maplibre.android.location.modes.RenderMode; import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; -import com.maplibre.rctmln.R; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.location.LocationManager; +import org.maplibre.rctmln.R; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.location.LocationManager; import androidx.annotation.NonNull; diff --git a/android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java b/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java rename to android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java index 7a3651195..5f76aceb8 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java +++ b/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.location; +package org.maplibre.rctmln.components.location; import android.annotation.SuppressLint; import android.content.Context; @@ -9,8 +9,8 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.OnMapReadyCallback; import org.maplibre.android.maps.Style; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; public class RCTMLNNativeUserLocation extends AbstractMapFeature implements OnMapReadyCallback, Style.OnStyleLoaded { private boolean mEnabled = true; diff --git a/android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java b/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java rename to android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java index 2d7674876..a54fa9d94 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.location; +package org.maplibre.rctmln.components.location; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; diff --git a/android/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/LayerSourceInfo.java similarity index 98% rename from android/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java rename to android/src/main/java/org/maplibre/rctmln/components/mapview/LayerSourceInfo.java index 7076094a4..b80b53461 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java +++ b/android/src/main/java/org/maplibre/rctmln/components/mapview/LayerSourceInfo.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.mapview; +package org.maplibre.rctmln.components.mapview; import org.maplibre.android.style.layers.CircleLayer; import org.maplibre.android.style.layers.FillExtrusionLayer; diff --git a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java similarity index 91% rename from android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java rename to android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java index edf93b99a..86849705c 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java +++ b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.mapview; +package org.maplibre.rctmln.components.mapview; import android.content.Context; import org.maplibre.android.maps.MapLibreMapOptions; diff --git a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java rename to android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java index da0095245..1017f50d4 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.mapview; +package org.maplibre.rctmln.components.mapview; import com.facebook.react.bridge.ReactApplicationContext; import org.maplibre.android.maps.MapLibreMapOptions; diff --git a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapView.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java rename to android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapView.java index fc9526077..38c837ce8 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java +++ b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapView.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.mapview; +package org.maplibre.rctmln.components.mapview; import android.content.Context; import android.graphics.Bitmap; @@ -49,29 +49,29 @@ import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.Layer; import org.maplibre.android.style.layers.Property; -import com.maplibre.rctmln.R; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; -import com.maplibre.rctmln.components.annotation.RCTMLNMarkerView; -import com.maplibre.rctmln.components.annotation.MarkerView; -import com.maplibre.rctmln.components.annotation.MarkerViewManager; -import com.maplibre.rctmln.components.camera.RCTMLNCamera; -import com.maplibre.rctmln.components.images.RCTMLNImages; -import com.maplibre.rctmln.components.location.LocationComponentManager; -import com.maplibre.rctmln.components.location.RCTMLNNativeUserLocation; -import com.maplibre.rctmln.components.mapview.helpers.CameraChangeTracker; -import com.maplibre.rctmln.components.styles.layers.RCTLayer; -import com.maplibre.rctmln.components.styles.light.RCTMLNLight; -import com.maplibre.rctmln.components.styles.sources.RCTMLNShapeSource; -import com.maplibre.rctmln.components.styles.sources.RCTSource; -import com.maplibre.rctmln.events.AndroidCallbackEvent; -import com.maplibre.rctmln.events.IEvent; -import com.maplibre.rctmln.events.MapChangeEvent; -import com.maplibre.rctmln.events.MapClickEvent; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.BitmapUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; -import com.maplibre.rctmln.utils.GeoViewport; +import org.maplibre.rctmln.R; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; +import org.maplibre.rctmln.components.annotation.RCTMLNMarkerView; +import org.maplibre.rctmln.components.annotation.MarkerView; +import org.maplibre.rctmln.components.annotation.MarkerViewManager; +import org.maplibre.rctmln.components.camera.RCTMLNCamera; +import org.maplibre.rctmln.components.images.RCTMLNImages; +import org.maplibre.rctmln.components.location.LocationComponentManager; +import org.maplibre.rctmln.components.location.RCTMLNNativeUserLocation; +import org.maplibre.rctmln.components.mapview.helpers.CameraChangeTracker; +import org.maplibre.rctmln.components.styles.layers.RCTLayer; +import org.maplibre.rctmln.components.styles.light.RCTMLNLight; +import org.maplibre.rctmln.components.styles.sources.RCTMLNShapeSource; +import org.maplibre.rctmln.components.styles.sources.RCTSource; +import org.maplibre.rctmln.events.AndroidCallbackEvent; +import org.maplibre.rctmln.events.IEvent; +import org.maplibre.rctmln.events.MapChangeEvent; +import org.maplibre.rctmln.events.MapClickEvent; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.BitmapUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.utils.GeoViewport; import java.util.ArrayList; import java.util.Arrays; @@ -85,7 +85,7 @@ import javax.annotation.Nullable; import static org.maplibre.android.style.layers.PropertyFactory.visibility; -import static com.maplibre.rctmln.modules.RCTMLNOfflineModule.DEFAULT_STYLE_URL; +import static org.maplibre.rctmln.modules.RCTMLNOfflineModule.DEFAULT_STYLE_URL; /** * Created by nickitaliano on 8/18/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java rename to android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java index 664c7812c..e37841f32 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.mapview; +package org.maplibre.rctmln.components.mapview; import android.util.Log; import android.view.Gravity; @@ -14,11 +14,11 @@ import org.maplibre.android.geometry.LatLngBounds; import org.maplibre.android.log.Logger; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.ExpressionParser; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.rctmln.utils.GeoJSONUtils; import org.maplibre.geojson.FeatureCollection; import org.maplibre.geojson.Point; diff --git a/android/src/main/java/com/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java similarity index 94% rename from android/src/main/java/com/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java rename to android/src/main/java/org/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java index ea8013969..e004d9592 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java +++ b/android/src/main/java/org/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.mapview.helpers; +package org.maplibre.rctmln.components.mapview.helpers; import android.util.Log; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyle.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyle.java index f1e8d9361..1fb256873 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyle.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles; +package org.maplibre.rctmln.components.styles; import android.content.Context; import androidx.annotation.NonNull; @@ -6,8 +6,8 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.utils.DownloadMapImageTask; -import com.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.rctmln.utils.ImageEntry; import java.util.AbstractMap; import java.util.ArrayList; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java index ab4f82a2b..7c753cbae 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java @@ -1,7 +1,7 @@ // DO NOT MODIFY // This file is auto-generated from scripts/templates/RCTMLNStyleFactory.java.ejs -package com.maplibre.rctmln.components.styles; +package org.maplibre.rctmln.components.styles; import org.maplibre.android.style.layers.BackgroundLayer; import org.maplibre.android.style.layers.CircleLayer; @@ -17,7 +17,7 @@ import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import com.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.rctmln.utils.DownloadMapImageTask; import java.util.List; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java similarity index 98% rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java index f01ebea9f..caae4853d 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles; +package org.maplibre.rctmln.components.styles; import android.util.Log; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleValue.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleValue.java index 853285290..e6db3dbde 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleValue.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles; +package org.maplibre.rctmln.components.styles; import androidx.annotation.NonNull; @@ -10,9 +10,9 @@ import com.google.gson.JsonArray; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.TransitionOptions; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.ExpressionParser; -import com.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.rctmln.utils.ImageEntry; /** * Created by nickitaliano on 9/12/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTLayer.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTLayer.java index 1a84c0c86..9ac6da190 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTLayer.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; @@ -12,9 +12,9 @@ import org.maplibre.android.style.layers.Layer; import org.maplibre.android.style.layers.Property; import org.maplibre.android.style.layers.PropertyFactory; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.utils.ExpressionParser; import java.util.Arrays; import java.util.HashSet; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java similarity index 76% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java index c8a3066c3..e1c30a3af 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java @@ -1,10 +1,10 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.layers.BackgroundLayer; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/25/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java index 6b61a3b95..c55a9e528 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java index 88d34e178..cb2fedef9 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.CircleLayer; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/18/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java index 5adf1624c..d9a7b5bc1 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java similarity index 84% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java index 45bad41d0..d0fda0d9b 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.FillExtrusionLayer; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/15/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java index 79545d447..942d726f4 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.components.AbstractEventEmitter; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java index d9effc30a..c6903a56d 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.FillLayer; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/8/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java index 48974e150..17ef739f4 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.components.AbstractEventEmitter; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java index ce8512af6..e86bc13f9 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.HeatmapLayer; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by dhee9000 on 6/8/2019 diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java similarity index 94% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java index d64c0d554..2b782770c 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java index 4644a818e..076343727 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.LineLayer; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/18/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java similarity index 92% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java index 505a1d139..19bc5943b 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.components.AbstractMapFeature; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java similarity index 75% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java index 8c9811351..40efeb7b1 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java @@ -1,10 +1,10 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.layers.RasterLayer; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/25/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java index a5a7a76a6..f55adeadf 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java index cc2929e71..1fecbbf57 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.SymbolLayer; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; /** * Created by nickitaliano on 9/19/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java index c3254b0fc..214d63abd 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.layers; +package org.maplibre.rctmln.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java b/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLight.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLight.java index ff41974df..397913f80 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLight.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.light; +package org.maplibre.rctmln.components.styles.light; import android.content.Context; @@ -8,10 +8,10 @@ import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.RCTMLNStyle; -import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.RCTMLNStyle; +import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java index 265e19468..3832e36bc 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.light; +package org.maplibre.rctmln.components.styles.light; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java index 60b05eeff..7454014c2 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; import android.util.Log; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java similarity index 92% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java index 7a359487e..067ef4cb3 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; import android.view.View; @@ -9,8 +9,8 @@ import com.facebook.react.uimanager.annotations.ReactProp; import com.facebook.react.views.imagehelper.ImageSource; import org.maplibre.android.geometry.LatLngQuad; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; /** * Created by nickitaliano on 11/29/17. diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java index 18d66e3a5..1edaa8b73 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java index 8fa5751d2..5bde1f8c3 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java index ebb0edf0f..828b08a1d 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; import android.graphics.Bitmap; @@ -18,13 +18,13 @@ import org.maplibre.android.style.sources.GeoJsonOptions; import org.maplibre.android.style.sources.GeoJsonSource; import org.maplibre.android.utils.BitmapUtils; -import com.maplibre.rctmln.R; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.events.AndroidCallbackEvent; -import com.maplibre.rctmln.events.FeatureClickEvent; -import com.maplibre.rctmln.utils.ClusterPropertyEntry; -import com.maplibre.rctmln.utils.DownloadMapImageTask; -import com.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.rctmln.R; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.events.AndroidCallbackEvent; +import org.maplibre.rctmln.events.FeatureClickEvent; +import org.maplibre.rctmln.utils.ClusterPropertyEntry; +import org.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.rctmln.utils.ImageEntry; import java.net.URL; import java.util.ArrayList; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java index bdba4df7c..37efb0386 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; import android.graphics.drawable.BitmapDrawable; @@ -19,15 +19,15 @@ import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; import org.maplibre.android.style.expressions.Expression; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.components.annotation.RCTMLNCallout; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.layers.RCTLayer; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.utils.ClusterPropertyEntry; -import com.maplibre.rctmln.utils.ExpressionParser; -import com.maplibre.rctmln.utils.ImageEntry; -import com.maplibre.rctmln.utils.ResourceUtils; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.components.annotation.RCTMLNCallout; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.layers.RCTLayer; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.utils.ClusterPropertyEntry; +import org.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.rctmln.utils.ResourceUtils; import java.net.MalformedURLException; import java.net.URL; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java index 3a512d8d5..ada519c65 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java index a2160da30..005d3aa63 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.view.View; @@ -6,7 +6,7 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableType; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.components.AbstractEventEmitter; import java.util.ArrayList; import java.util.List; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java index 288dd2669..440ac600f 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; import androidx.annotation.Nullable; @@ -10,8 +10,8 @@ import org.maplibre.geojson.FeatureCollection; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.sources.VectorSource; -import com.maplibre.rctmln.events.AndroidCallbackEvent; -import com.maplibre.rctmln.events.FeatureClickEvent; +import org.maplibre.rctmln.events.AndroidCallbackEvent; +import org.maplibre.rctmln.events.FeatureClickEvent; import java.util.List; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java similarity index 92% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java index ce1531a4d..96f6fc99a 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import androidx.annotation.Nullable; @@ -8,9 +8,9 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.ExpressionParser; import javax.annotation.Nonnull; diff --git a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTSource.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java rename to android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTSource.java index 501574633..57ffe7238 100644 --- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java +++ b/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTSource.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.components.styles.sources; +package org.maplibre.rctmln.components.styles.sources; import android.content.Context; import androidx.annotation.NonNull; @@ -14,9 +14,9 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; import org.maplibre.android.style.sources.Source; -import com.maplibre.rctmln.components.AbstractMapFeature; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.components.styles.layers.RCTLayer; +import org.maplibre.rctmln.components.AbstractMapFeature; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.components.styles.layers.RCTLayer; import java.util.ArrayList; import java.util.HashMap; diff --git a/android/src/main/java/com/maplibre/rctmln/events/AbstractEvent.java b/android/src/main/java/org/maplibre/rctmln/events/AbstractEvent.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/events/AbstractEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/AbstractEvent.java index e9c1e3dc5..8123e5377 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/AbstractEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/AbstractEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.view.View; diff --git a/android/src/main/java/com/maplibre/rctmln/events/AndroidCallbackEvent.java b/android/src/main/java/org/maplibre/rctmln/events/AndroidCallbackEvent.java similarity index 91% rename from android/src/main/java/com/maplibre/rctmln/events/AndroidCallbackEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/AndroidCallbackEvent.java index 858ed28cc..2e63452a5 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/AndroidCallbackEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/AndroidCallbackEvent.java @@ -1,10 +1,10 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.view.View; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; -import com.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventKeys; /** * Created by nickitaliano on 10/3/17. diff --git a/android/src/main/java/com/maplibre/rctmln/events/EventEmitter.java b/android/src/main/java/org/maplibre/rctmln/events/EventEmitter.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/events/EventEmitter.java rename to android/src/main/java/org/maplibre/rctmln/events/EventEmitter.java index 48899805e..efec47629 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/EventEmitter.java +++ b/android/src/main/java/org/maplibre/rctmln/events/EventEmitter.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.util.Log; diff --git a/android/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java b/android/src/main/java/org/maplibre/rctmln/events/FeatureClickEvent.java similarity index 89% rename from android/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/FeatureClickEvent.java index f5a0d1265..6dcdb7286 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/FeatureClickEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.graphics.PointF; import android.view.View; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableMap; import org.maplibre.geojson.Feature; import org.maplibre.android.geometry.LatLng; -import com.maplibre.rctmln.components.styles.sources.RCTSource; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.styles.sources.RCTSource; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; import java.util.List; diff --git a/android/src/main/java/com/maplibre/rctmln/events/IEvent.java b/android/src/main/java/org/maplibre/rctmln/events/IEvent.java similarity index 90% rename from android/src/main/java/com/maplibre/rctmln/events/IEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/IEvent.java index 6b11619d0..f620ea2b7 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/IEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/IEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import com.facebook.react.bridge.WritableMap; diff --git a/android/src/main/java/com/maplibre/rctmln/events/ImageMissingEvent.java b/android/src/main/java/org/maplibre/rctmln/events/ImageMissingEvent.java similarity index 87% rename from android/src/main/java/com/maplibre/rctmln/events/ImageMissingEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/ImageMissingEvent.java index d678d73d8..d8c664b16 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/ImageMissingEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/ImageMissingEvent.java @@ -1,9 +1,9 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; import android.view.View; diff --git a/android/src/main/java/com/maplibre/rctmln/events/LocationEvent.java b/android/src/main/java/org/maplibre/rctmln/events/LocationEvent.java similarity index 92% rename from android/src/main/java/com/maplibre/rctmln/events/LocationEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/LocationEvent.java index de23160d2..764af5501 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/LocationEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/LocationEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.location.Location; import androidx.annotation.NonNull; @@ -6,9 +6,9 @@ import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.maplibre.rctmln.components.mapview.RCTMLNMapView; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; import java.util.UUID; diff --git a/android/src/main/java/com/maplibre/rctmln/events/MapChangeEvent.java b/android/src/main/java/org/maplibre/rctmln/events/MapChangeEvent.java similarity index 87% rename from android/src/main/java/com/maplibre/rctmln/events/MapChangeEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/MapChangeEvent.java index 4e5c037dc..b325f2b85 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/MapChangeEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/MapChangeEvent.java @@ -1,11 +1,11 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import com.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventKeys; /** * Created by nickitaliano on 8/27/17. @@ -40,7 +40,7 @@ public WritableMap getPayload() { public boolean canCoalesce() { // Make sure EventDispatcher never merges EventKeys.MAP_ONCHANGE events. // This event name is used to emit events with different - // com.maplibre.rctmln.events.constants.EventTypes which are dispatched separately on + // org.maplibre.rctmln.events.constants.EventTypes which are dispatched separately on // the JS side return false; } diff --git a/android/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java b/android/src/main/java/org/maplibre/rctmln/events/MapClickEvent.java similarity index 87% rename from android/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/MapClickEvent.java index b8447fee6..9ee57e6dd 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/MapClickEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,9 +8,9 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.geometry.LatLng; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.GeoJSONUtils; /** * Created by nickitaliano on 8/23/17. diff --git a/android/src/main/java/com/maplibre/rctmln/events/MapUserTrackingModeEvent.java b/android/src/main/java/org/maplibre/rctmln/events/MapUserTrackingModeEvent.java similarity index 81% rename from android/src/main/java/com/maplibre/rctmln/events/MapUserTrackingModeEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/MapUserTrackingModeEvent.java index cd1a57e1a..92ce7f164 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/MapUserTrackingModeEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/MapUserTrackingModeEvent.java @@ -1,12 +1,12 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.location.UserTrackingMode; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.location.UserTrackingMode; /** * Created by nickitaliano on 12/19/17. diff --git a/android/src/main/java/com/maplibre/rctmln/events/OfflineEvent.java b/android/src/main/java/org/maplibre/rctmln/events/OfflineEvent.java similarity index 94% rename from android/src/main/java/com/maplibre/rctmln/events/OfflineEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/OfflineEvent.java index 9047625a3..4f6093b9c 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/OfflineEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/OfflineEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableMap; diff --git a/android/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java b/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationClickEvent.java similarity index 81% rename from android/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/PointAnnotationClickEvent.java index d4b5f7c36..bd4ffe27c 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationClickEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.plugins.markerview.MarkerView; import org.maplibre.android.geometry.LatLng; -import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; /** * Created by nickitaliano on 10/11/17. diff --git a/android/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java b/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationDragEvent.java similarity index 83% rename from android/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java rename to android/src/main/java/org/maplibre/rctmln/events/PointAnnotationDragEvent.java index 4bbcde463..19c2cec48 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java +++ b/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationDragEvent.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events; +package org.maplibre.rctmln.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.plugins.markerview.MarkerView; import org.maplibre.android.geometry.LatLng; -import com.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; -import com.maplibre.rctmln.events.constants.EventKeys; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; +import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; public class PointAnnotationDragEvent extends MapClickEvent { RCTMLNPointAnnotation mView; diff --git a/android/src/main/java/com/maplibre/rctmln/events/constants/EventKeys.java b/android/src/main/java/org/maplibre/rctmln/events/constants/EventKeys.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/events/constants/EventKeys.java rename to android/src/main/java/org/maplibre/rctmln/events/constants/EventKeys.java index d5eba78d4..fbc036a40 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/constants/EventKeys.java +++ b/android/src/main/java/org/maplibre/rctmln/events/constants/EventKeys.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events.constants; +package org.maplibre.rctmln.events.constants; /** * Created by nickitaliano on 8/27/17. diff --git a/android/src/main/java/com/maplibre/rctmln/events/constants/EventTypes.java b/android/src/main/java/org/maplibre/rctmln/events/constants/EventTypes.java similarity index 98% rename from android/src/main/java/com/maplibre/rctmln/events/constants/EventTypes.java rename to android/src/main/java/org/maplibre/rctmln/events/constants/EventTypes.java index a2926055a..b444ee27f 100644 --- a/android/src/main/java/com/maplibre/rctmln/events/constants/EventTypes.java +++ b/android/src/main/java/org/maplibre/rctmln/events/constants/EventTypes.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.events.constants; +package org.maplibre.rctmln.events.constants; /** * Created by nickitaliano on 8/24/17. diff --git a/android/src/main/java/com/maplibre/rctmln/http/CustomHeadersInterceptor.java b/android/src/main/java/org/maplibre/rctmln/http/CustomHeadersInterceptor.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/http/CustomHeadersInterceptor.java rename to android/src/main/java/org/maplibre/rctmln/http/CustomHeadersInterceptor.java index a91a87a0f..4514076fb 100644 --- a/android/src/main/java/com/maplibre/rctmln/http/CustomHeadersInterceptor.java +++ b/android/src/main/java/org/maplibre/rctmln/http/CustomHeadersInterceptor.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.http; +package org.maplibre.rctmln.http; import android.util.Log; diff --git a/android/src/main/java/com/maplibre/rctmln/location/LocationManager.java b/android/src/main/java/org/maplibre/rctmln/location/LocationManager.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/location/LocationManager.java rename to android/src/main/java/org/maplibre/rctmln/location/LocationManager.java index bc5c44420..9409e053d 100644 --- a/android/src/main/java/com/maplibre/rctmln/location/LocationManager.java +++ b/android/src/main/java/org/maplibre/rctmln/location/LocationManager.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.location; +package org.maplibre.rctmln.location; import android.content.Context; import android.location.Location; diff --git a/android/src/main/java/com/maplibre/rctmln/location/UserLocation.java b/android/src/main/java/org/maplibre/rctmln/location/UserLocation.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/location/UserLocation.java rename to android/src/main/java/org/maplibre/rctmln/location/UserLocation.java index e4e415458..0b9e529e8 100644 --- a/android/src/main/java/com/maplibre/rctmln/location/UserLocation.java +++ b/android/src/main/java/org/maplibre/rctmln/location/UserLocation.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.location; +package org.maplibre.rctmln.location; import android.location.Location; diff --git a/android/src/main/java/com/maplibre/rctmln/location/UserLocationVerticalAlignment.java b/android/src/main/java/org/maplibre/rctmln/location/UserLocationVerticalAlignment.java similarity index 84% rename from android/src/main/java/com/maplibre/rctmln/location/UserLocationVerticalAlignment.java rename to android/src/main/java/org/maplibre/rctmln/location/UserLocationVerticalAlignment.java index c25c5dc68..cddffcea9 100644 --- a/android/src/main/java/com/maplibre/rctmln/location/UserLocationVerticalAlignment.java +++ b/android/src/main/java/org/maplibre/rctmln/location/UserLocationVerticalAlignment.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.location; +package org.maplibre.rctmln.location; /** * Created by nickitaliano on 12/13/17. diff --git a/android/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java b/android/src/main/java/org/maplibre/rctmln/location/UserTrackingMode.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java rename to android/src/main/java/org/maplibre/rctmln/location/UserTrackingMode.java index dd003f71d..9a517203b 100644 --- a/android/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java +++ b/android/src/main/java/org/maplibre/rctmln/location/UserTrackingMode.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.location; +package org.maplibre.rctmln.location; /* import org.maplibre.android.plugins.locationlayer.modes.RenderMode; diff --git a/android/src/main/java/com/maplibre/rctmln/location/UserTrackingState.java b/android/src/main/java/org/maplibre/rctmln/location/UserTrackingState.java similarity index 92% rename from android/src/main/java/com/maplibre/rctmln/location/UserTrackingState.java rename to android/src/main/java/org/maplibre/rctmln/location/UserTrackingState.java index 304a8e897..df7db4a4e 100644 --- a/android/src/main/java/com/maplibre/rctmln/location/UserTrackingState.java +++ b/android/src/main/java/org/maplibre/rctmln/location/UserTrackingState.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.location; +package org.maplibre.rctmln.location; /** * Created by nickitaliano on 12/13/17. diff --git a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLocationModule.java similarity index 96% rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java rename to android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLocationModule.java index df753e27e..b106d6fb8 100644 --- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +++ b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLocationModule.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.modules; +package org.maplibre.rctmln.modules; import android.location.Location; import androidx.annotation.NonNull; @@ -12,9 +12,9 @@ import com.facebook.react.modules.core.RCTNativeAppEventEmitter; import org.maplibre.android.location.engine.LocationEngineCallback; import org.maplibre.android.location.engine.LocationEngineResult; -import com.maplibre.rctmln.events.EventEmitter; -import com.maplibre.rctmln.events.LocationEvent; -import com.maplibre.rctmln.location.LocationManager; +import org.maplibre.rctmln.events.EventEmitter; +import org.maplibre.rctmln.events.LocationEvent; +import org.maplibre.rctmln.location.LocationManager; @ReactModule(name = RCTMLNLocationModule.REACT_CLASS) public class RCTMLNLocationModule extends ReactContextBaseJavaModule { diff --git a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLogging.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java rename to android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLogging.java index 2057ebb7e..5d9dc8234 100644 --- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +++ b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLogging.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.modules; +package org.maplibre.rctmln.modules; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactApplicationContext; diff --git a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNModule.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java rename to android/src/main/java/org/maplibre/rctmln/modules/RCTMLNModule.java index 5c55315b8..ad858d0d1 100644 --- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +++ b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNModule.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.modules; +package org.maplibre.rctmln.modules; import android.os.Handler; import android.util.Log; @@ -12,13 +12,13 @@ import org.maplibre.android.MapLibre; import org.maplibre.android.WellKnownTileServer; import org.maplibre.android.style.layers.Property; -import com.maplibre.rctmln.components.camera.constants.CameraMode; -import com.maplibre.rctmln.components.styles.RCTMLNStyleValue; -import com.maplibre.rctmln.components.styles.sources.RCTSource; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.http.CustomHeadersInterceptor; -import com.maplibre.rctmln.location.UserLocationVerticalAlignment; -import com.maplibre.rctmln.location.UserTrackingMode; +import org.maplibre.rctmln.components.camera.constants.CameraMode; +import org.maplibre.rctmln.components.styles.RCTMLNStyleValue; +import org.maplibre.rctmln.components.styles.sources.RCTSource; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.http.CustomHeadersInterceptor; +import org.maplibre.rctmln.location.UserLocationVerticalAlignment; +import org.maplibre.rctmln.location.UserTrackingMode; import okhttp3.Dispatcher; import okhttp3.OkHttpClient; diff --git a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNOfflineModule.java similarity index 98% rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java rename to android/src/main/java/org/maplibre/rctmln/modules/RCTMLNOfflineModule.java index 3e73bd619..d303c44bb 100644 --- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +++ b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNOfflineModule.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.modules; +package org.maplibre.rctmln.modules; import android.content.Context; import android.os.Handler; @@ -18,11 +18,11 @@ import org.maplibre.android.offline.OfflineRegionStatus; import org.maplibre.android.offline.OfflineTilePyramidRegionDefinition; import org.maplibre.android.storage.FileSource; -import com.maplibre.rctmln.events.IEvent; -import com.maplibre.rctmln.events.OfflineEvent; -import com.maplibre.rctmln.events.constants.EventTypes; -import com.maplibre.rctmln.utils.ConvertUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.events.IEvent; +import org.maplibre.rctmln.events.OfflineEvent; +import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.rctmln.utils.ConvertUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; import org.maplibre.android.maps.Style; import org.json.JSONException; diff --git a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNSnapshotModule.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java rename to android/src/main/java/org/maplibre/rctmln/modules/RCTMLNSnapshotModule.java index 35b0185dc..a474d9cc7 100644 --- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +++ b/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNSnapshotModule.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.modules; +package org.maplibre.rctmln.modules; import android.content.Context; import android.content.pm.PackageManager; @@ -23,8 +23,8 @@ import org.maplibre.android.snapshotter.MapSnapshot; import org.maplibre.android.snapshotter.MapSnapshotter; import org.maplibre.android.storage.FileSource; -import com.maplibre.rctmln.utils.BitmapUtils; -import com.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.rctmln.utils.BitmapUtils; +import org.maplibre.rctmln.utils.GeoJSONUtils; import java.io.IOException; import java.io.OutputStream; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/BitmapUtils.java b/android/src/main/java/org/maplibre/rctmln/utils/BitmapUtils.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/utils/BitmapUtils.java rename to android/src/main/java/org/maplibre/rctmln/utils/BitmapUtils.java index f8a93ab56..ef36a9474 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/BitmapUtils.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/BitmapUtils.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java b/android/src/main/java/org/maplibre/rctmln/utils/ClusterPropertyEntry.java similarity index 89% rename from android/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java rename to android/src/main/java/org/maplibre/rctmln/utils/ClusterPropertyEntry.java index ef285776d..a24563c14 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/ClusterPropertyEntry.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import org.maplibre.android.style.expressions.Expression; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/ConvertUtils.java b/android/src/main/java/org/maplibre/rctmln/utils/ConvertUtils.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/utils/ConvertUtils.java rename to android/src/main/java/org/maplibre/rctmln/utils/ConvertUtils.java index 7aa042aa8..e4a43067b 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/ConvertUtils.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/ConvertUtils.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import android.graphics.PointF; import android.graphics.RectF; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java b/android/src/main/java/org/maplibre/rctmln/utils/DownloadMapImageTask.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java rename to android/src/main/java/org/maplibre/rctmln/utils/DownloadMapImageTask.java index ea454b239..9104a8691 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/DownloadMapImageTask.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java b/android/src/main/java/org/maplibre/rctmln/utils/ExpressionParser.java similarity index 98% rename from android/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java rename to android/src/main/java/org/maplibre/rctmln/utils/ExpressionParser.java index 27b5b5ee7..221f378ac 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/ExpressionParser.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java b/android/src/main/java/org/maplibre/rctmln/utils/GeoJSONUtils.java similarity index 99% rename from android/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java rename to android/src/main/java/org/maplibre/rctmln/utils/GeoJSONUtils.java index 5c206f961..53625fbd1 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/GeoJSONUtils.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReadableArray; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java b/android/src/main/java/org/maplibre/rctmln/utils/GeoViewport.java similarity index 97% rename from android/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java rename to android/src/main/java/org/maplibre/rctmln/utils/GeoViewport.java index 9463340e1..872729cf7 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/GeoViewport.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import android.graphics.PointF; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/ImageEntry.java b/android/src/main/java/org/maplibre/rctmln/utils/ImageEntry.java similarity index 93% rename from android/src/main/java/com/maplibre/rctmln/utils/ImageEntry.java rename to android/src/main/java/org/maplibre/rctmln/utils/ImageEntry.java index 917f81c0d..309e3251a 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/ImageEntry.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/ImageEntry.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; public class ImageEntry { public String uri; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/ResourceUtils.java b/android/src/main/java/org/maplibre/rctmln/utils/ResourceUtils.java similarity index 95% rename from android/src/main/java/com/maplibre/rctmln/utils/ResourceUtils.java rename to android/src/main/java/org/maplibre/rctmln/utils/ResourceUtils.java index d4bec0ce4..3848000a8 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/ResourceUtils.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/ResourceUtils.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java b/android/src/main/java/org/maplibre/rctmln/utils/SimpleEventCallback.java similarity index 81% rename from android/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java rename to android/src/main/java/org/maplibre/rctmln/utils/SimpleEventCallback.java index 805e3ba10..2a6d0191f 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/SimpleEventCallback.java @@ -1,9 +1,9 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import org.maplibre.android.maps.MapLibreMap; -import com.maplibre.rctmln.components.AbstractEventEmitter; -import com.maplibre.rctmln.events.IEvent; +import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.rctmln.events.IEvent; /** * Created by nickitaliano on 8/31/17. diff --git a/android/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java b/android/src/main/java/org/maplibre/rctmln/utils/SphericalMercator.java similarity index 98% rename from android/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java rename to android/src/main/java/org/maplibre/rctmln/utils/SphericalMercator.java index 5cc931fd3..0f2337fa0 100644 --- a/android/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java +++ b/android/src/main/java/org/maplibre/rctmln/utils/SphericalMercator.java @@ -1,4 +1,4 @@ -package com.maplibre.rctmln.utils; +package org.maplibre.rctmln.utils; import android.graphics.Point; import android.graphics.PointF; diff --git a/ios/RCTMLN/RCTMLNImageQueue.m b/ios/RCTMLN/RCTMLNImageQueue.m index 282bbede6..503c6b9c0 100644 --- a/ios/RCTMLN/RCTMLNImageQueue.m +++ b/ios/RCTMLN/RCTMLNImageQueue.m @@ -19,7 +19,7 @@ - (id)init { if (self = [super init]) { imageQueue = [[NSOperationQueue alloc] init]; - imageQueue.name = @"com.maplibre.rctmln.DownloadImageQueue"; + imageQueue.name = @"org.maplibre.rctmln.DownloadImageQueue"; } return self; } diff --git a/packages/react-native-app/android/app/build.gradle b/packages/react-native-app/android/app/build.gradle index f30f8846f..9c0fdeb70 100644 --- a/packages/react-native-app/android/app/build.gradle +++ b/packages/react-native-app/android/app/build.gradle @@ -77,7 +77,7 @@ android { buildToolsVersion rootProject.ext.buildToolsVersion compileSdk rootProject.ext.compileSdkVersion - namespace "com.maplibrereactnativeexample" + namespace "org.maplibrereactnativeexample" defaultConfig { applicationId "org.maplibre.reactnative.example" minSdkVersion rootProject.ext.minSdkVersion diff --git a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainActivity.kt b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainActivity.kt index 0a78dea30..f431470e1 100644 --- a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainActivity.kt +++ b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainActivity.kt @@ -1,4 +1,4 @@ -package com.maplibrereactnativeexample +package org.maplibrereactnativeexample import com.facebook.react.ReactActivity import com.facebook.react.ReactActivityDelegate diff --git a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt index 42fe6bd3f..7613cbf18 100644 --- a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt +++ b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt @@ -1,4 +1,4 @@ -package com.maplibrereactnativeexample +package org.maplibrereactnativeexample import android.app.Application import com.facebook.react.PackageList @@ -11,7 +11,7 @@ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.soloader.SoLoader -import com.maplibre.rctmln.RCTMLNPackage; +import org.maplibre.rctmln.RCTMLNPackage; class MainApplication : Application(), ReactApplication { diff --git a/scripts/codegen.ts b/scripts/codegen.ts index 0086c9c76..8e53d189d 100644 --- a/scripts/codegen.ts +++ b/scripts/codegen.ts @@ -25,7 +25,7 @@ const ANDROID_OUTPUT_PATH = path.join( "src", "main", "java", - "com", + "org", "maplibre", "rctmln", "components", diff --git a/scripts/templates/RCTMLNStyleFactory.java.ejs b/scripts/templates/RCTMLNStyleFactory.java.ejs index 427edaf39..d4845079a 100644 --- a/scripts/templates/RCTMLNStyleFactory.java.ejs +++ b/scripts/templates/RCTMLNStyleFactory.java.ejs @@ -5,7 +5,7 @@ // <%= helpers.autoGeneratedHeader.doNotModify %> // <%= helpers.autoGeneratedHeader.generatedFrom(locals.filePath) %> -package com.maplibre.rctmln.components.styles; +package org.maplibre.rctmln.components.styles; import org.maplibre.android.style.layers.BackgroundLayer; import org.maplibre.android.style.layers.CircleLayer; @@ -21,7 +21,7 @@ import org.maplibre.android.style.layers.HillshadeLayer; import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import com.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.rctmln.utils.DownloadMapImageTask; import java.util.List; From e6c4ea8f892fe89483649d36fa77d4597cb9906c Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Tue, 26 Nov 2024 19:35:58 +0100 Subject: [PATCH 2/9] refactor: rename RCTMLN to MLRN --- .gitignore | 2 +- .sonarcloud.properties | 2 +- __tests__/components/BackgroundLayer.test.js | 4 +- __tests__/components/CircleLayer.test.js | 4 +- __tests__/components/HeatmapLayer.test.js | 4 +- __tests__/components/Light.test.js | 4 +- android/settings.gradle | 2 +- android/src/main/AndroidManifest.xml | 2 +- .../java/org/maplibre/mlrn/MLRNPackage.java | 99 +++ .../components/AbstractEvent.java | 2 +- .../components/AbstractEventEmitter.java | 6 +- .../components/AbstractMapFeature.java | 8 +- .../components/annotation/MLRNCallout.java} | 6 +- .../annotation/MLRNCalloutManager.java | 22 + .../annotation/MLRNMarkerView.java} | 26 +- .../annotation/MLRNMarkerViewManager.java} | 20 +- .../annotation/MLRNPointAnnotation.java} | 34 +- .../MLRNPointAnnotationManager.java} | 28 +- .../components/annotation/MarkerView.java | 2 +- .../annotation/MarkerViewManager.java | 2 +- .../components/camera/CameraStop.java | 12 +- .../components/camera/CameraUpdateItem.java | 4 +- .../components/camera/CameraUpdateQueue.java | 6 +- .../components/camera/MLRNCamera.java} | 48 +- .../components/camera/MLRNCameraManager.java} | 36 +- .../camera/constants/CameraMode.java | 2 +- .../components/images/MLRNImages.java} | 30 +- .../components/images/MLRNImagesManager.java} | 34 +- .../location/LocationComponentManager.java | 14 +- .../location/MLRNNativeUserLocation.java} | 16 +- .../MLRNNativeUserLocationManager.java} | 14 +- .../components/mapview/LayerSourceInfo.java | 2 +- .../mapview/MLRNAndroidTextureMapView.java | 16 + .../MLRNAndroidTextureMapViewManager.java | 31 + .../components/mapview/MLRNMapView.java} | 132 +-- .../mapview/MLRNMapViewManager.java} | 80 +- .../mapview/helpers/CameraChangeTracker.java | 2 +- .../components/styles/MLRNStyle.java} | 20 +- .../components/styles/MLRNStyleFactory.java} | 820 +++++++++--------- .../styles/MLRNStyleFunctionParser.java} | 12 +- .../components/styles/MLRNStyleValue.java} | 14 +- .../styles/layers/MLRNBackgroundLayer.java | 27 + .../layers/MLRNBackgroundLayerManager.java} | 26 +- .../styles/layers/MLRNCircleLayer.java} | 16 +- .../layers/MLRNCircleLayerManager.java} | 34 +- .../layers/MLRNFillExtrusionLayer.java} | 16 +- .../MLRNFillExtrusionLayerManager.java} | 32 +- .../styles/layers/MLRNFillLayer.java} | 16 +- .../styles/layers/MLRNFillLayerManager.java} | 32 +- .../styles/layers/MLRNHeatmapLayer.java} | 16 +- .../layers/MLRNHeatmapLayerManager.java} | 30 +- .../styles/layers/MLRNLineLayer.java} | 16 +- .../styles/layers/MLRNLineLayerManager.java} | 34 +- .../styles/layers/MLRNRasterLayer.java | 27 + .../layers/MLRNRasterLayerManager.java} | 26 +- .../styles/layers/MLRNSymbolLayer.java} | 16 +- .../layers/MLRNSymbolLayerManager.java} | 30 +- .../components/styles/layers/RCTLayer.java | 18 +- .../components/styles/light/MLRNLight.java} | 20 +- .../styles/light/MLRNLightManager.java} | 12 +- .../styles/sources/MLRNImageSource.java} | 8 +- .../sources/MLRNImageSourceManager.java} | 28 +- .../styles/sources/MLRNRasterSource.java} | 6 +- .../sources/MLRNRasterSourceManager.java} | 14 +- .../styles/sources/MLRNShapeSource.java} | 26 +- .../sources/MLRNShapeSourceManager.java} | 68 +- .../styles/sources/MLRNTileSource.java} | 6 +- .../sources/MLRNTileSourceManager.java} | 8 +- .../styles/sources/MLRNVectorSource.java} | 12 +- .../sources/MLRNVectorSourceManager.java} | 24 +- .../components/styles/sources/RCTSource.java | 14 +- .../events/AbstractEvent.java | 2 +- .../events/AndroidCallbackEvent.java | 4 +- .../{rctmln => mlrn}/events/EventEmitter.java | 2 +- .../events/FeatureClickEvent.java | 12 +- .../{rctmln => mlrn}/events/IEvent.java | 2 +- .../events/ImageMissingEvent.java | 6 +- .../events/LocationEvent.java | 12 +- .../events/MapChangeEvent.java | 6 +- .../events/MapClickEvent.java | 8 +- .../events/MapUserTrackingModeEvent.java | 8 +- .../{rctmln => mlrn}/events/OfflineEvent.java | 2 +- .../events/PointAnnotationClickEvent.java | 16 +- .../events/PointAnnotationDragEvent.java | 16 +- .../events/constants/EventKeys.java | 2 +- .../events/constants/EventTypes.java | 2 +- .../http/CustomHeadersInterceptor.java | 2 +- .../location/LocationManager.java | 2 +- .../location/UserLocation.java | 2 +- .../UserLocationVerticalAlignment.java | 2 +- .../location/UserTrackingMode.java | 2 +- .../location/UserTrackingState.java | 2 +- .../modules/MLRNLocationModule.java} | 14 +- .../modules/MLRNLogging.java} | 8 +- .../modules/MLRNModule.java} | 42 +- .../modules/MLRNOfflineModule.java} | 18 +- .../modules/MLRNSnapshotModule.java} | 12 +- .../{rctmln => mlrn}/utils/BitmapUtils.java | 2 +- .../utils/ClusterPropertyEntry.java | 2 +- .../{rctmln => mlrn}/utils/ConvertUtils.java | 2 +- .../utils/DownloadMapImageTask.java | 2 +- .../utils/ExpressionParser.java | 2 +- .../{rctmln => mlrn}/utils/GeoJSONUtils.java | 2 +- .../{rctmln => mlrn}/utils/GeoViewport.java | 2 +- .../{rctmln => mlrn}/utils/ImageEntry.java | 2 +- .../{rctmln => mlrn}/utils/ResourceUtils.java | 2 +- .../utils/SimpleEventCallback.java | 6 +- .../utils/SphericalMercator.java | 2 +- .../org/maplibre/rctmln/RCTMLNPackage.java | 99 --- .../annotation/RCTMLNCalloutManager.java | 22 - .../mapview/RCTMLNAndroidTextureMapView.java | 16 - .../RCTMLNAndroidTextureMapViewManager.java | 31 - .../styles/layers/RCTMLNBackgroundLayer.java | 27 - .../styles/layers/RCTMLNRasterLayer.java | 27 - android/src/main/res/values/strings.xml | 2 +- docs/Callout.md | 2 +- docs/docs.json | 2 +- .../project.pbxproj | 0 ios/{RCTMLN => MLRN}/CameraMode.h | 2 +- ios/{RCTMLN => MLRN}/CameraMode.m | 2 +- ios/{RCTMLN => MLRN}/CameraStop.h | 4 +- ios/{RCTMLN => MLRN}/CameraStop.m | 12 +- ios/{RCTMLN => MLRN}/CameraUpdateItem.h | 6 +- ios/{RCTMLN => MLRN}/CameraUpdateItem.m | 22 +- ios/{RCTMLN => MLRN}/CameraUpdateQueue.h | 6 +- ios/{RCTMLN => MLRN}/CameraUpdateQueue.m | 6 +- ios/{RCTMLN => MLRN}/FilterParser.h | 2 +- ios/{RCTMLN => MLRN}/FilterParser.m | 2 +- ios/{RCTMLN => MLRN}/MLNCustomHeaders.h | 2 +- ios/{RCTMLN => MLRN}/MLNCustomHeaders.m | 2 +- .../MLNFaux3DUserLocationAnnotationView.h | 2 +- .../MLNFaux3DUserLocationAnnotationView.m | 6 +- ios/{RCTMLN => MLRN}/MLNModule.h | 2 +- ios/{RCTMLN => MLRN}/MLNModule.m | 6 +- ios/{RCTMLN => MLRN}/MLNOfflineModule.h | 2 +- ios/{RCTMLN => MLRN}/MLNOfflineModule.m | 26 +- ios/{RCTMLN => MLRN}/MLNSnapshotModule.h | 2 +- ios/{RCTMLN => MLRN}/MLNSnapshotModule.m | 8 +- .../MLNUserLocationHeadingArrowLayer.h | 0 .../MLNUserLocationHeadingArrowLayer.m | 0 .../MLNUserLocationHeadingBeamLayer.h | 0 .../MLNUserLocationHeadingBeamLayer.m | 0 .../MLNUserLocationHeadingIndicator.h | 0 ios/{RCTMLN/RCTMLN.h => MLRN/MLRN.h} | 6 +- ios/{RCTMLN/RCTMLN.m => MLRN/MLRN.m} | 8 +- .../MLRNBackgroundLayer.h} | 8 +- .../MLRNBackgroundLayer.m} | 12 +- .../MLRNBackgroundLayerManager.h} | 6 +- .../MLRNBackgroundLayerManager.m} | 12 +- .../RCTMLNCallout.h => MLRN/MLRNCallout.h} | 6 +- .../RCTMLNCallout.m => MLRN/MLRNCallout.m} | 8 +- .../MLRNCalloutManager.h} | 6 +- ios/MLRN/MLRNCalloutManager.m | 21 + .../RCTMLNCamera.h => MLRN/MLRNCamera.h} | 12 +- .../RCTMLNCamera.m => MLRN/MLRNCamera.m} | 26 +- .../MLRNCameraManager.h} | 6 +- .../MLRNCameraManager.m} | 14 +- ios/MLRN/MLRNCircleLayer.h | 13 + .../MLRNCircleLayer.m} | 12 +- .../MLRNCircleLayerManager.h} | 6 +- .../MLRNCircleLayerManager.m} | 12 +- .../RCTMLNEvent.h => MLRN/MLRNEvent.h} | 12 +- .../RCTMLNEvent.m => MLRN/MLRNEvent.m} | 16 +- .../MLRNEventProtocol.h} | 6 +- .../MLRNEventTypes.h} | 6 +- .../MLRNEventTypes.m} | 8 +- .../MLRNFillExtrusionLayer.h} | 8 +- .../MLRNFillExtrusionLayer.m} | 12 +- .../MLRNFillExtrusionLayerManager.h} | 6 +- .../MLRNFillExtrusionLayerManager.m} | 12 +- .../MLRNFillLayer.h} | 8 +- .../MLRNFillLayer.m} | 12 +- .../MLRNFillLayerManager.h} | 6 +- .../MLRNFillLayerManager.m} | 12 +- ios/MLRN/MLRNHeatmapLayer.h | 12 + .../MLRNHeatmapLayer.m} | 12 +- ios/MLRN/MLRNHeatmapLayerManager.h | 12 + .../MLRNHeatmapLayerManager.m} | 12 +- .../MLRNImageQueue.h} | 6 +- .../MLRNImageQueue.m} | 20 +- .../MLRNImageQueueOperation.h} | 6 +- .../MLRNImageQueueOperation.m} | 24 +- .../MLRNImageSource.h} | 8 +- .../MLRNImageSource.m} | 8 +- .../MLRNImageSourceManager.h} | 6 +- .../MLRNImageSourceManager.m} | 12 +- .../RCTMLNImages.h => MLRN/MLRNImages.h} | 6 +- .../RCTMLNImages.m => MLRN/MLRNImages.m} | 20 +- ios/MLRN/MLRNImagesManager.h | 5 + .../MLRNImagesManager.m} | 8 +- .../RCTMLNLayer.h => MLRN/MLRNLayer.h} | 10 +- .../RCTMLNLayer.m => MLRN/MLRNLayer.m} | 20 +- .../RCTMLNLight.h => MLRN/MLRNLight.h} | 6 +- .../RCTMLNLight.m => MLRN/MLRNLight.m} | 12 +- .../MLRNLightManager.h} | 6 +- .../MLRNLightManager.m} | 12 +- .../MLRNLineLayer.h} | 8 +- .../MLRNLineLayer.m} | 12 +- .../MLRNLineLayerManager.h} | 8 +- .../MLRNLineLayerManager.m} | 12 +- .../RCTMLNLocation.h => MLRN/MLRNLocation.h} | 6 +- .../RCTMLNLocation.m => MLRN/MLRNLocation.m} | 8 +- ios/MLRN/MLRNLocationManager.h | 30 + .../MLRNLocationManager.m} | 32 +- ios/MLRN/MLRNLocationManagerDelegate.h | 20 + .../MLRNLocationModule.h} | 6 +- .../MLRNLocationModule.m} | 26 +- .../RCTMLNLogging.h => MLRN/MLRNLogging.h} | 8 +- .../RCTMLNLogging.m => MLRN/MLRNLogging.m} | 8 +- ios/MLRN/MLRNMapTouchEvent.h | 25 + .../MLRNMapTouchEvent.m} | 32 +- .../RCTMLNMapView.h => MLRN/MLRNMapView.h} | 44 +- .../RCTMLNMapView.m => MLRN/MLRNMapView.m} | 112 +-- .../MLRNMapViewManager.h} | 6 +- .../MLRNMapViewManager.m} | 166 ++-- .../MLRNNativeUserLocation.h} | 10 +- .../MLRNNativeUserLocation.m} | 20 +- ios/MLRN/MLRNNativeUserLocationManager.h | 5 + ios/MLRN/MLRNNativeUserLocationManager.m | 25 + .../MLRNPointAnnotation.h} | 10 +- .../MLRNPointAnnotation.m} | 26 +- .../MLRNPointAnnotationManager.h} | 6 +- .../MLRNPointAnnotationManager.m} | 12 +- .../MLRNRasterLayer.h} | 8 +- .../MLRNRasterLayer.m} | 12 +- .../MLRNRasterLayerManager.h} | 6 +- .../MLRNRasterLayerManager.m} | 12 +- .../MLRNRasterSource.h} | 8 +- .../MLRNRasterSource.m} | 8 +- .../MLRNRasterSourceManager.h} | 6 +- .../MLRNRasterSourceManager.m} | 12 +- .../MLRNShapeSource.h} | 8 +- .../MLRNShapeSource.m} | 22 +- .../MLRNShapeSourceManager.h} | 6 +- .../MLRNShapeSourceManager.m} | 40 +- .../RCTMLNSource.h => MLRN/MLRNSource.h} | 10 +- .../RCTMLNSource.m => MLRN/MLRNSource.m} | 26 +- .../RCTMLNStyle.h => MLRN/MLRNStyle.h} | 394 ++++----- .../RCTMLNStyle.m => MLRN/MLRNStyle.m} | 424 ++++----- .../MLRNStyleValue.h} | 8 +- .../MLRNStyleValue.m} | 22 +- .../MLRNSymbolLayer.h} | 8 +- .../MLRNSymbolLayer.m} | 12 +- ios/MLRN/MLRNSymbolLayerManager.h | 13 + .../MLRNSymbolLayerManager.m} | 12 +- .../MLRNTileSource.h} | 8 +- .../MLRNTileSource.m} | 6 +- .../MLRNUserLocation.h} | 6 +- .../MLRNUserLocation.m} | 10 +- .../RCTMLNUtils.h => MLRN/MLRNUtils.h} | 4 +- .../RCTMLNUtils.m => MLRN/MLRNUtils.m} | 20 +- .../MLRNVectorLayer.h} | 8 +- .../MLRNVectorLayer.m} | 10 +- .../MLRNVectorSource.h} | 8 +- .../MLRNVectorSource.m} | 8 +- .../MLRNVectorSourceManager.h} | 6 +- .../MLRNVectorSourceManager.m} | 20 +- ios/{RCTMLN => MLRN}/RCTConvert+Mapbox.h | 2 +- ios/{RCTMLN => MLRN}/RCTConvert+Mapbox.m | 2 +- ios/{RCTMLN => MLRN}/RNMBImageUtils.h | 2 +- ios/{RCTMLN => MLRN}/RNMBImageUtils.m | 4 +- ios/{RCTMLN => MLRN}/ViewManager.h | 6 +- ios/{RCTMLN => MLRN}/ViewManager.m | 8 +- ios/RCTMLN/RCTMLNCalloutManager.m | 21 - ios/RCTMLN/RCTMLNCircleLayer.h | 13 - ios/RCTMLN/RCTMLNCircleLayerManager.h | 13 - ios/RCTMLN/RCTMLNHeatmapLayer.h | 12 - ios/RCTMLN/RCTMLNHeatmapLayerManager.h | 12 - ios/RCTMLN/RCTMLNImagesManager.h | 5 - ios/RCTMLN/RCTMLNLocationManager.h | 30 - ios/RCTMLN/RCTMLNLocationManagerDelegate.h | 20 - ios/RCTMLN/RCTMLNMapTouchEvent.h | 25 - ios/RCTMLN/RCTMLNNativeUserLocationManager.h | 5 - ios/RCTMLN/RCTMLNNativeUserLocationManager.m | 25 - ios/install.md | 4 +- maplibre-react-native.podspec | 12 +- .../react-native-app/android/app/build.gradle | 2 +- .../MainApplication.kt | 4 +- .../react-native-app/android/settings.gradle | 4 +- packages/react-native-app/ios/Podfile | 8 +- .../__snapshots__/withMapLibre-test.ts.snap | 14 +- plugin/__tests__/fixtures/cocoapodFiles.ts | 8 +- plugin/src/withMapLibre.ts | 2 +- scripts/codegen.ts | 16 +- .../{RCTMLNStyle.h.ejs => MLRNStyle.h.ejs} | 10 +- .../{RCTMLNStyle.m.ejs => MLRNStyle.m.ejs} | 14 +- ...ory.java.ejs => MLRNStyleFactory.java.ejs} | 20 +- src/components/BackgroundLayer.tsx | 8 +- src/components/Callout.tsx | 10 +- src/components/Camera.tsx | 6 +- src/components/CircleLayer.tsx | 8 +- src/components/FillExtrusionLayer.tsx | 6 +- src/components/FillLayer.tsx | 6 +- src/components/HeatmapLayer.tsx | 6 +- src/components/ImageSource.tsx | 8 +- src/components/Images.tsx | 6 +- src/components/Light.tsx | 6 +- src/components/LineLayer.tsx | 6 +- src/components/MapView.tsx | 26 +- src/components/MarkerView.tsx | 6 +- src/components/NativeUserLocation.tsx | 6 +- src/components/PointAnnotation.tsx | 8 +- src/components/RasterLayer.tsx | 6 +- src/components/RasterSource.tsx | 8 +- src/components/ShapeSource.tsx | 16 +- src/components/SymbolLayer.tsx | 8 +- src/components/VectorSource.tsx | 8 +- src/modules/location/locationManager.ts | 2 +- src/utils/Logger.ts | 6 +- 309 files changed, 2899 insertions(+), 2899 deletions(-) create mode 100644 android/src/main/java/org/maplibre/mlrn/MLRNPackage.java rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/AbstractEvent.java (92%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/AbstractEventEmitter.java (96%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/AbstractMapFeature.java (56%) rename android/src/main/java/org/maplibre/{rctmln/components/annotation/RCTMLNCallout.java => mlrn/components/annotation/MLRNCallout.java} (53%) create mode 100644 android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java rename android/src/main/java/org/maplibre/{rctmln/components/annotation/RCTMLNMarkerView.java => mlrn/components/annotation/MLRNMarkerView.java} (77%) rename android/src/main/java/org/maplibre/{rctmln/components/annotation/RCTMLNMarkerViewManager.java => mlrn/components/annotation/MLRNMarkerViewManager.java} (54%) rename android/src/main/java/org/maplibre/{rctmln/components/annotation/RCTMLNPointAnnotation.java => mlrn/components/annotation/MLRNPointAnnotation.java} (91%) rename android/src/main/java/org/maplibre/{rctmln/components/annotation/RCTMLNPointAnnotationManager.java => mlrn/components/annotation/MLRNPointAnnotationManager.java} (65%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/annotation/MarkerView.java (90%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/annotation/MarkerViewManager.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/camera/CameraStop.java (95%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/camera/CameraUpdateItem.java (96%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/camera/CameraUpdateQueue.java (90%) rename android/src/main/java/org/maplibre/{rctmln/components/camera/RCTMLNCamera.java => mlrn/components/camera/MLRNCamera.java} (93%) rename android/src/main/java/org/maplibre/{rctmln/components/camera/RCTMLNCameraManager.java => mlrn/components/camera/MLRNCameraManager.java} (62%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/camera/constants/CameraMode.java (89%) rename android/src/main/java/org/maplibre/{rctmln/components/images/RCTMLNImages.java => mlrn/components/images/MLRNImages.java} (90%) rename android/src/main/java/org/maplibre/{rctmln/components/images/RCTMLNImagesManager.java => mlrn/components/images/MLRNImagesManager.java} (73%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/location/LocationComponentManager.java (94%) rename android/src/main/java/org/maplibre/{rctmln/components/location/RCTMLNNativeUserLocation.java => mlrn/components/location/MLRNNativeUserLocation.java} (81%) rename android/src/main/java/org/maplibre/{rctmln/components/location/RCTMLNNativeUserLocationManager.java => mlrn/components/location/MLRNNativeUserLocationManager.java} (59%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/mapview/LayerSourceInfo.java (98%) create mode 100644 android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java create mode 100644 android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java rename android/src/main/java/org/maplibre/{rctmln/components/mapview/RCTMLNMapView.java => mlrn/components/mapview/MLRNMapView.java} (92%) rename android/src/main/java/org/maplibre/{rctmln/components/mapview/RCTMLNMapViewManager.java => mlrn/components/mapview/MLRNMapViewManager.java} (77%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/mapview/helpers/CameraChangeTracker.java (94%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/RCTMLNStyle.java => mlrn/components/styles/MLRNStyle.java} (74%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/RCTMLNStyleFactory.java => mlrn/components/styles/MLRNStyleFactory.java} (72%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/RCTMLNStyleFunctionParser.java => mlrn/components/styles/MLRNStyleFunctionParser.java} (89%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/RCTMLNStyleValue.java => mlrn/components/styles/MLRNStyleValue.java} (94%) create mode 100644 android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java => mlrn/components/styles/layers/MLRNBackgroundLayerManager.java} (50%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNCircleLayer.java => mlrn/components/styles/layers/MLRNCircleLayer.java} (64%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNLineLayerManager.java => mlrn/components/styles/layers/MLRNCircleLayerManager.java} (55%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java => mlrn/components/styles/layers/MLRNFillExtrusionLayer.java} (64%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java => mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java} (51%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNFillLayer.java => mlrn/components/styles/layers/MLRNFillLayer.java} (64%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNFillLayerManager.java => mlrn/components/styles/layers/MLRNFillLayerManager.java} (54%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNHeatmapLayer.java => mlrn/components/styles/layers/MLRNHeatmapLayer.java} (64%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java => mlrn/components/styles/layers/MLRNHeatmapLayerManager.java} (51%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNLineLayer.java => mlrn/components/styles/layers/MLRNLineLayer.java} (64%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNCircleLayerManager.java => mlrn/components/styles/layers/MLRNLineLayerManager.java} (51%) create mode 100644 android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNRasterLayerManager.java => mlrn/components/styles/layers/MLRNRasterLayerManager.java} (51%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNSymbolLayer.java => mlrn/components/styles/layers/MLRNSymbolLayer.java} (64%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java => mlrn/components/styles/layers/MLRNSymbolLayerManager.java} (52%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/styles/layers/RCTLayer.java (93%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/light/RCTMLNLight.java => mlrn/components/styles/light/MLRNLight.java} (65%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/light/RCTMLNLightManager.java => mlrn/components/styles/light/MLRNLightManager.java} (53%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNImageSource.java => mlrn/components/styles/sources/MLRNImageSource.java} (89%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNImageSourceManager.java => mlrn/components/styles/sources/MLRNImageSourceManager.java} (55%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNRasterSource.java => mlrn/components/styles/sources/MLRNRasterSource.java} (84%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNRasterSourceManager.java => mlrn/components/styles/sources/MLRNRasterSourceManager.java} (54%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNShapeSource.java => mlrn/components/styles/sources/MLRNShapeSource.java} (93%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNShapeSourceManager.java => mlrn/components/styles/sources/MLRNShapeSourceManager.java} (74%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNTileSource.java => mlrn/components/styles/sources/MLRNTileSource.java} (92%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNTileSourceManager.java => mlrn/components/styles/sources/MLRNTileSourceManager.java} (87%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNVectorSource.java => mlrn/components/styles/sources/MLRNVectorSource.java} (84%) rename android/src/main/java/org/maplibre/{rctmln/components/styles/sources/RCTMLNVectorSourceManager.java => mlrn/components/styles/sources/MLRNVectorSourceManager.java} (66%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/components/styles/sources/RCTSource.java (94%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/AbstractEvent.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/AndroidCallbackEvent.java (91%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/EventEmitter.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/FeatureClickEvent.java (89%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/IEvent.java (90%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/ImageMissingEvent.java (87%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/LocationEvent.java (88%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/MapChangeEvent.java (85%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/MapClickEvent.java (87%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/MapUserTrackingModeEvent.java (81%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/OfflineEvent.java (94%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/PointAnnotationClickEvent.java (70%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/PointAnnotationDragEvent.java (73%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/constants/EventKeys.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/events/constants/EventTypes.java (98%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/http/CustomHeadersInterceptor.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/location/LocationManager.java (99%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/location/UserLocation.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/location/UserLocationVerticalAlignment.java (84%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/location/UserTrackingMode.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/location/UserTrackingState.java (92%) rename android/src/main/java/org/maplibre/{rctmln/modules/RCTMLNLocationModule.java => mlrn/modules/MLRNLocationModule.java} (92%) rename android/src/main/java/org/maplibre/{rctmln/modules/RCTMLNLogging.java => mlrn/modules/MLRNLogging.java} (94%) rename android/src/main/java/org/maplibre/{rctmln/modules/RCTMLNModule.java => mlrn/modules/MLRNModule.java} (90%) rename android/src/main/java/org/maplibre/{rctmln/modules/RCTMLNOfflineModule.java => mlrn/modules/MLRNOfflineModule.java} (97%) rename android/src/main/java/org/maplibre/{rctmln/modules/RCTMLNSnapshotModule.java => mlrn/modules/MLRNSnapshotModule.java} (93%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/BitmapUtils.java (99%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/ClusterPropertyEntry.java (89%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/ConvertUtils.java (99%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/DownloadMapImageTask.java (99%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/ExpressionParser.java (98%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/GeoJSONUtils.java (99%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/GeoViewport.java (97%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/ImageEntry.java (93%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/ResourceUtils.java (95%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/SimpleEventCallback.java (81%) rename android/src/main/java/org/maplibre/{rctmln => mlrn}/utils/SphericalMercator.java (98%) delete mode 100644 android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java delete mode 100644 android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java delete mode 100644 android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java delete mode 100644 android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java delete mode 100644 android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java delete mode 100644 android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java rename ios/{RCTMLN.xcodeproj => MLRN.xcodeproj}/project.pbxproj (100%) rename ios/{RCTMLN => MLRN}/CameraMode.h (97%) rename ios/{RCTMLN => MLRN}/CameraMode.m (97%) rename ios/{RCTMLN => MLRN}/CameraStop.h (94%) rename ios/{RCTMLN => MLRN}/CameraStop.m (88%) rename ios/{RCTMLN => MLRN}/CameraUpdateItem.h (63%) rename ios/{RCTMLN => MLRN}/CameraUpdateItem.m (87%) rename ios/{RCTMLN => MLRN}/CameraUpdateQueue.h (80%) rename ios/{RCTMLN => MLRN}/CameraUpdateQueue.m (92%) rename ios/{RCTMLN => MLRN}/FilterParser.h (95%) rename ios/{RCTMLN => MLRN}/FilterParser.m (97%) rename ios/{RCTMLN => MLRN}/MLNCustomHeaders.h (97%) rename ios/{RCTMLN => MLRN}/MLNCustomHeaders.m (99%) rename ios/{RCTMLN => MLRN}/MLNFaux3DUserLocationAnnotationView.h (98%) rename ios/{RCTMLN => MLRN}/MLNFaux3DUserLocationAnnotationView.m (99%) rename ios/{RCTMLN => MLRN}/MLNModule.h (95%) rename ios/{RCTMLN => MLRN}/MLNModule.m (99%) rename ios/{RCTMLN => MLRN}/MLNOfflineModule.h (97%) rename ios/{RCTMLN => MLRN}/MLNOfflineModule.m (95%) rename ios/{RCTMLN => MLRN}/MLNSnapshotModule.h (95%) rename ios/{RCTMLN => MLRN}/MLNSnapshotModule.m (91%) rename ios/{RCTMLN => MLRN}/MLNUserLocationHeadingArrowLayer.h (100%) rename ios/{RCTMLN => MLRN}/MLNUserLocationHeadingArrowLayer.m (100%) rename ios/{RCTMLN => MLRN}/MLNUserLocationHeadingBeamLayer.h (100%) rename ios/{RCTMLN => MLRN}/MLNUserLocationHeadingBeamLayer.m (100%) rename ios/{RCTMLN => MLRN}/MLNUserLocationHeadingIndicator.h (100%) rename ios/{RCTMLN/RCTMLN.h => MLRN/MLRN.h} (73%) rename ios/{RCTMLN/RCTMLN.m => MLRN/MLRN.m} (63%) rename ios/{RCTMLN/RCTMLNRasterLayer.h => MLRN/MLRNBackgroundLayer.h} (56%) rename ios/{RCTMLN/RCTMLNBackgroundLayer.m => MLRN/MLRNBackgroundLayer.m} (67%) rename ios/{RCTMLN/RCTMLNRasterSourceManager.h => MLRN/MLRNBackgroundLayerManager.h} (59%) rename ios/{RCTMLN/RCTMLNBackgroundLayerManager.m => MLRN/MLRNBackgroundLayerManager.m} (72%) rename ios/{RCTMLN/RCTMLNCallout.h => MLRN/MLRNCallout.h} (64%) rename ios/{RCTMLN/RCTMLNCallout.m => MLRN/MLRNCallout.m} (95%) rename ios/{RCTMLN/RCTMLNCalloutManager.h => MLRN/MLRNCalloutManager.h} (61%) create mode 100644 ios/MLRN/MLRNCalloutManager.m rename ios/{RCTMLN/RCTMLNCamera.h => MLRN/MLRNCamera.h} (83%) rename ios/{RCTMLN/RCTMLNCamera.m => MLRN/MLRNCamera.m} (92%) rename ios/{RCTMLN/RCTMLNCameraManager.h => MLRN/MLRNCameraManager.h} (62%) rename ios/{RCTMLN/RCTMLNCameraManager.m => MLRN/MLRNCameraManager.m} (80%) create mode 100644 ios/MLRN/MLRNCircleLayer.h rename ios/{RCTMLN/RCTMLNCircleLayer.m => MLRN/MLRNCircleLayer.m} (77%) rename ios/{RCTMLN/RCTMLNLineLayerManager.h => MLRN/MLRNCircleLayerManager.h} (60%) rename ios/{RCTMLN/RCTMLNCircleLayerManager.m => MLRN/MLRNCircleLayerManager.m} (78%) rename ios/{RCTMLN/RCTMLNEvent.h => MLRN/MLRNEvent.h} (55%) rename ios/{RCTMLN/RCTMLNEvent.m => MLRN/MLRNEvent.m} (63%) rename ios/{RCTMLN/RCTMLNEventProtocol.h => MLRN/MLRNEventProtocol.h} (77%) rename ios/{RCTMLN/RCTMLNEventTypes.h => MLRN/MLRNEventTypes.h} (95%) rename ios/{RCTMLN/RCTMLNEventTypes.m => MLRN/MLRNEventTypes.m} (95%) rename ios/{RCTMLN/RCTMLNFillExtrusionLayer.h => MLRN/MLRNFillExtrusionLayer.h} (50%) rename ios/{RCTMLN/RCTMLNFillExtrusionLayer.m => MLRN/MLRNFillExtrusionLayer.m} (76%) rename ios/{RCTMLN/RCTMLNFillExtrusionLayerManager.h => MLRN/MLRNFillExtrusionLayerManager.h} (56%) rename ios/{RCTMLN/RCTMLNFillExtrusionLayerManager.m => MLRN/MLRNFillExtrusionLayerManager.m} (74%) rename ios/{RCTMLN/RCTMLNFillLayer.h => MLRN/MLRNFillLayer.h} (54%) rename ios/{RCTMLN/RCTMLNFillLayer.m => MLRN/MLRNFillLayer.m} (77%) rename ios/{RCTMLN/RCTMLNFillLayerManager.h => MLRN/MLRNFillLayerManager.h} (60%) rename ios/{RCTMLN/RCTMLNFillLayerManager.m => MLRN/MLRNFillLayerManager.m} (78%) create mode 100644 ios/MLRN/MLRNHeatmapLayer.h rename ios/{RCTMLN/RCTMLNHeatmapLayer.m => MLRN/MLRNHeatmapLayer.m} (74%) create mode 100644 ios/MLRN/MLRNHeatmapLayerManager.h rename ios/{RCTMLN/RCTMLNHeatmapLayerManager.m => MLRN/MLRNHeatmapLayerManager.m} (76%) rename ios/{RCTMLN/RCTMLNImageQueue.h => MLRN/MLRNImageQueue.h} (84%) rename ios/{RCTMLN/RCTMLNImageQueue.m => MLRN/MLRNImageQueue.m} (68%) rename ios/{RCTMLN/RCTMLNImageQueueOperation.h => MLRN/MLRNImageQueueOperation.h} (78%) rename ios/{RCTMLN/RCTMLNImageQueueOperation.m => MLRN/MLRNImageQueueOperation.m} (79%) rename ios/{RCTMLN/RCTMLNImageSource.h => MLRN/MLRNImageSource.h} (68%) rename ios/{RCTMLN/RCTMLNImageSource.m => MLRN/MLRNImageSource.m} (94%) rename ios/{RCTMLN/RCTMLNImageSourceManager.h => MLRN/MLRNImageSourceManager.h} (60%) rename ios/{RCTMLN/RCTMLNImageSourceManager.m => MLRN/MLRNImageSourceManager.m} (60%) rename ios/{RCTMLN/RCTMLNImages.h => MLRN/MLRNImages.h} (83%) rename ios/{RCTMLN/RCTMLNImages.m => MLRN/MLRNImages.m} (86%) create mode 100644 ios/MLRN/MLRNImagesManager.h rename ios/{RCTMLN/RCTMLNImagesManager.m => MLRN/MLRNImagesManager.m} (69%) rename ios/{RCTMLN/RCTMLNLayer.h => MLRN/MLRNLayer.h} (86%) rename ios/{RCTMLN/RCTMLNLayer.m => MLRN/MLRNLayer.m} (94%) rename ios/{RCTMLN/RCTMLNLight.h => MLRN/MLRNLight.h} (80%) rename ios/{RCTMLN/RCTMLNLight.m => MLRN/MLRNLight.m} (79%) rename ios/{RCTMLN/RCTMLNLightManager.h => MLRN/MLRNLightManager.h} (63%) rename ios/{RCTMLN/RCTMLNLightManager.m => MLRN/MLRNLightManager.m} (57%) rename ios/{RCTMLN/RCTMLNLineLayer.h => MLRN/MLRNLineLayer.h} (54%) rename ios/{RCTMLN/RCTMLNLineLayer.m => MLRN/MLRNLineLayer.m} (77%) rename ios/{RCTMLN/RCTMLNSymbolLayerManager.h => MLRN/MLRNLineLayerManager.h} (59%) rename ios/{RCTMLN/RCTMLNLineLayerManager.m => MLRN/MLRNLineLayerManager.m} (79%) rename ios/{RCTMLN/RCTMLNLocation.h => MLRN/MLRNLocation.h} (82%) rename ios/{RCTMLN/RCTMLNLocation.m => MLRN/MLRNLocation.m} (90%) create mode 100644 ios/MLRN/MLRNLocationManager.h rename ios/{RCTMLN/RCTMLNLocationManager.m => MLRN/MLRNLocationManager.m} (79%) create mode 100644 ios/MLRN/MLRNLocationManagerDelegate.h rename ios/{RCTMLN/RCTMLNLocationModule.h => MLRN/MLRNLocationModule.h} (66%) rename ios/{RCTMLN/RCTMLNLocationModule.m => MLRN/MLRNLocationModule.m} (68%) rename ios/{RCTMLN/RCTMLNLogging.h => MLRN/MLRNLogging.h} (64%) rename ios/{RCTMLN/RCTMLNLogging.m => MLRN/MLRNLogging.m} (96%) create mode 100644 ios/MLRN/MLRNMapTouchEvent.h rename ios/{RCTMLN/RCTMLNMapTouchEvent.m => MLRN/MLRNMapTouchEvent.m} (62%) rename ios/{RCTMLN/RCTMLNMapView.h => MLRN/MLRNMapView.h} (72%) rename ios/{RCTMLN/RCTMLNMapView.m => MLRN/MLRNMapView.m} (82%) rename ios/{RCTMLN/RCTMLNMapViewManager.h => MLRN/MLRNMapViewManager.h} (76%) rename ios/{RCTMLN/RCTMLNMapViewManager.m => MLRN/MLRNMapViewManager.m} (78%) rename ios/{RCTMLN/RCTMLNNativeUserLocation.h => MLRN/MLRNNativeUserLocation.h} (60%) rename ios/{RCTMLN/RCTMLNNativeUserLocation.m => MLRN/MLRNNativeUserLocation.m} (78%) create mode 100644 ios/MLRN/MLRNNativeUserLocationManager.h create mode 100644 ios/MLRN/MLRNNativeUserLocationManager.m rename ios/{RCTMLN/RCTMLNPointAnnotation.h => MLRN/MLRNPointAnnotation.h} (84%) rename ios/{RCTMLN/RCTMLNPointAnnotation.m => MLRN/MLRNPointAnnotation.m} (87%) rename ios/{RCTMLN/RCTMLNPointAnnotationManager.h => MLRN/MLRNPointAnnotationManager.h} (57%) rename ios/{RCTMLN/RCTMLNPointAnnotationManager.m => MLRN/MLRNPointAnnotationManager.m} (82%) rename ios/{RCTMLN/RCTMLNBackgroundLayer.h => MLRN/MLRNRasterLayer.h} (54%) rename ios/{RCTMLN/RCTMLNRasterLayer.m => MLRN/MLRNRasterLayer.m} (74%) rename ios/{RCTMLN/RCTMLNRasterLayerManager.h => MLRN/MLRNRasterLayerManager.h} (59%) rename ios/{RCTMLN/RCTMLNRasterLayerManager.m => MLRN/MLRNRasterLayerManager.m} (74%) rename ios/{RCTMLN/RCTMLNRasterSource.h => MLRN/MLRNRasterSource.h} (61%) rename ios/{RCTMLN/RCTMLNRasterSource.m => MLRN/MLRNRasterSource.m} (90%) rename ios/{RCTMLN/RCTMLNBackgroundLayerManager.h => MLRN/MLRNRasterSourceManager.h} (57%) rename ios/{RCTMLN/RCTMLNRasterSourceManager.m => MLRN/MLRNRasterSourceManager.m} (72%) rename ios/{RCTMLN/RCTMLNShapeSource.h => MLRN/MLRNShapeSource.h} (95%) rename ios/{RCTMLN/RCTMLNShapeSource.m => MLRN/MLRNShapeSource.m} (90%) rename ios/{RCTMLN/RCTMLNShapeSourceManager.h => MLRN/MLRNShapeSourceManager.h} (61%) rename ios/{RCTMLN/RCTMLNShapeSourceManager.m => MLRN/MLRNShapeSourceManager.m} (84%) rename ios/{RCTMLN/RCTMLNSource.h => MLRN/MLRNSource.h} (80%) rename ios/{RCTMLN/RCTMLNSource.m => MLRN/MLRNSource.m} (85%) rename ios/{RCTMLN/RCTMLNStyle.h => MLRN/MLRNStyle.h} (58%) rename ios/{RCTMLN/RCTMLNStyle.m => MLRN/MLRNStyle.m} (84%) rename ios/{RCTMLN/RCTMLNStyleValue.h => MLRN/MLRNStyleValue.h} (79%) rename ios/{RCTMLN/RCTMLNStyleValue.m => MLRN/MLRNStyleValue.m} (91%) rename ios/{RCTMLN/RCTMLNSymbolLayer.h => MLRN/MLRNSymbolLayer.h} (71%) rename ios/{RCTMLN/RCTMLNSymbolLayer.m => MLRN/MLRNSymbolLayer.m} (94%) create mode 100644 ios/MLRN/MLRNSymbolLayerManager.h rename ios/{RCTMLN/RCTMLNSymbolLayerManager.m => MLRN/MLRNSymbolLayerManager.m} (79%) rename ios/{RCTMLN/RCTMLNTileSource.h => MLRN/MLRNTileSource.h} (79%) rename ios/{RCTMLN/RCTMLNTileSource.m => MLRN/MLRNTileSource.m} (90%) rename ios/{RCTMLN/RCTMLNUserLocation.h => MLRN/MLRNUserLocation.h} (73%) rename ios/{RCTMLN/RCTMLNUserLocation.m => MLRN/MLRNUserLocation.m} (76%) rename ios/{RCTMLN/RCTMLNUtils.h => MLRN/MLRNUtils.h} (96%) rename ios/{RCTMLN/RCTMLNUtils.m => MLRN/MLRNUtils.m} (91%) rename ios/{RCTMLN/RCTMLNVectorLayer.h => MLRN/MLRNVectorLayer.h} (62%) rename ios/{RCTMLN/RCTMLNVectorLayer.m => MLRN/MLRNVectorLayer.m} (90%) rename ios/{RCTMLN/RCTMLNVectorSource.h => MLRN/MLRNVectorSource.h} (72%) rename ios/{RCTMLN/RCTMLNVectorSource.m => MLRN/MLRNVectorSource.m} (88%) rename ios/{RCTMLN/RCTMLNVectorSourceManager.h => MLRN/MLRNVectorSourceManager.h} (60%) rename ios/{RCTMLN/RCTMLNVectorSourceManager.m => MLRN/MLRNVectorSourceManager.m} (82%) rename ios/{RCTMLN => MLRN}/RCTConvert+Mapbox.h (96%) rename ios/{RCTMLN => MLRN}/RCTConvert+Mapbox.m (98%) rename ios/{RCTMLN => MLRN}/RNMBImageUtils.h (96%) rename ios/{RCTMLN => MLRN}/RNMBImageUtils.m (93%) rename ios/{RCTMLN => MLRN}/ViewManager.h (63%) rename ios/{RCTMLN => MLRN}/ViewManager.m (86%) delete mode 100644 ios/RCTMLN/RCTMLNCalloutManager.m delete mode 100644 ios/RCTMLN/RCTMLNCircleLayer.h delete mode 100644 ios/RCTMLN/RCTMLNCircleLayerManager.h delete mode 100644 ios/RCTMLN/RCTMLNHeatmapLayer.h delete mode 100644 ios/RCTMLN/RCTMLNHeatmapLayerManager.h delete mode 100644 ios/RCTMLN/RCTMLNImagesManager.h delete mode 100644 ios/RCTMLN/RCTMLNLocationManager.h delete mode 100644 ios/RCTMLN/RCTMLNLocationManagerDelegate.h delete mode 100644 ios/RCTMLN/RCTMLNMapTouchEvent.h delete mode 100644 ios/RCTMLN/RCTMLNNativeUserLocationManager.h delete mode 100644 ios/RCTMLN/RCTMLNNativeUserLocationManager.m rename scripts/templates/{RCTMLNStyle.h.ejs => MLRNStyle.h.ejs} (82%) rename scripts/templates/{RCTMLNStyle.m.ejs => MLRNStyle.m.ejs} (88%) rename scripts/templates/{RCTMLNStyleFactory.java.ejs => MLRNStyleFactory.java.ejs} (84%) diff --git a/.gitignore b/.gitignore index 5afb68c96..dc89ab1e9 100644 --- a/.gitignore +++ b/.gitignore @@ -66,7 +66,7 @@ package.tgz ios/temp.zip ios/.framework_version ios/Pods/ -ios/RCTMLN.xcodeproj/xcshareddata/ +ios/MLRN.xcodeproj/xcshareddata/ android/build/ android/.gradle/ android/.idea/ diff --git a/.sonarcloud.properties b/.sonarcloud.properties index fbe9d49e4..46437d406 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -1,5 +1,5 @@ # Path to sources -sonar.sources=javascript,android/src,ios/RCTMLN +sonar.sources=javascript,android/src,ios/MLRN #sonar.exclusions= #sonar.inclusions= diff --git a/__tests__/components/BackgroundLayer.test.js b/__tests__/components/BackgroundLayer.test.js index 48c764500..fcaa06619 100644 --- a/__tests__/components/BackgroundLayer.test.js +++ b/__tests__/components/BackgroundLayer.test.js @@ -9,7 +9,7 @@ describe("BackgroundLayer", () => { , ); - const backgroundLayer = queryByTestId("rctmlnBackgroundLayer"); + const backgroundLayer = queryByTestId("mlrnBackgroundLayer"); const { props } = backgroundLayer; expect(props.sourceID).toStrictEqual("DefaultSourceID"); @@ -30,7 +30,7 @@ describe("BackgroundLayer", () => { }; const { queryByTestId } = render(); - const backgroundLayer = queryByTestId("rctmlnBackgroundLayer"); + const backgroundLayer = queryByTestId("mlrnBackgroundLayer"); const { props } = backgroundLayer; expect(props.id).toStrictEqual(testProps.id); diff --git a/__tests__/components/CircleLayer.test.js b/__tests__/components/CircleLayer.test.js index e76952cdc..f350ef3c9 100644 --- a/__tests__/components/CircleLayer.test.js +++ b/__tests__/components/CircleLayer.test.js @@ -8,7 +8,7 @@ describe("CircleLayer", () => { const { queryByTestId } = render( , ); - const circleLayer = queryByTestId("rctmlnCircleLayer"); + const circleLayer = queryByTestId("mlrnCircleLayer"); const { props } = circleLayer; expect(props.sourceID).toStrictEqual("DefaultSourceID"); @@ -29,7 +29,7 @@ describe("CircleLayer", () => { }; const { queryByTestId } = render(); - const circleLayer = queryByTestId("rctmlnCircleLayer"); + const circleLayer = queryByTestId("mlrnCircleLayer"); const { props } = circleLayer; expect(props.id).toStrictEqual(customProps.id); diff --git a/__tests__/components/HeatmapLayer.test.js b/__tests__/components/HeatmapLayer.test.js index e866c010b..a30e7ac4d 100644 --- a/__tests__/components/HeatmapLayer.test.js +++ b/__tests__/components/HeatmapLayer.test.js @@ -8,7 +8,7 @@ describe("HeatmapLayer", () => { const { UNSAFE_getByType } = render( , ); - const heatmapLayer = UNSAFE_getByType("RCTMLNHeatmapLayer"); + const heatmapLayer = UNSAFE_getByType("MLRNHeatmapLayer"); const { props } = heatmapLayer; expect(props.sourceID).toStrictEqual("DefaultSourceID"); }); @@ -27,7 +27,7 @@ describe("HeatmapLayer", () => { style: { visibility: "none" }, }; const { UNSAFE_getByType } = render(); - const { props } = UNSAFE_getByType("RCTMLNHeatmapLayer"); + const { props } = UNSAFE_getByType("MLRNHeatmapLayer"); expect(props.id).toStrictEqual(testProps.id); expect(props.sourceID).toStrictEqual(testProps.sourceID); diff --git a/__tests__/components/Light.test.js b/__tests__/components/Light.test.js index 79d22854c..9111c6e74 100644 --- a/__tests__/components/Light.test.js +++ b/__tests__/components/Light.test.js @@ -6,7 +6,7 @@ import Light from "../../src/components/Light"; describe("Light", () => { test("renders correctly", () => { const { queryByTestId } = render(); - const light = queryByTestId("rctmlnLight"); + const light = queryByTestId("mlrnLight"); expect(light).toBeDefined(); }); @@ -21,7 +21,7 @@ describe("Light", () => { const { queryByTestId } = render(); - const customStyles = queryByTestId("rctmlnLight").props.reactStyle; + const customStyles = queryByTestId("mlrnLight").props.reactStyle; const { anchor } = customStyles; const { color } = customStyles; const { position } = customStyles; diff --git a/android/settings.gradle b/android/settings.gradle index 87270ab06..b706dfadb 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1 +1 @@ -include ':rctmln' +include ':mlrn' diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 11df4b1df..96cc76b7d 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/android/src/main/java/org/maplibre/mlrn/MLRNPackage.java b/android/src/main/java/org/maplibre/mlrn/MLRNPackage.java new file mode 100644 index 000000000..ec18ef0f4 --- /dev/null +++ b/android/src/main/java/org/maplibre/mlrn/MLRNPackage.java @@ -0,0 +1,99 @@ +package org.maplibre.mlrn; + +import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.JavaScriptModule; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.uimanager.ViewManager; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.maplibre.mlrn.components.annotation.MLRNCalloutManager; +import org.maplibre.mlrn.components.annotation.MLRNPointAnnotationManager; +import org.maplibre.mlrn.components.annotation.MLRNMarkerViewManager; +import org.maplibre.mlrn.components.camera.MLRNCameraManager; +import org.maplibre.mlrn.components.images.MLRNImagesManager; +import org.maplibre.mlrn.components.location.MLRNNativeUserLocationManager; +import org.maplibre.mlrn.components.mapview.MLRNMapViewManager; +import org.maplibre.mlrn.components.mapview.MLRNAndroidTextureMapViewManager; +import org.maplibre.mlrn.components.styles.layers.MLRNBackgroundLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNCircleLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNFillExtrusionLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNFillLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNHeatmapLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNLineLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNRasterLayerManager; +import org.maplibre.mlrn.components.styles.layers.MLRNSymbolLayerManager; +import org.maplibre.mlrn.components.styles.light.MLRNLightManager; +import org.maplibre.mlrn.components.styles.sources.MLRNImageSourceManager; +import org.maplibre.mlrn.components.styles.sources.MLRNRasterSourceManager; +import org.maplibre.mlrn.components.styles.sources.MLRNShapeSourceManager; +import org.maplibre.mlrn.components.styles.sources.MLRNVectorSourceManager; +import org.maplibre.mlrn.modules.MLRNLocationModule; +import org.maplibre.mlrn.modules.MLRNLogging; +import org.maplibre.mlrn.modules.MLRNModule; +import org.maplibre.mlrn.modules.MLRNOfflineModule; +import org.maplibre.mlrn.modules.MLRNSnapshotModule; + +/** + * Created by nickitaliano on 8/18/17. + */ + +public class MLRNPackage implements ReactPackage { + + @Override + public List createNativeModules(ReactApplicationContext reactApplicationContext) { + List modules = new ArrayList<>(); + + modules.add(new MLRNModule(reactApplicationContext)); + modules.add(new MLRNOfflineModule(reactApplicationContext)); + modules.add(new MLRNSnapshotModule(reactApplicationContext)); + modules.add(new MLRNLocationModule(reactApplicationContext)); + modules.add(new MLRNLogging(reactApplicationContext)); + + return modules; + } + + @Deprecated + public List> createJSModules() { + return Collections.emptyList(); + } + + @Override + public List createViewManagers(ReactApplicationContext reactApplicationContext) { + List managers = new ArrayList<>(); + + // components + managers.add(new MLRNCameraManager(reactApplicationContext)); + managers.add(new MLRNMapViewManager(reactApplicationContext)); + managers.add(new MLRNMarkerViewManager(reactApplicationContext)); + managers.add(new MLRNAndroidTextureMapViewManager(reactApplicationContext)); + managers.add(new MLRNLightManager()); + managers.add(new MLRNPointAnnotationManager(reactApplicationContext)); + managers.add(new MLRNCalloutManager()); + managers.add(new MLRNNativeUserLocationManager()); + + // sources + managers.add(new MLRNVectorSourceManager(reactApplicationContext)); + managers.add(new MLRNShapeSourceManager(reactApplicationContext)); + managers.add(new MLRNRasterSourceManager(reactApplicationContext)); + managers.add(new MLRNImageSourceManager()); + + // images + managers.add(new MLRNImagesManager(reactApplicationContext)); + + // layers + managers.add(new MLRNFillLayerManager()); + managers.add(new MLRNFillExtrusionLayerManager()); + managers.add(new MLRNHeatmapLayerManager()); + managers.add(new MLRNLineLayerManager()); + managers.add(new MLRNCircleLayerManager()); + managers.add(new MLRNSymbolLayerManager()); + managers.add(new MLRNRasterLayerManager()); + managers.add(new MLRNBackgroundLayerManager()); + + return managers; + } +} diff --git a/android/src/main/java/org/maplibre/rctmln/components/AbstractEvent.java b/android/src/main/java/org/maplibre/mlrn/components/AbstractEvent.java similarity index 92% rename from android/src/main/java/org/maplibre/rctmln/components/AbstractEvent.java rename to android/src/main/java/org/maplibre/mlrn/components/AbstractEvent.java index d82eec7a4..24dcc6d28 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/AbstractEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/components/AbstractEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components; +package org.maplibre.mlrn.components; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.events.Event; diff --git a/android/src/main/java/org/maplibre/rctmln/components/AbstractEventEmitter.java b/android/src/main/java/org/maplibre/mlrn/components/AbstractEventEmitter.java similarity index 96% rename from android/src/main/java/org/maplibre/rctmln/components/AbstractEventEmitter.java rename to android/src/main/java/org/maplibre/mlrn/components/AbstractEventEmitter.java index e4f9e49d8..3bca43a42 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/AbstractEventEmitter.java +++ b/android/src/main/java/org/maplibre/mlrn/components/AbstractEventEmitter.java @@ -1,8 +1,8 @@ -package org.maplibre.rctmln.components; +package org.maplibre.mlrn.components; import android.view.ViewGroup; -import org.maplibre.rctmln.BuildConfig; +import org.maplibre.mlrn.BuildConfig; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; @@ -12,7 +12,7 @@ import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.react.uimanager.common.UIManagerType; -import org.maplibre.rctmln.events.IEvent; +import org.maplibre.mlrn.events.IEvent; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/rctmln/components/AbstractMapFeature.java b/android/src/main/java/org/maplibre/mlrn/components/AbstractMapFeature.java similarity index 56% rename from android/src/main/java/org/maplibre/rctmln/components/AbstractMapFeature.java rename to android/src/main/java/org/maplibre/mlrn/components/AbstractMapFeature.java index 9d6a740c4..ebfa229e7 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/AbstractMapFeature.java +++ b/android/src/main/java/org/maplibre/mlrn/components/AbstractMapFeature.java @@ -1,9 +1,9 @@ -package org.maplibre.rctmln.components; +package org.maplibre.mlrn.components; import android.content.Context; import com.facebook.react.views.view.ReactViewGroup; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.mlrn.components.mapview.MLRNMapView; /** * Created by nickitaliano on 9/6/17. @@ -14,6 +14,6 @@ public AbstractMapFeature(Context context) { super(context); } - public abstract void addToMap(RCTMLNMapView mapView); - public abstract void removeFromMap(RCTMLNMapView mapView); + public abstract void addToMap(MLRNMapView mapView); + public abstract void removeFromMap(MLRNMapView mapView); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCallout.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCallout.java similarity index 53% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCallout.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCallout.java index 738dd544e..4bf7232b9 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCallout.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCallout.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import android.content.Context; @@ -8,8 +8,8 @@ * Created by nickitaliano on 10/11/17. */ -public class RCTMLNCallout extends ReactViewGroup { - public RCTMLNCallout(Context context) { +public class MLRNCallout extends ReactViewGroup { + public MLRNCallout(Context context) { super(context); } } diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java new file mode 100644 index 000000000..e3a4310e0 --- /dev/null +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java @@ -0,0 +1,22 @@ +package org.maplibre.mlrn.components.annotation; + +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; + +/** + * Created by nickitaliano on 10/11/17. + */ + +public class MLRNCalloutManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNCallout"; + + @Override + public String getName() { + return REACT_CLASS; + } + + @Override + protected MLRNCallout createViewInstance(ThemedReactContext reactContext) { + return new MLRNCallout(reactContext); + } +} diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerView.java similarity index 77% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerView.java index 87f5476c5..727443fcf 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerView.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import android.content.Context; import android.graphics.PointF; @@ -9,13 +9,13 @@ import org.maplibre.geojson.Point; import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.OnMapReadyCallback; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.utils.GeoJSONUtils; -public class RCTMLNMarkerView extends AbstractMapFeature implements MarkerView.OnPositionUpdateListener, View.OnLayoutChangeListener { - private RCTMLNMarkerViewManager mManager; - private RCTMLNMapView mMapView; +public class MLRNMarkerView extends AbstractMapFeature implements MarkerView.OnPositionUpdateListener, View.OnLayoutChangeListener { + private MLRNMarkerViewManager mManager; + private MLRNMapView mMapView; private View mChildView; @@ -26,7 +26,7 @@ public class RCTMLNMarkerView extends AbstractMapFeature implements MarkerView.O private Float[] mAnchor; - public RCTMLNMarkerView(Context context, RCTMLNMarkerViewManager manager) { + public MLRNMarkerView(Context context, MLRNMarkerViewManager manager) { super(context); mManager = manager; } @@ -57,10 +57,10 @@ public void refresh() { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mMapView = mapView; - final RCTMLNMarkerView rctmlnMarkerView = this; + final MLRNMarkerView mlrnMarkerView = this; mMapView.getMapAsync( new OnMapReadyCallback() { @@ -70,8 +70,8 @@ public void onMapReady(@NonNull MapLibreMap mapLibreMap) { if (mChildView != null) { mMarkerView = new MarkerView(GeoJSONUtils.toLatLng(mCoordinate), mChildView); - mMarkerView.setOnPositionUpdateListener(rctmlnMarkerView); - mChildView.addOnLayoutChangeListener(rctmlnMarkerView); + mMarkerView.setOnPositionUpdateListener(mlrnMarkerView); + mChildView.addOnLayoutChangeListener(mlrnMarkerView); mMarkerViewManager.addMarker(mMarkerView); } } @@ -91,7 +91,7 @@ public PointF onUpdate(PointF pointF) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { if (mMarkerView != null) { mMarkerViewManager.removeMarker(mMarkerView); mChildView.removeOnLayoutChangeListener(this); diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerViewManager.java similarity index 54% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerViewManager.java index e4b51309d..7a9a95fdb 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerViewManager.java @@ -1,19 +1,19 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.utils.GeoJSONUtils; import java.util.Map; -public class RCTMLNMarkerViewManager extends AbstractEventEmitter { - public static final String REACT_CLASS = "RCTMLNMarkerView"; +public class MLRNMarkerViewManager extends AbstractEventEmitter { + public static final String REACT_CLASS = "MLRNMarkerView"; - public RCTMLNMarkerViewManager(ReactApplicationContext reactApplicationContext) { + public MLRNMarkerViewManager(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); } @@ -23,18 +23,18 @@ public String getName() { } @ReactProp(name="coordinate") - public void setCoordinate(RCTMLNMarkerView markerView, String geoJSONStr) { + public void setCoordinate(MLRNMarkerView markerView, String geoJSONStr) { markerView.setCoordinate(GeoJSONUtils.toPointGeometry(geoJSONStr)); } @ReactProp(name="anchor") - public void setAnchor(RCTMLNMarkerView markerView, ReadableMap map) { + public void setAnchor(MLRNMarkerView markerView, ReadableMap map) { markerView.setAnchor((float) map.getDouble("x"), (float) map.getDouble("y")); } @Override - protected RCTMLNMarkerView createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNMarkerView(reactContext, this); + protected MLRNMarkerView createViewInstance(ThemedReactContext reactContext) { + return new MLRNMarkerView(reactContext, this); } @Override diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotation.java similarity index 91% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotation.java index 73c5be64d..7f7fdd06a 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotation.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import android.content.Context; import android.graphics.PointF; @@ -14,20 +14,20 @@ import org.maplibre.android.plugins.annotation.SymbolOptions; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.events.PointAnnotationClickEvent; -import org.maplibre.rctmln.events.PointAnnotationDragEvent; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.GeoJSONUtils; -import org.maplibre.rctmln.utils.BitmapUtils; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.events.PointAnnotationClickEvent; +import org.maplibre.mlrn.events.PointAnnotationDragEvent; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.mlrn.utils.BitmapUtils; -public class RCTMLNPointAnnotation extends AbstractMapFeature implements View.OnLayoutChangeListener { +public class MLRNPointAnnotation extends AbstractMapFeature implements View.OnLayoutChangeListener { private Context mContext; - private RCTMLNPointAnnotationManager mManager; + private MLRNPointAnnotationManager mManager; private Symbol mAnnotation; private MapLibreMap mMap; - private RCTMLNMapView mMapView; + private MLRNMapView mMapView; private boolean mHasChildren; @@ -52,7 +52,7 @@ public class RCTMLNPointAnnotation extends AbstractMapFeature implements View.On private static final String MARKER_IMAGE_ID = "MARKER_IMAGE_ID"; - public RCTMLNPointAnnotation(Context context, RCTMLNPointAnnotationManager manager) { + public MLRNPointAnnotation(Context context, MLRNPointAnnotationManager manager) { super(context); mContext = context; mManager = manager; @@ -60,7 +60,7 @@ public RCTMLNPointAnnotation(Context context, RCTMLNPointAnnotationManager manag @Override public void addView(View childView, int childPosition) { - if (childView instanceof RCTMLNCallout) { + if (childView instanceof MLRNCallout) { mCalloutView = childView; } else { mChildView = childView; @@ -92,7 +92,7 @@ public void onStyleLoaded(@NonNull Style style) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mMapView = mapView; mMap = mapView.getMapboxMap(); makeMarker(); @@ -113,8 +113,8 @@ public void addToMap(RCTMLNMapView mapView) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { - RCTMLNMapView map = (mMapView != null) ? mMapView : mapView; + public void removeFromMap(MLRNMapView mapView) { + MLRNMapView map = (mMapView != null) ? mMapView : mapView; if (map == null) { return; } @@ -145,7 +145,7 @@ private void refreshBitmap(View v, int left, int top, int right, int bottom) { Bitmap bitmap = BitmapUtils.viewToBitmap(v, left, top, right, bottom); String bitmapId = Integer.toString(v.getId()); addBitmapToStyle(bitmap, bitmapId); - if (v instanceof RCTMLNCallout) { + if (v instanceof MLRNCallout) { mCalloutBitmap = bitmap; mCalloutBitmapId = bitmapId; } else { diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotationManager.java similarity index 65% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotationManager.java index 77862b5cb..2a4bdf999 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotationManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import androidx.annotation.Nullable; @@ -8,9 +8,9 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.utils.GeoJSONUtils; import java.util.Map; @@ -18,10 +18,10 @@ * Created by nickitaliano on 9/27/17. */ -public class RCTMLNPointAnnotationManager extends AbstractEventEmitter { - public static final String REACT_CLASS = "RCTMLNPointAnnotation"; +public class MLRNPointAnnotationManager extends AbstractEventEmitter { + public static final String REACT_CLASS = "MLRNPointAnnotation"; - public RCTMLNPointAnnotationManager(ReactApplicationContext reactApplicationContext) { + public MLRNPointAnnotationManager(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); } @@ -53,32 +53,32 @@ public String getName() { } @Override - protected RCTMLNPointAnnotation createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNPointAnnotation(reactContext, this); + protected MLRNPointAnnotation createViewInstance(ThemedReactContext reactContext) { + return new MLRNPointAnnotation(reactContext, this); } @ReactProp(name="id") - public void setId(RCTMLNPointAnnotation annotation, String id) { + public void setId(MLRNPointAnnotation annotation, String id) { annotation.setID(id); } @ReactProp(name="coordinate") - public void setCoordinate(RCTMLNPointAnnotation annotation, String geoJSONStr) { + public void setCoordinate(MLRNPointAnnotation annotation, String geoJSONStr) { annotation.setCoordinate(GeoJSONUtils.toPointGeometry(geoJSONStr)); } @ReactProp(name="anchor") - public void setAnchor(RCTMLNPointAnnotation annotation, ReadableMap map) { + public void setAnchor(MLRNPointAnnotation annotation, ReadableMap map) { annotation.setAnchor((float) map.getDouble("x"), (float) map.getDouble("y")); } @ReactProp(name="draggable") - public void setDraggable(RCTMLNPointAnnotation annotation, Boolean draggable) { + public void setDraggable(MLRNPointAnnotation annotation, Boolean draggable) { annotation.setDraggable(draggable); } @Override - public void receiveCommand(RCTMLNPointAnnotation annotation, int commandID, @Nullable ReadableArray args) { + public void receiveCommand(MLRNPointAnnotation annotation, int commandID, @Nullable ReadableArray args) { switch (commandID) { case METHOD_REFRESH: annotation.refresh(); diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerView.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerView.java similarity index 90% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerView.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerView.java index f324be3e1..e5af580ce 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerView.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerView.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import android.view.View; diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerViewManager.java b/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerViewManager.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerViewManager.java rename to android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerViewManager.java index 444680aff..5d627a689 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/MarkerViewManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerViewManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.annotation; +package org.maplibre.mlrn.components.annotation; import androidx.annotation.NonNull; diff --git a/android/src/main/java/org/maplibre/rctmln/components/camera/CameraStop.java b/android/src/main/java/org/maplibre/mlrn/components/camera/CameraStop.java similarity index 95% rename from android/src/main/java/org/maplibre/rctmln/components/camera/CameraStop.java rename to android/src/main/java/org/maplibre/mlrn/components/camera/CameraStop.java index fed317cf9..f416fdf02 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/camera/CameraStop.java +++ b/android/src/main/java/org/maplibre/mlrn/components/camera/CameraStop.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.camera; +package org.maplibre.mlrn.components.camera; import android.content.Context; import androidx.annotation.NonNull; @@ -13,10 +13,10 @@ import org.maplibre.android.geometry.LatLng; import org.maplibre.android.geometry.LatLngBounds; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.components.camera.constants.CameraMode; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.camera.constants.CameraMode; +import org.maplibre.mlrn.utils.GeoJSONUtils; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.mlrn.components.mapview.MLRNMapView; @@ -82,7 +82,7 @@ public void setMode(@CameraMode.Mode int mode) { mMode = mode; } - public CameraUpdateItem toCameraUpdate(RCTMLNMapView mapView) { + public CameraUpdateItem toCameraUpdate(MLRNMapView mapView) { MapLibreMap map = mapView.getMapboxMap(); CameraPosition currentCamera = map.getCameraPosition(); CameraPosition.Builder builder = new CameraPosition.Builder(currentCamera); @@ -214,7 +214,7 @@ public static CameraStop fromReadableMap(Context context, @NonNull ReadableMap r return stop; } - private static int[] clippedPadding(int[] padding, RCTMLNMapView mapView) { + private static int[] clippedPadding(int[] padding, MLRNMapView mapView) { int mapHeight = mapView.getHeight(); int mapWidth = mapView.getWidth(); diff --git a/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateItem.java b/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateItem.java similarity index 96% rename from android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateItem.java rename to android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateItem.java index a56847b7b..c33fe2bdb 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateItem.java +++ b/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateItem.java @@ -1,11 +1,11 @@ -package org.maplibre.rctmln.components.camera; +package org.maplibre.mlrn.components.camera; import androidx.annotation.NonNull; import org.maplibre.android.camera.CameraUpdate; import org.maplibre.android.constants.MapLibreConstants; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.components.camera.constants.CameraMode; +import org.maplibre.mlrn.components.camera.constants.CameraMode; import java.lang.ref.WeakReference; import java.util.concurrent.Callable; diff --git a/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateQueue.java b/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateQueue.java similarity index 90% rename from android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateQueue.java rename to android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateQueue.java index 04d12fa20..8152be476 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/camera/CameraUpdateQueue.java +++ b/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateQueue.java @@ -1,7 +1,7 @@ -package org.maplibre.rctmln.components.camera; +package org.maplibre.mlrn.components.camera; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.mlrn.components.mapview.MLRNMapView; import java.util.ArrayList; import java.util.Iterator; @@ -53,7 +53,7 @@ public void setOnCompleteAllListener(OnCompleteAllListener listener) { mCompleteListener = listener; } - public void execute(RCTMLNMapView map) { + public void execute(MLRNMapView map) { if (mQueue.isEmpty()) { if (mCompleteListener != null) { mCompleteListener.onCompleteAll(); diff --git a/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCamera.java b/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCamera.java similarity index 93% rename from android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCamera.java rename to android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCamera.java index 81c6a70bd..d0d800e4a 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCamera.java +++ b/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCamera.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.camera; +package org.maplibre.mlrn.components.camera; import android.content.Context; import android.location.Location; @@ -18,22 +18,22 @@ import org.maplibre.android.location.LocationComponentOptions; import org.maplibre.android.location.LocationComponentActivationOptions; // import org.maplibre.android.plugins.locationlayer.LocationLayerPlugin; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.location.LocationComponentManager; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.events.IEvent; -import org.maplibre.rctmln.events.MapUserTrackingModeEvent; -import org.maplibre.rctmln.events.MapChangeEvent; -import org.maplibre.rctmln.location.LocationManager; -import org.maplibre.rctmln.location.UserLocation; -import org.maplibre.rctmln.location.UserLocationVerticalAlignment; -import org.maplibre.rctmln.location.UserTrackingMode; -import org.maplibre.rctmln.location.UserTrackingState; -import org.maplibre.rctmln.utils.GeoJSONUtils; - -import org.maplibre.rctmln.R; - -import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.location.LocationComponentManager; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.events.IEvent; +import org.maplibre.mlrn.events.MapUserTrackingModeEvent; +import org.maplibre.mlrn.events.MapChangeEvent; +import org.maplibre.mlrn.location.LocationManager; +import org.maplibre.mlrn.location.UserLocation; +import org.maplibre.mlrn.location.UserLocationVerticalAlignment; +import org.maplibre.mlrn.location.UserTrackingMode; +import org.maplibre.mlrn.location.UserTrackingState; +import org.maplibre.mlrn.utils.GeoJSONUtils; + +import org.maplibre.mlrn.R; + +import org.maplibre.mlrn.events.constants.EventTypes; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; @@ -44,9 +44,9 @@ import androidx.annotation.NonNull; -public class RCTMLNCamera extends AbstractMapFeature { - private RCTMLNCameraManager mManager; - private RCTMLNMapView mMapView; +public class MLRNCamera extends AbstractMapFeature { + private MLRNCameraManager mManager; + private MLRNMapView mMapView; private boolean hasSentFirstRegion = false; @@ -114,7 +114,7 @@ public void onFinish() { } }; - public RCTMLNCamera(Context context, RCTMLNCameraManager manager) { + public MLRNCamera(Context context, MLRNCameraManager manager) { super(context); mContext = context; mManager = manager; @@ -125,7 +125,7 @@ public RCTMLNCamera(Context context, RCTMLNCameraManager manager) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mMapView = mapView; setInitialCamera(); @@ -142,7 +142,7 @@ public void addToMap(RCTMLNMapView mapView) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { } @@ -191,7 +191,7 @@ private void updateMaxMinZoomLevel() { private void setInitialCamera() { if (mDefaultStop != null) { mDefaultStop.setDuration(0); - mDefaultStop.setMode(org.maplibre.rctmln.components.camera.constants.CameraMode.NONE); + mDefaultStop.setMode(org.maplibre.mlrn.components.camera.constants.CameraMode.NONE); CameraUpdateItem item = mDefaultStop.toCameraUpdate(mMapView); item.run(); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCameraManager.java b/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCameraManager.java similarity index 62% rename from android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCameraManager.java rename to android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCameraManager.java index 3dd07cefd..a25510787 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/camera/RCTMLNCameraManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCameraManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.camera; +package org.maplibre.mlrn.components.camera; import org.maplibre.geojson.FeatureCollection; import com.facebook.common.logging.FLog; @@ -6,18 +6,18 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.utils.GeoJSONUtils; import java.util.HashMap; import java.util.Map; -public class RCTMLNCameraManager extends AbstractEventEmitter { - public static final String REACT_CLASS = "RCTMLNCamera"; +public class MLRNCameraManager extends AbstractEventEmitter { + public static final String REACT_CLASS = "MLRNCamera"; private ReactApplicationContext mContext; - public RCTMLNCameraManager(ReactApplicationContext context) { + public MLRNCameraManager(ReactApplicationContext context) { super(context); mContext = context; } @@ -33,12 +33,12 @@ public String getName() { } @Override - protected RCTMLNCamera createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNCamera(reactContext, this); + protected MLRNCamera createViewInstance(ThemedReactContext reactContext) { + return new MLRNCamera(reactContext, this); } @ReactProp(name="stop") - public void setStop(RCTMLNCamera camera, ReadableMap map) { + public void setStop(MLRNCamera camera, ReadableMap map) { if (map != null) { CameraStop stop = CameraStop.fromReadableMap(mContext, map, null); camera.setStop(stop); @@ -46,7 +46,7 @@ public void setStop(RCTMLNCamera camera, ReadableMap map) { } @ReactProp(name="defaultStop") - public void setDefaultStop(RCTMLNCamera camera, ReadableMap map) { + public void setDefaultStop(MLRNCamera camera, ReadableMap map) { if (map != null) { CameraStop stop = CameraStop.fromReadableMap(mContext, map, null); camera.setDefaultStop(stop); @@ -54,7 +54,7 @@ public void setDefaultStop(RCTMLNCamera camera, ReadableMap map) { } @ReactProp(name="maxBounds") - public void setMaxBounds(RCTMLNCamera camera, String value) { + public void setMaxBounds(MLRNCamera camera, String value) { if (value != null) { FeatureCollection collection = FeatureCollection.fromJson(value); camera.setMaxBounds(GeoJSONUtils.toLatLngBounds(collection)); @@ -63,38 +63,38 @@ public void setMaxBounds(RCTMLNCamera camera, String value) { @ReactProp(name="userTrackingMode") - public void setUserTrackingMode(RCTMLNCamera camera, int userTrackingMode) { + public void setUserTrackingMode(MLRNCamera camera, int userTrackingMode) { camera.setUserTrackingMode(userTrackingMode); throw new AssertionError("Unused code"); } @ReactProp(name="followZoomLevel") - public void setZoomLevel(RCTMLNCamera camera, double zoomLevel) { + public void setZoomLevel(MLRNCamera camera, double zoomLevel) { camera.setZoomLevel(zoomLevel); } @ReactProp(name="followUserLocation") - public void setFollowUserLocation(RCTMLNCamera camera, boolean value) { + public void setFollowUserLocation(MLRNCamera camera, boolean value) { camera.setFollowUserLocation(value); } @ReactProp(name="followUserMode") - public void setFollowUserMode(RCTMLNCamera camera, String value) { + public void setFollowUserMode(MLRNCamera camera, String value) { camera.setFollowUserMode(value); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNCamera camera, double value) { + public void setMinZoomLevel(MLRNCamera camera, double value) { camera.setMinZoomLevel(value); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNCamera camera, double value) { + public void setMaxZoomLevel(MLRNCamera camera, double value) { camera.setMaxZoomLevel(value); } @ReactProp(name="followPitch") - public void setFollowPitch(RCTMLNCamera camera, double value) { + public void setFollowPitch(MLRNCamera camera, double value) { camera.setFollowPitch(value); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/camera/constants/CameraMode.java b/android/src/main/java/org/maplibre/mlrn/components/camera/constants/CameraMode.java similarity index 89% rename from android/src/main/java/org/maplibre/rctmln/components/camera/constants/CameraMode.java rename to android/src/main/java/org/maplibre/mlrn/components/camera/constants/CameraMode.java index 489e99af6..f04eaf90e 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/camera/constants/CameraMode.java +++ b/android/src/main/java/org/maplibre/mlrn/components/camera/constants/CameraMode.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.camera.constants; +package org.maplibre.mlrn.components.camera.constants; import androidx.annotation.IntDef; diff --git a/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImages.java b/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImages.java similarity index 90% rename from android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImages.java rename to android/src/main/java/org/maplibre/mlrn/components/images/MLRNImages.java index 105ecbb89..8a9092985 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImages.java +++ b/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImages.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.images; +package org.maplibre.mlrn.components.images; import android.content.Context; import android.graphics.Bitmap; @@ -11,12 +11,12 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; import org.maplibre.android.utils.BitmapUtils; -import org.maplibre.rctmln.R; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.events.ImageMissingEvent; -import org.maplibre.rctmln.utils.DownloadMapImageTask; -import org.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.mlrn.R; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.events.ImageMissingEvent; +import org.maplibre.mlrn.utils.DownloadMapImageTask; +import org.maplibre.mlrn.utils.ImageEntry; import java.util.AbstractMap; import java.util.ArrayList; @@ -28,12 +28,12 @@ import java.util.Set; import java.util.stream.Collectors; -public class RCTMLNImages extends AbstractMapFeature { +public class MLRNImages extends AbstractMapFeature { private static Bitmap mImagePlaceholder; Set mCurrentImages; private Map mImages; private Map mNativeImages; - private RCTMLNImagesManager mManager; + private MLRNImagesManager mManager; private boolean mSendMissingImageEvents = false; private MapLibreMap mMap; @@ -47,7 +47,7 @@ public void setID(String id) { mID = id; } - public RCTMLNImages(Context context, RCTMLNImagesManager manager) { + public MLRNImages(Context context, MLRNImagesManager manager) { super(context); mManager = manager; mCurrentImages = new HashSet<>(); @@ -93,7 +93,7 @@ public void setHasOnImageMissing(boolean value) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { removeImages(mapView); mMap = null; mNativeImages = new HashMap<>(); @@ -101,7 +101,7 @@ public void removeFromMap(RCTMLNMapView mapView) { mCurrentImages = new HashSet<>(); } - private void removeImages(RCTMLNMapView mapView) { + private void removeImages(MLRNMapView mapView) { mapView.getStyle(new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { @@ -136,14 +136,14 @@ public boolean addMissingImageToStyle(@NonNull String id, @NonNull MapLibreMap m if (mNativeImages != null) { BitmapDrawable drawable = mNativeImages.get(id); if (drawable != null) { - addNativeImages(RCTMLNImages.entry(id, drawable), map); + addNativeImages(MLRNImages.entry(id, drawable), map); return true; } } if (mImages != null) { ImageEntry entry = mImages.get(id); if (entry != null) { - addRemoteImages(RCTMLNImages.entry(id, entry), map); + addRemoteImages(MLRNImages.entry(id, entry), map); return true; } } @@ -175,7 +175,7 @@ private boolean hasImage(String imageId, @NonNull MapLibreMap map) { } @Override - public void addToMap(final RCTMLNMapView mapView) { + public void addToMap(final MLRNMapView mapView) { // Wait for style before adding the source to the map // only then we can pre-load required images / placeholders into the style // before we add the ShapeSource to the map diff --git a/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImagesManager.java b/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImagesManager.java similarity index 73% rename from android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImagesManager.java rename to android/src/main/java/org/maplibre/mlrn/components/images/MLRNImagesManager.java index 1002e9ca8..904c05b88 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/images/RCTMLNImagesManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImagesManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.images; +package org.maplibre.mlrn.components.images; import android.graphics.drawable.BitmapDrawable; @@ -11,12 +11,12 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.styles.sources.RCTMLNShapeSource; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.utils.ImageEntry; -import org.maplibre.rctmln.utils.ResourceUtils; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.styles.sources.MLRNShapeSource; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.utils.ImageEntry; +import org.maplibre.mlrn.utils.ResourceUtils; import java.util.AbstractMap; import java.util.ArrayList; @@ -24,34 +24,34 @@ import java.util.Map; -public class RCTMLNImagesManager extends AbstractEventEmitter { - public static final String REACT_CLASS = "RCTMLNImages"; +public class MLRNImagesManager extends AbstractEventEmitter { + public static final String REACT_CLASS = "MLRNImages"; private ReactApplicationContext mContext; @Override public String getName() { - return "RCTMLNImages"; + return "MLRNImages"; } - public RCTMLNImagesManager(ReactApplicationContext context) { + public MLRNImagesManager(ReactApplicationContext context) { super(context); mContext = context; } @Override - public RCTMLNImages createViewInstance(ThemedReactContext context) { - return new RCTMLNImages(context, this); + public MLRNImages createViewInstance(ThemedReactContext context) { + return new MLRNImages(context, this); } @ReactProp(name = "id") - public void setId(RCTMLNImages source, String id) { + public void setId(MLRNImages source, String id) { source.setID(id); } @ReactProp(name = "images") - public void setImages(RCTMLNImages images, ReadableMap map) { + public void setImages(MLRNImages images, ReadableMap map) { List> imagesList = new ArrayList<>(); ReadableMapKeySetIterator iterator = map.keySetIterator(); @@ -74,12 +74,12 @@ public void setImages(RCTMLNImages images, ReadableMap map) { } @ReactProp(name = "hasOnImageMissing") - public void setHasOnImageMissing(RCTMLNImages images, Boolean value) { + public void setHasOnImageMissing(MLRNImages images, Boolean value) { images.setHasOnImageMissing(value); } @ReactProp(name = "nativeImages") - public void setNativeImages(RCTMLNImages images, ReadableArray arr) { + public void setNativeImages(MLRNImages images, ReadableArray arr) { List> resources = new ArrayList<>(); for (int i = 0; i < arr.size(); i++) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/location/LocationComponentManager.java b/android/src/main/java/org/maplibre/mlrn/components/location/LocationComponentManager.java similarity index 94% rename from android/src/main/java/org/maplibre/rctmln/components/location/LocationComponentManager.java rename to android/src/main/java/org/maplibre/mlrn/components/location/LocationComponentManager.java index 74bcb6def..7c7454863 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/location/LocationComponentManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/location/LocationComponentManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.location; +package org.maplibre.mlrn.components.location; import android.annotation.SuppressLint; import android.content.Context; @@ -11,9 +11,9 @@ import org.maplibre.android.location.modes.RenderMode; import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; -import org.maplibre.rctmln.R; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.location.LocationManager; +import org.maplibre.mlrn.R; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.location.LocationManager; import androidx.annotation.NonNull; @@ -23,7 +23,7 @@ * And NativeUserLocation can ask for display of user's current location - independent of Camera's user tracking. */ public class LocationComponentManager { - private RCTMLNMapView mMapView = null; + private MLRNMapView mMapView = null; private MapLibreMap mMap = null; private LocationManager mLocationManager = null; @@ -32,8 +32,8 @@ public class LocationComponentManager { private @RenderMode.Mode int mRenderMode = RenderMode.COMPASS; - public LocationComponentManager(RCTMLNMapView rctmlnMapView, Context context) { - mMapView = rctmlnMapView; + public LocationComponentManager(MLRNMapView mlrnMapView, Context context) { + mMapView = mlrnMapView; mMap = mMapView.getMapboxMap(); mContext = context; diff --git a/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java b/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocation.java similarity index 81% rename from android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java rename to android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocation.java index 5f76aceb8..4b2b49fb3 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java +++ b/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocation.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.location; +package org.maplibre.mlrn.components.location; import android.annotation.SuppressLint; import android.content.Context; @@ -9,22 +9,22 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.OnMapReadyCallback; import org.maplibre.android.maps.Style; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; -public class RCTMLNNativeUserLocation extends AbstractMapFeature implements OnMapReadyCallback, Style.OnStyleLoaded { +public class MLRNNativeUserLocation extends AbstractMapFeature implements OnMapReadyCallback, Style.OnStyleLoaded { private boolean mEnabled = true; private MapLibreMap mMap; - private RCTMLNMapView mMapView; + private MLRNMapView mMapView; private @RenderMode.Mode int mRenderMode = RenderMode.COMPASS; private int mPreferredFramesPerSecond; - public RCTMLNNativeUserLocation(Context context) { + public MLRNNativeUserLocation(Context context) { super(context); } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mEnabled = true; mMapView = mapView; mapView.getMapAsync(this); @@ -33,7 +33,7 @@ public void addToMap(RCTMLNMapView mapView) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { mEnabled = false; if (mMap != null) mMap.getStyle(this); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java b/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocationManager.java similarity index 59% rename from android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java rename to android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocationManager.java index a54fa9d94..723bfbe0e 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocationManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.location; +package org.maplibre.mlrn.components.location; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; @@ -7,8 +7,8 @@ import javax.annotation.Nonnull; -public class RCTMLNNativeUserLocationManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNNativeUserLocation"; +public class MLRNNativeUserLocationManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNNativeUserLocation"; @Nonnull @Override @@ -17,7 +17,7 @@ public String getName() { } @ReactProp(name="androidRenderMode") - public void setAndroidRenderMode(RCTMLNNativeUserLocation userLocation, String mode) { + public void setAndroidRenderMode(MLRNNativeUserLocation userLocation, String mode) { if ("compass".equalsIgnoreCase(mode)) { userLocation.setRenderMode(RenderMode.COMPASS); } else if ("gps".equalsIgnoreCase(mode)) { @@ -28,13 +28,13 @@ public void setAndroidRenderMode(RCTMLNNativeUserLocation userLocation, String m } @ReactProp(name="androidPreferredFramesPerSecond") - public void setPreferredFramesPerSecond(RCTMLNNativeUserLocation userLocation, int preferredFramesPerSecond) { + public void setPreferredFramesPerSecond(MLRNNativeUserLocation userLocation, int preferredFramesPerSecond) { userLocation.setPreferredFramesPerSecond(preferredFramesPerSecond); } @Nonnull @Override - protected RCTMLNNativeUserLocation createViewInstance(@Nonnull ThemedReactContext reactContext) { - return new RCTMLNNativeUserLocation(reactContext); + protected MLRNNativeUserLocation createViewInstance(@Nonnull ThemedReactContext reactContext) { + return new MLRNNativeUserLocation(reactContext); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/mapview/LayerSourceInfo.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/LayerSourceInfo.java similarity index 98% rename from android/src/main/java/org/maplibre/rctmln/components/mapview/LayerSourceInfo.java rename to android/src/main/java/org/maplibre/mlrn/components/mapview/LayerSourceInfo.java index b80b53461..ecf28a72d 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/mapview/LayerSourceInfo.java +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/LayerSourceInfo.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.mapview; +package org.maplibre.mlrn.components.mapview; import org.maplibre.android.style.layers.CircleLayer; import org.maplibre.android.style.layers.FillExtrusionLayer; diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java new file mode 100644 index 000000000..2186a33d1 --- /dev/null +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java @@ -0,0 +1,16 @@ +package org.maplibre.mlrn.components.mapview; + +import android.content.Context; +import org.maplibre.android.maps.MapLibreMapOptions; +/** + * Created by hernanmateo on 12/11/18. + */ + +@SuppressWarnings({"MissingPermission"}) +public class MLRNAndroidTextureMapView extends MLRNMapView { + public static final String LOG_TAG = "MLRNAndroidTextureMapView"; + + public MLRNAndroidTextureMapView(Context context, MLRNAndroidTextureMapViewManager manager, MapLibreMapOptions options) { + super(context, manager, options); + } +} diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java new file mode 100644 index 000000000..d70ffdef7 --- /dev/null +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java @@ -0,0 +1,31 @@ +package org.maplibre.mlrn.components.mapview; + +import com.facebook.react.bridge.ReactApplicationContext; +import org.maplibre.android.maps.MapLibreMapOptions; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; + +/** + * Created by hernanmateo on 12/11/18. + */ + +public class MLRNAndroidTextureMapViewManager extends MLRNMapViewManager { + public static final String LOG_TAG = "MLRNAndroidTextureMapViewManager"; + public static final String REACT_CLASS = "MLRNAndroidTextureMapView"; + + public MLRNAndroidTextureMapViewManager(ReactApplicationContext context) { + super(context); + } + + @Override + public String getName() { + return REACT_CLASS; + } + + @Override + protected MLRNAndroidTextureMapView createViewInstance(ThemedReactContext themedReactContext) { + MapLibreMapOptions options = new MapLibreMapOptions(); + options.textureMode(true); + return new MLRNAndroidTextureMapView(themedReactContext, this, options); + } +} diff --git a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapView.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java similarity index 92% rename from android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapView.java rename to android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java index 38c837ce8..c2fb00e72 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapView.java +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.mapview; +package org.maplibre.mlrn.components.mapview; import android.content.Context; import android.graphics.Bitmap; @@ -49,29 +49,29 @@ import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.Layer; import org.maplibre.android.style.layers.Property; -import org.maplibre.rctmln.R; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; -import org.maplibre.rctmln.components.annotation.RCTMLNMarkerView; -import org.maplibre.rctmln.components.annotation.MarkerView; -import org.maplibre.rctmln.components.annotation.MarkerViewManager; -import org.maplibre.rctmln.components.camera.RCTMLNCamera; -import org.maplibre.rctmln.components.images.RCTMLNImages; -import org.maplibre.rctmln.components.location.LocationComponentManager; -import org.maplibre.rctmln.components.location.RCTMLNNativeUserLocation; -import org.maplibre.rctmln.components.mapview.helpers.CameraChangeTracker; -import org.maplibre.rctmln.components.styles.layers.RCTLayer; -import org.maplibre.rctmln.components.styles.light.RCTMLNLight; -import org.maplibre.rctmln.components.styles.sources.RCTMLNShapeSource; -import org.maplibre.rctmln.components.styles.sources.RCTSource; -import org.maplibre.rctmln.events.AndroidCallbackEvent; -import org.maplibre.rctmln.events.IEvent; -import org.maplibre.rctmln.events.MapChangeEvent; -import org.maplibre.rctmln.events.MapClickEvent; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.BitmapUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; -import org.maplibre.rctmln.utils.GeoViewport; +import org.maplibre.mlrn.R; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.annotation.MLRNPointAnnotation; +import org.maplibre.mlrn.components.annotation.MLRNMarkerView; +import org.maplibre.mlrn.components.annotation.MarkerView; +import org.maplibre.mlrn.components.annotation.MarkerViewManager; +import org.maplibre.mlrn.components.camera.MLRNCamera; +import org.maplibre.mlrn.components.images.MLRNImages; +import org.maplibre.mlrn.components.location.LocationComponentManager; +import org.maplibre.mlrn.components.location.MLRNNativeUserLocation; +import org.maplibre.mlrn.components.mapview.helpers.CameraChangeTracker; +import org.maplibre.mlrn.components.styles.layers.RCTLayer; +import org.maplibre.mlrn.components.styles.light.MLRNLight; +import org.maplibre.mlrn.components.styles.sources.MLRNShapeSource; +import org.maplibre.mlrn.components.styles.sources.RCTSource; +import org.maplibre.mlrn.events.AndroidCallbackEvent; +import org.maplibre.mlrn.events.IEvent; +import org.maplibre.mlrn.events.MapChangeEvent; +import org.maplibre.mlrn.events.MapClickEvent; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.BitmapUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.mlrn.utils.GeoViewport; import java.util.ArrayList; import java.util.Arrays; @@ -85,34 +85,34 @@ import javax.annotation.Nullable; import static org.maplibre.android.style.layers.PropertyFactory.visibility; -import static org.maplibre.rctmln.modules.RCTMLNOfflineModule.DEFAULT_STYLE_URL; +import static org.maplibre.mlrn.modules.MLRNOfflineModule.DEFAULT_STYLE_URL; /** * Created by nickitaliano on 8/18/17. */ @SuppressWarnings({ "MissingPermission" }) -public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLibreMap.OnMapClickListener, +public class MLRNMapView extends MapView implements OnMapReadyCallback, MapLibreMap.OnMapClickListener, MapLibreMap.OnMapLongClickListener, MapView.OnCameraIsChangingListener, MapView.OnCameraDidChangeListener, MapView.OnDidFailLoadingMapListener, MapView.OnDidFinishLoadingMapListener, MapView.OnWillStartRenderingFrameListener, MapView.OnWillStartRenderingMapListener, MapView.OnDidFinishRenderingFrameListener, MapView.OnDidFinishRenderingMapListener, MapView.OnDidFinishLoadingStyleListener, MapView.OnStyleImageMissingListener { - public static final String LOG_TAG = "RCTMLNMapView"; + public static final String LOG_TAG = "MLRNMapView"; - private RCTMLNMapViewManager mManager; + private MLRNMapViewManager mManager; private Context mContext; private Handler mHandler; private LifecycleEventListener mLifeCycleListener; private boolean mPaused; private boolean mDestroyed; - private RCTMLNCamera mCamera; + private MLRNCamera mCamera; private List mFeatures; private List mQueuedFeatures; - private Map mPointAnnotations; + private Map mPointAnnotations; private Map mSources; - private List mImages; + private List mImages; private CameraChangeTracker mCameraChangeTracker = new CameraChangeTracker(); private List> mPreRenderMethods = new ArrayList<>(); @@ -156,7 +156,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib private @Nullable Integer mTintColor = null; - public RCTMLNMapView(Context context, RCTMLNMapViewManager manager, MapLibreMapOptions options) { + public MLRNMapView(Context context, MLRNMapViewManager manager, MapLibreMapOptions options) { super(context, options); mContext = context; @@ -221,23 +221,23 @@ public void addFeature(View childView, int childPosition) { RCTSource source = (RCTSource) childView; mSources.put(source.getID(), source); feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTMLNImages) { - RCTMLNImages images = (RCTMLNImages) childView; + } else if (childView instanceof MLRNImages) { + MLRNImages images = (MLRNImages) childView; mImages.add(images); feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTMLNLight) { + } else if (childView instanceof MLRNLight) { feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTMLNNativeUserLocation) { + } else if (childView instanceof MLRNNativeUserLocation) { feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTMLNPointAnnotation) { - RCTMLNPointAnnotation annotation = (RCTMLNPointAnnotation) childView; + } else if (childView instanceof MLRNPointAnnotation) { + MLRNPointAnnotation annotation = (MLRNPointAnnotation) childView; mPointAnnotations.put(annotation.getID(), annotation); feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTMLNMarkerView) { - RCTMLNMarkerView marker = (RCTMLNMarkerView) childView; + } else if (childView instanceof MLRNMarkerView) { + MLRNMarkerView marker = (MLRNMarkerView) childView; feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTMLNCamera) { - mCamera = (RCTMLNCamera) childView; + } else if (childView instanceof MLRNCamera) { + mCamera = (MLRNCamera) childView; feature = (AbstractMapFeature) childView; } else if (childView instanceof RCTLayer) { feature = (RCTLayer) childView; @@ -269,16 +269,16 @@ public void removeFeature(int childPosition) { if (feature instanceof RCTSource) { RCTSource source = (RCTSource) feature; mSources.remove(source.getID()); - } else if (feature instanceof RCTMLNPointAnnotation) { - RCTMLNPointAnnotation annotation = (RCTMLNPointAnnotation) feature; + } else if (feature instanceof MLRNPointAnnotation) { + MLRNPointAnnotation annotation = (MLRNPointAnnotation) feature; if (annotation.getMapboxID() == mActiveMarkerID) { mActiveMarkerID = -1; } mPointAnnotations.remove(annotation.getID()); - } else if (feature instanceof RCTMLNImages) { - RCTMLNImages images = (RCTMLNImages) feature; + } else if (feature instanceof MLRNImages) { + MLRNImages images = (MLRNImages) feature; mImages.remove(images); } @@ -359,13 +359,13 @@ public void easeCamera(CameraUpdate cameraUpdate) { mMap.easeCamera(cameraUpdate); } - public RCTMLNPointAnnotation getPointAnnotationByID(String annotationID) { + public MLRNPointAnnotation getPointAnnotationByID(String annotationID) { if (annotationID == null) { return null; } for (String key : mPointAnnotations.keySet()) { - RCTMLNPointAnnotation annotation = mPointAnnotations.get(key); + MLRNPointAnnotation annotation = mPointAnnotations.get(key); if (annotation != null && annotationID.equals(annotation.getID())) { return annotation; @@ -375,9 +375,9 @@ public RCTMLNPointAnnotation getPointAnnotationByID(String annotationID) { return null; } - public RCTMLNPointAnnotation getPointAnnotationByMarkerID(long markerID) { + public MLRNPointAnnotation getPointAnnotationByMarkerID(long markerID) { for (String key : mPointAnnotations.keySet()) { - RCTMLNPointAnnotation annotation = mPointAnnotations.get(key); + MLRNPointAnnotation annotation = mPointAnnotations.get(key); if (annotation != null && markerID == annotation.getMapboxID()) { return annotation; @@ -531,7 +531,7 @@ public boolean onAnnotationClick(Symbol symbol) { public void onAnnotationDragStarted(Symbol symbol) { mAnnotationClicked = true; final long selectedMarkerID = symbol.getId(); - RCTMLNPointAnnotation annotation = getPointAnnotationByMarkerID(selectedMarkerID); + MLRNPointAnnotation annotation = getPointAnnotationByMarkerID(selectedMarkerID); if (annotation != null) { annotation.onDragStart(); } @@ -540,7 +540,7 @@ public void onAnnotationDragStarted(Symbol symbol) { @Override public void onAnnotationDrag(Symbol symbol) { final long selectedMarkerID = symbol.getId(); - RCTMLNPointAnnotation annotation = getPointAnnotationByMarkerID(selectedMarkerID); + MLRNPointAnnotation annotation = getPointAnnotationByMarkerID(selectedMarkerID); if (annotation != null) { annotation.onDrag(); } @@ -550,7 +550,7 @@ public void onAnnotationDrag(Symbol symbol) { public void onAnnotationDragFinished(Symbol symbol) { mAnnotationClicked = false; final long selectedMarkerID = symbol.getId(); - RCTMLNPointAnnotation annotation = getPointAnnotationByMarkerID(selectedMarkerID); + MLRNPointAnnotation annotation = getPointAnnotationByMarkerID(selectedMarkerID); if (annotation != null) { annotation.onDragEnd(); } @@ -572,7 +572,7 @@ public void addQueuedFeatures() { } private void setupLocalization(Style style) { - mLocalizationPlugin = new LocalizationPlugin(RCTMLNMapView.this, mMap, style); + mLocalizationPlugin = new LocalizationPlugin(MLRNMapView.this, mMap, style); if (mLocalizeLabels) { try { mLocalizationPlugin.matchMapLanguageWithDeviceDefault(); @@ -671,11 +671,11 @@ public void onMarkerClick(@NonNull Symbol symbol) { mAnnotationClicked = true; final long selectedMarkerID = symbol.getId(); - RCTMLNPointAnnotation activeAnnotation = null; - RCTMLNPointAnnotation nextActiveAnnotation = null; + MLRNPointAnnotation activeAnnotation = null; + MLRNPointAnnotation nextActiveAnnotation = null; for (String key : mPointAnnotations.keySet()) { - RCTMLNPointAnnotation annotation = mPointAnnotations.get(key); + MLRNPointAnnotation annotation = mPointAnnotations.get(key); final long curMarkerID = annotation.getMapboxID(); if (mActiveMarkerID == curMarkerID) { activeAnnotation = annotation; @@ -695,12 +695,12 @@ public void onMarkerClick(@NonNull Symbol symbol) { } - public void selectAnnotation(RCTMLNPointAnnotation annotation) { + public void selectAnnotation(MLRNPointAnnotation annotation) { mActiveMarkerID = annotation.getMapboxID(); annotation.onSelect(true); } - public void deselectAnnotation(RCTMLNPointAnnotation annotation) { + public void deselectAnnotation(MLRNPointAnnotation annotation) { mActiveMarkerID = -1; annotation.onDeselect(); } @@ -766,12 +766,12 @@ public void onDidFinishLoadingStyle() { @Override public void onStyleImageMissing(@NonNull String id) { - for (RCTMLNImages images : mImages) { + for (MLRNImages images : mImages) { if (images.addMissingImageToStyle(id, mMap)) { return; } } - for (RCTMLNImages images : mImages) { + for (MLRNImages images : mImages) { images.sendImageMissingEvent(id, mMap); } } @@ -1023,7 +1023,7 @@ public void onSnapshotReady(Bitmap snapshot) { : BitmapUtils.createBase64(snapshot); payload.putString("uri", uri); - AndroidCallbackEvent event = new AndroidCallbackEvent(RCTMLNMapView.this, callbackID, payload); + AndroidCallbackEvent event = new AndroidCallbackEvent(MLRNMapView.this, callbackID, payload); mManager.handleEvent(event); } }); @@ -1349,14 +1349,14 @@ private List getAllTouchableSources() { return sources; } - private List getAllShapeSources() { - List shapeSources = new ArrayList<>(); + private List getAllShapeSources() { + List shapeSources = new ArrayList<>(); for (String key : mSources.keySet()) { RCTSource source = mSources.get(key); - if (source instanceof RCTMLNShapeSource) { - shapeSources.add((RCTMLNShapeSource) source); + if (source instanceof MLRNShapeSource) { + shapeSources.add((MLRNShapeSource) source); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapViewManager.java similarity index 77% rename from android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java rename to android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapViewManager.java index e37841f32..2c030c32b 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapViewManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.mapview; +package org.maplibre.mlrn.components.mapview; import android.util.Log; import android.view.Gravity; @@ -14,11 +14,11 @@ import org.maplibre.android.geometry.LatLngBounds; import org.maplibre.android.log.Logger; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.ExpressionParser; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.ExpressionParser; +import org.maplibre.mlrn.utils.GeoJSONUtils; import org.maplibre.geojson.FeatureCollection; import org.maplibre.geojson.Point; @@ -37,13 +37,13 @@ * Created by nickitaliano on 8/18/17. */ -public class RCTMLNMapViewManager extends AbstractEventEmitter { - public static final String LOG_TAG = "RCTMLNMapViewManager"; - public static final String REACT_CLASS = "RCTMLNMapView"; +public class MLRNMapViewManager extends AbstractEventEmitter { + public static final String LOG_TAG = "MLRNMapViewManager"; + public static final String REACT_CLASS = "MLRNMapView"; - private Map mViews; + private Map mViews; - public RCTMLNMapViewManager(ReactApplicationContext context) { + public MLRNMapViewManager(ReactApplicationContext context) { super(context); mViews = new HashMap<>(); } @@ -64,7 +64,7 @@ public Class getShadowNodeClass() { } @Override - protected void onAfterUpdateTransaction(RCTMLNMapView mapView) { + protected void onAfterUpdateTransaction(MLRNMapView mapView) { super.onAfterUpdateTransaction(mapView); if (mapView.getMapboxMap() == null) { @@ -74,32 +74,32 @@ protected void onAfterUpdateTransaction(RCTMLNMapView mapView) { } @Override - public void addView(RCTMLNMapView mapView, View childView, int childPosition) { + public void addView(MLRNMapView mapView, View childView, int childPosition) { mapView.addFeature(childView, childPosition); } @Override - public int getChildCount(RCTMLNMapView mapView) { + public int getChildCount(MLRNMapView mapView) { return mapView.getFeatureCount(); } @Override - public View getChildAt(RCTMLNMapView mapView, int index) { + public View getChildAt(MLRNMapView mapView, int index) { return mapView.getFeatureAt(index); } @Override - public void removeViewAt(RCTMLNMapView mapView, int index) { + public void removeViewAt(MLRNMapView mapView, int index) { mapView.removeFeature(index); } @Override - protected RCTMLNMapView createViewInstance(ThemedReactContext themedReactContext) { - return new RCTMLNMapView(themedReactContext, this, null); + protected MLRNMapView createViewInstance(ThemedReactContext themedReactContext) { + return new MLRNMapView(themedReactContext, this, null); } @Override - public void onDropViewInstance(RCTMLNMapView mapView) { + public void onDropViewInstance(MLRNMapView mapView) { int reactTag = mapView.getId(); if (mViews.containsKey(reactTag)) { @@ -109,89 +109,89 @@ public void onDropViewInstance(RCTMLNMapView mapView) { super.onDropViewInstance(mapView); } - public RCTMLNMapView getByReactTag(int reactTag) { + public MLRNMapView getByReactTag(int reactTag) { return mViews.get(reactTag); } //region React Props @ReactProp(name="styleURL") - public void setStyleURL(RCTMLNMapView mapView, String styleURL) { + public void setStyleURL(MLRNMapView mapView, String styleURL) { mapView.setReactStyleURL(styleURL); } @ReactProp(name="preferredFramesPerSecond") - public void setPreferredFramesPerSecond(RCTMLNMapView mapView, int preferredFramesPerSecond) { + public void setPreferredFramesPerSecond(MLRNMapView mapView, int preferredFramesPerSecond) { mapView.setReactPreferredFramesPerSecond(preferredFramesPerSecond); } @ReactProp(name="localizeLabels") - public void setLocalizeLabels(RCTMLNMapView mapView, boolean localizeLabels) { + public void setLocalizeLabels(MLRNMapView mapView, boolean localizeLabels) { mapView.setLocalizeLabels(localizeLabels); } @ReactProp(name="zoomEnabled") - public void setZoomEnabled(RCTMLNMapView mapView, boolean zoomEnabled) { + public void setZoomEnabled(MLRNMapView mapView, boolean zoomEnabled) { mapView.setReactZoomEnabled(zoomEnabled); } @ReactProp(name="scrollEnabled") - public void setScrollEnabled(RCTMLNMapView mapView, boolean scrollEnabled) { + public void setScrollEnabled(MLRNMapView mapView, boolean scrollEnabled) { mapView.setReactScrollEnabled(scrollEnabled); } @ReactProp(name="pitchEnabled") - public void setPitchEnabled(RCTMLNMapView mapView, boolean pitchEnabled) { + public void setPitchEnabled(MLRNMapView mapView, boolean pitchEnabled) { mapView.setReactPitchEnabled(pitchEnabled); } @ReactProp(name="rotateEnabled") - public void setRotateEnabled(RCTMLNMapView mapView, boolean rotateEnabled) { + public void setRotateEnabled(MLRNMapView mapView, boolean rotateEnabled) { mapView.setReactRotateEnabled(rotateEnabled); } @ReactProp(name="attributionEnabled") - public void setAttributionEnabled(RCTMLNMapView mapView, boolean attributionEnabled) { + public void setAttributionEnabled(MLRNMapView mapView, boolean attributionEnabled) { mapView.setReactAttributionEnabled(attributionEnabled); } @ReactProp(name="attributionPosition") - public void setAttributionPosition(RCTMLNMapView mapView, @Nullable ReadableMap attributionPosition) { + public void setAttributionPosition(MLRNMapView mapView, @Nullable ReadableMap attributionPosition) { mapView.setReactAttributionPosition(attributionPosition); } @ReactProp(name="logoEnabled") - public void setLogoEnabled(RCTMLNMapView mapView, boolean logoEnabled) { + public void setLogoEnabled(MLRNMapView mapView, boolean logoEnabled) { mapView.setReactLogoEnabled(logoEnabled); } @ReactProp(name="logoPosition") - public void setLogoPosition(RCTMLNMapView mapView, ReadableMap logoPosition) { + public void setLogoPosition(MLRNMapView mapView, ReadableMap logoPosition) { mapView.setReactLogoPosition(logoPosition); } @ReactProp(name="compassEnabled") - public void setCompassEnabled(RCTMLNMapView mapView, boolean compassEnabled) { + public void setCompassEnabled(MLRNMapView mapView, boolean compassEnabled) { mapView.setReactCompassEnabled(compassEnabled); } @ReactProp(name="compassViewMargins") - public void setCompassViewMargins(RCTMLNMapView mapView, ReadableMap compassViewMargins){ + public void setCompassViewMargins(MLRNMapView mapView, ReadableMap compassViewMargins){ mapView.setReactCompassViewMargins(compassViewMargins); } @ReactProp(name="compassViewPosition") - public void setCompassViewPosition(RCTMLNMapView mapView, int compassViewPosition) { + public void setCompassViewPosition(MLRNMapView mapView, int compassViewPosition) { mapView.setReactCompassViewPosition(compassViewPosition); } @ReactProp(name="contentInset") - public void setContentInset(RCTMLNMapView mapView, ReadableArray array) { + public void setContentInset(MLRNMapView mapView, ReadableArray array) { mapView.setReactContentInset(array); } @ReactProp(name = "tintColor", customType = "Color") - public void setTintColor(RCTMLNMapView mapView, @Nullable Integer tintColor) { + public void setTintColor(MLRNMapView mapView, @Nullable Integer tintColor) { mapView.setTintColor(tintColor); } @@ -245,7 +245,7 @@ public Map getCommandsMap() { } @Override - public void receiveCommand(RCTMLNMapView mapView, int commandID, @Nullable ReadableArray args) { + public void receiveCommand(MLRNMapView mapView, int commandID, @Nullable ReadableArray args) { // allows method calls to work with componentDidMount MapLibreMap mapboxMap = mapView.getMapboxMap(); if (mapboxMap == null) { @@ -311,9 +311,9 @@ public void receiveCommand(RCTMLNMapView mapView, int commandID, @Nullable Reada //endregion private static final class MapShadowNode extends LayoutShadowNode { - private RCTMLNMapViewManager mViewManager; + private MLRNMapViewManager mViewManager; - public MapShadowNode(RCTMLNMapViewManager viewManager) { + public MapShadowNode(MLRNMapViewManager viewManager) { mViewManager = viewManager; } @@ -328,7 +328,7 @@ public void dispose() { * onDropViewInstance. */ private void diposeNativeMapView() { - final RCTMLNMapView mapView = mViewManager.getByReactTag(getReactTag()); + final MLRNMapView mapView = mViewManager.getByReactTag(getReactTag()); if (mapView != null) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/helpers/CameraChangeTracker.java similarity index 94% rename from android/src/main/java/org/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java rename to android/src/main/java/org/maplibre/mlrn/components/mapview/helpers/CameraChangeTracker.java index e004d9592..9d1350e18 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/helpers/CameraChangeTracker.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.mapview.helpers; +package org.maplibre.mlrn.components.mapview.helpers; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyle.java b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyle.java similarity index 74% rename from android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyle.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyle.java index 1fb256873..71b571faa 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyle.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyle.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles; +package org.maplibre.mlrn.components.styles; import android.content.Context; import androidx.annotation.NonNull; @@ -6,8 +6,8 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.utils.DownloadMapImageTask; -import org.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.mlrn.utils.DownloadMapImageTask; +import org.maplibre.mlrn.utils.ImageEntry; import java.util.AbstractMap; import java.util.ArrayList; @@ -18,12 +18,12 @@ * Created by nickitaliano on 9/12/17. */ -public class RCTMLNStyle { +public class MLRNStyle { private Context mContext; private ReadableMap mReactStyle; private MapLibreMap mMap; - public RCTMLNStyle(@NonNull Context context, @NonNull ReadableMap reactStyle, @NonNull MapLibreMap map) { + public MLRNStyle(@NonNull Context context, @NonNull ReadableMap reactStyle, @NonNull MapLibreMap map) { mContext = context; mReactStyle = reactStyle; mMap = map; @@ -48,7 +48,7 @@ public List getAllStyleKeys() { return keys; } - public RCTMLNStyleValue getStyleValueForKey(String styleKey) { + public MLRNStyleValue getStyleValueForKey(String styleKey) { ReadableMap styleValueConfig = mReactStyle.getMap(styleKey); if (styleValueConfig == null) { @@ -56,18 +56,18 @@ public RCTMLNStyleValue getStyleValueForKey(String styleKey) { return null; } - return new RCTMLNStyleValue(styleValueConfig); + return new MLRNStyleValue(styleValueConfig); } - public void addImage(RCTMLNStyleValue styleValue) { + public void addImage(MLRNStyleValue styleValue) { addImage(styleValue, null); } - public ImageEntry imageEntry(RCTMLNStyleValue styleValue) { + public ImageEntry imageEntry(MLRNStyleValue styleValue) { return new ImageEntry(styleValue.getImageURI(), styleValue.getImageScale()); } - public void addImage(RCTMLNStyleValue styleValue, DownloadMapImageTask.OnAllImagesLoaded callback) { + public void addImage(MLRNStyleValue styleValue, DownloadMapImageTask.OnAllImagesLoaded callback) { if (!styleValue.shouldAddImage()) { if (callback != null) { callback.onAllImagesLoaded(); diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFactory.java similarity index 72% rename from android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFactory.java index 7c753cbae..0d229281a 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFactory.java @@ -1,7 +1,7 @@ // DO NOT MODIFY -// This file is auto-generated from scripts/templates/RCTMLNStyleFactory.java.ejs +// This file is auto-generated from scripts/templates/MLRNStyleFactory.java.ejs -package org.maplibre.rctmln.components.styles; +package org.maplibre.mlrn.components.styles; import org.maplibre.android.style.layers.BackgroundLayer; import org.maplibre.android.style.layers.CircleLayer; @@ -17,15 +17,15 @@ import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import org.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.mlrn.utils.DownloadMapImageTask; import java.util.List; -public class RCTMLNStyleFactory { +public class MLRNStyleFactory { public static final String VALUE_KEY = "value"; public static final String SHOULD_ADD_IMAGE_KEY = "shouldAddImage"; - public static void setFillLayerStyle(final FillLayer layer, RCTMLNStyle style) { + public static void setFillLayerStyle(final FillLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -33,60 +33,60 @@ public static void setFillLayerStyle(final FillLayer layer, RCTMLNStyle style) { } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "fillSortKey": - RCTMLNStyleFactory.setFillSortKey(layer, styleValue); + MLRNStyleFactory.setFillSortKey(layer, styleValue); break; case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "fillAntialias": - RCTMLNStyleFactory.setFillAntialias(layer, styleValue); + MLRNStyleFactory.setFillAntialias(layer, styleValue); break; case "fillOpacity": - RCTMLNStyleFactory.setFillOpacity(layer, styleValue); + MLRNStyleFactory.setFillOpacity(layer, styleValue); break; case "fillOpacityTransition": - RCTMLNStyleFactory.setFillOpacityTransition(layer, styleValue); + MLRNStyleFactory.setFillOpacityTransition(layer, styleValue); break; case "fillColor": - RCTMLNStyleFactory.setFillColor(layer, styleValue); + MLRNStyleFactory.setFillColor(layer, styleValue); break; case "fillColorTransition": - RCTMLNStyleFactory.setFillColorTransition(layer, styleValue); + MLRNStyleFactory.setFillColorTransition(layer, styleValue); break; case "fillOutlineColor": - RCTMLNStyleFactory.setFillOutlineColor(layer, styleValue); + MLRNStyleFactory.setFillOutlineColor(layer, styleValue); break; case "fillOutlineColorTransition": - RCTMLNStyleFactory.setFillOutlineColorTransition(layer, styleValue); + MLRNStyleFactory.setFillOutlineColorTransition(layer, styleValue); break; case "fillTranslate": - RCTMLNStyleFactory.setFillTranslate(layer, styleValue); + MLRNStyleFactory.setFillTranslate(layer, styleValue); break; case "fillTranslateTransition": - RCTMLNStyleFactory.setFillTranslateTransition(layer, styleValue); + MLRNStyleFactory.setFillTranslateTransition(layer, styleValue); break; case "fillTranslateAnchor": - RCTMLNStyleFactory.setFillTranslateAnchor(layer, styleValue); + MLRNStyleFactory.setFillTranslateAnchor(layer, styleValue); break; case "fillPattern": style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() { @Override public void onAllImagesLoaded() { - RCTMLNStyleFactory.setFillPattern(layer, styleValue); + MLRNStyleFactory.setFillPattern(layer, styleValue); } }); break; case "fillPatternTransition": - RCTMLNStyleFactory.setFillPatternTransition(layer, styleValue); + MLRNStyleFactory.setFillPatternTransition(layer, styleValue); break; } } } - public static void setLineLayerStyle(final LineLayer layer, RCTMLNStyle style) { + public static void setLineLayerStyle(final LineLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -94,96 +94,96 @@ public static void setLineLayerStyle(final LineLayer layer, RCTMLNStyle style) { } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "lineCap": - RCTMLNStyleFactory.setLineCap(layer, styleValue); + MLRNStyleFactory.setLineCap(layer, styleValue); break; case "lineJoin": - RCTMLNStyleFactory.setLineJoin(layer, styleValue); + MLRNStyleFactory.setLineJoin(layer, styleValue); break; case "lineMiterLimit": - RCTMLNStyleFactory.setLineMiterLimit(layer, styleValue); + MLRNStyleFactory.setLineMiterLimit(layer, styleValue); break; case "lineRoundLimit": - RCTMLNStyleFactory.setLineRoundLimit(layer, styleValue); + MLRNStyleFactory.setLineRoundLimit(layer, styleValue); break; case "lineSortKey": - RCTMLNStyleFactory.setLineSortKey(layer, styleValue); + MLRNStyleFactory.setLineSortKey(layer, styleValue); break; case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "lineOpacity": - RCTMLNStyleFactory.setLineOpacity(layer, styleValue); + MLRNStyleFactory.setLineOpacity(layer, styleValue); break; case "lineOpacityTransition": - RCTMLNStyleFactory.setLineOpacityTransition(layer, styleValue); + MLRNStyleFactory.setLineOpacityTransition(layer, styleValue); break; case "lineColor": - RCTMLNStyleFactory.setLineColor(layer, styleValue); + MLRNStyleFactory.setLineColor(layer, styleValue); break; case "lineColorTransition": - RCTMLNStyleFactory.setLineColorTransition(layer, styleValue); + MLRNStyleFactory.setLineColorTransition(layer, styleValue); break; case "lineTranslate": - RCTMLNStyleFactory.setLineTranslate(layer, styleValue); + MLRNStyleFactory.setLineTranslate(layer, styleValue); break; case "lineTranslateTransition": - RCTMLNStyleFactory.setLineTranslateTransition(layer, styleValue); + MLRNStyleFactory.setLineTranslateTransition(layer, styleValue); break; case "lineTranslateAnchor": - RCTMLNStyleFactory.setLineTranslateAnchor(layer, styleValue); + MLRNStyleFactory.setLineTranslateAnchor(layer, styleValue); break; case "lineWidth": - RCTMLNStyleFactory.setLineWidth(layer, styleValue); + MLRNStyleFactory.setLineWidth(layer, styleValue); break; case "lineWidthTransition": - RCTMLNStyleFactory.setLineWidthTransition(layer, styleValue); + MLRNStyleFactory.setLineWidthTransition(layer, styleValue); break; case "lineGapWidth": - RCTMLNStyleFactory.setLineGapWidth(layer, styleValue); + MLRNStyleFactory.setLineGapWidth(layer, styleValue); break; case "lineGapWidthTransition": - RCTMLNStyleFactory.setLineGapWidthTransition(layer, styleValue); + MLRNStyleFactory.setLineGapWidthTransition(layer, styleValue); break; case "lineOffset": - RCTMLNStyleFactory.setLineOffset(layer, styleValue); + MLRNStyleFactory.setLineOffset(layer, styleValue); break; case "lineOffsetTransition": - RCTMLNStyleFactory.setLineOffsetTransition(layer, styleValue); + MLRNStyleFactory.setLineOffsetTransition(layer, styleValue); break; case "lineBlur": - RCTMLNStyleFactory.setLineBlur(layer, styleValue); + MLRNStyleFactory.setLineBlur(layer, styleValue); break; case "lineBlurTransition": - RCTMLNStyleFactory.setLineBlurTransition(layer, styleValue); + MLRNStyleFactory.setLineBlurTransition(layer, styleValue); break; case "lineDasharray": - RCTMLNStyleFactory.setLineDasharray(layer, styleValue); + MLRNStyleFactory.setLineDasharray(layer, styleValue); break; case "lineDasharrayTransition": - RCTMLNStyleFactory.setLineDasharrayTransition(layer, styleValue); + MLRNStyleFactory.setLineDasharrayTransition(layer, styleValue); break; case "linePattern": style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() { @Override public void onAllImagesLoaded() { - RCTMLNStyleFactory.setLinePattern(layer, styleValue); + MLRNStyleFactory.setLinePattern(layer, styleValue); } }); break; case "linePatternTransition": - RCTMLNStyleFactory.setLinePatternTransition(layer, styleValue); + MLRNStyleFactory.setLinePatternTransition(layer, styleValue); break; case "lineGradient": - RCTMLNStyleFactory.setLineGradient(layer, styleValue); + MLRNStyleFactory.setLineGradient(layer, styleValue); break; } } } - public static void setSymbolLayerStyle(final SymbolLayer layer, RCTMLNStyle style) { + public static void setSymbolLayerStyle(final SymbolLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -191,222 +191,222 @@ public static void setSymbolLayerStyle(final SymbolLayer layer, RCTMLNStyle styl } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "symbolPlacement": - RCTMLNStyleFactory.setSymbolPlacement(layer, styleValue); + MLRNStyleFactory.setSymbolPlacement(layer, styleValue); break; case "symbolSpacing": - RCTMLNStyleFactory.setSymbolSpacing(layer, styleValue); + MLRNStyleFactory.setSymbolSpacing(layer, styleValue); break; case "symbolAvoidEdges": - RCTMLNStyleFactory.setSymbolAvoidEdges(layer, styleValue); + MLRNStyleFactory.setSymbolAvoidEdges(layer, styleValue); break; case "symbolSortKey": - RCTMLNStyleFactory.setSymbolSortKey(layer, styleValue); + MLRNStyleFactory.setSymbolSortKey(layer, styleValue); break; case "symbolZOrder": - RCTMLNStyleFactory.setSymbolZOrder(layer, styleValue); + MLRNStyleFactory.setSymbolZOrder(layer, styleValue); break; case "iconAllowOverlap": - RCTMLNStyleFactory.setIconAllowOverlap(layer, styleValue); + MLRNStyleFactory.setIconAllowOverlap(layer, styleValue); break; case "iconIgnorePlacement": - RCTMLNStyleFactory.setIconIgnorePlacement(layer, styleValue); + MLRNStyleFactory.setIconIgnorePlacement(layer, styleValue); break; case "iconOptional": - RCTMLNStyleFactory.setIconOptional(layer, styleValue); + MLRNStyleFactory.setIconOptional(layer, styleValue); break; case "iconRotationAlignment": - RCTMLNStyleFactory.setIconRotationAlignment(layer, styleValue); + MLRNStyleFactory.setIconRotationAlignment(layer, styleValue); break; case "iconSize": - RCTMLNStyleFactory.setIconSize(layer, styleValue); + MLRNStyleFactory.setIconSize(layer, styleValue); break; case "iconTextFit": - RCTMLNStyleFactory.setIconTextFit(layer, styleValue); + MLRNStyleFactory.setIconTextFit(layer, styleValue); break; case "iconTextFitPadding": - RCTMLNStyleFactory.setIconTextFitPadding(layer, styleValue); + MLRNStyleFactory.setIconTextFitPadding(layer, styleValue); break; case "iconImage": style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() { @Override public void onAllImagesLoaded() { - RCTMLNStyleFactory.setIconImage(layer, styleValue); + MLRNStyleFactory.setIconImage(layer, styleValue); } }); break; case "iconRotate": - RCTMLNStyleFactory.setIconRotate(layer, styleValue); + MLRNStyleFactory.setIconRotate(layer, styleValue); break; case "iconPadding": - RCTMLNStyleFactory.setIconPadding(layer, styleValue); + MLRNStyleFactory.setIconPadding(layer, styleValue); break; case "iconKeepUpright": - RCTMLNStyleFactory.setIconKeepUpright(layer, styleValue); + MLRNStyleFactory.setIconKeepUpright(layer, styleValue); break; case "iconOffset": - RCTMLNStyleFactory.setIconOffset(layer, styleValue); + MLRNStyleFactory.setIconOffset(layer, styleValue); break; case "iconAnchor": - RCTMLNStyleFactory.setIconAnchor(layer, styleValue); + MLRNStyleFactory.setIconAnchor(layer, styleValue); break; case "iconPitchAlignment": - RCTMLNStyleFactory.setIconPitchAlignment(layer, styleValue); + MLRNStyleFactory.setIconPitchAlignment(layer, styleValue); break; case "textPitchAlignment": - RCTMLNStyleFactory.setTextPitchAlignment(layer, styleValue); + MLRNStyleFactory.setTextPitchAlignment(layer, styleValue); break; case "textRotationAlignment": - RCTMLNStyleFactory.setTextRotationAlignment(layer, styleValue); + MLRNStyleFactory.setTextRotationAlignment(layer, styleValue); break; case "textField": - RCTMLNStyleFactory.setTextField(layer, styleValue); + MLRNStyleFactory.setTextField(layer, styleValue); break; case "textFont": - RCTMLNStyleFactory.setTextFont(layer, styleValue); + MLRNStyleFactory.setTextFont(layer, styleValue); break; case "textSize": - RCTMLNStyleFactory.setTextSize(layer, styleValue); + MLRNStyleFactory.setTextSize(layer, styleValue); break; case "textMaxWidth": - RCTMLNStyleFactory.setTextMaxWidth(layer, styleValue); + MLRNStyleFactory.setTextMaxWidth(layer, styleValue); break; case "textLineHeight": - RCTMLNStyleFactory.setTextLineHeight(layer, styleValue); + MLRNStyleFactory.setTextLineHeight(layer, styleValue); break; case "textLetterSpacing": - RCTMLNStyleFactory.setTextLetterSpacing(layer, styleValue); + MLRNStyleFactory.setTextLetterSpacing(layer, styleValue); break; case "textJustify": - RCTMLNStyleFactory.setTextJustify(layer, styleValue); + MLRNStyleFactory.setTextJustify(layer, styleValue); break; case "textRadialOffset": - RCTMLNStyleFactory.setTextRadialOffset(layer, styleValue); + MLRNStyleFactory.setTextRadialOffset(layer, styleValue); break; case "textVariableAnchor": - RCTMLNStyleFactory.setTextVariableAnchor(layer, styleValue); + MLRNStyleFactory.setTextVariableAnchor(layer, styleValue); break; case "textAnchor": - RCTMLNStyleFactory.setTextAnchor(layer, styleValue); + MLRNStyleFactory.setTextAnchor(layer, styleValue); break; case "textMaxAngle": - RCTMLNStyleFactory.setTextMaxAngle(layer, styleValue); + MLRNStyleFactory.setTextMaxAngle(layer, styleValue); break; case "textWritingMode": - RCTMLNStyleFactory.setTextWritingMode(layer, styleValue); + MLRNStyleFactory.setTextWritingMode(layer, styleValue); break; case "textRotate": - RCTMLNStyleFactory.setTextRotate(layer, styleValue); + MLRNStyleFactory.setTextRotate(layer, styleValue); break; case "textPadding": - RCTMLNStyleFactory.setTextPadding(layer, styleValue); + MLRNStyleFactory.setTextPadding(layer, styleValue); break; case "textKeepUpright": - RCTMLNStyleFactory.setTextKeepUpright(layer, styleValue); + MLRNStyleFactory.setTextKeepUpright(layer, styleValue); break; case "textTransform": - RCTMLNStyleFactory.setTextTransform(layer, styleValue); + MLRNStyleFactory.setTextTransform(layer, styleValue); break; case "textOffset": - RCTMLNStyleFactory.setTextOffset(layer, styleValue); + MLRNStyleFactory.setTextOffset(layer, styleValue); break; case "textAllowOverlap": - RCTMLNStyleFactory.setTextAllowOverlap(layer, styleValue); + MLRNStyleFactory.setTextAllowOverlap(layer, styleValue); break; case "textIgnorePlacement": - RCTMLNStyleFactory.setTextIgnorePlacement(layer, styleValue); + MLRNStyleFactory.setTextIgnorePlacement(layer, styleValue); break; case "textOptional": - RCTMLNStyleFactory.setTextOptional(layer, styleValue); + MLRNStyleFactory.setTextOptional(layer, styleValue); break; case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "iconOpacity": - RCTMLNStyleFactory.setIconOpacity(layer, styleValue); + MLRNStyleFactory.setIconOpacity(layer, styleValue); break; case "iconOpacityTransition": - RCTMLNStyleFactory.setIconOpacityTransition(layer, styleValue); + MLRNStyleFactory.setIconOpacityTransition(layer, styleValue); break; case "iconColor": - RCTMLNStyleFactory.setIconColor(layer, styleValue); + MLRNStyleFactory.setIconColor(layer, styleValue); break; case "iconColorTransition": - RCTMLNStyleFactory.setIconColorTransition(layer, styleValue); + MLRNStyleFactory.setIconColorTransition(layer, styleValue); break; case "iconHaloColor": - RCTMLNStyleFactory.setIconHaloColor(layer, styleValue); + MLRNStyleFactory.setIconHaloColor(layer, styleValue); break; case "iconHaloColorTransition": - RCTMLNStyleFactory.setIconHaloColorTransition(layer, styleValue); + MLRNStyleFactory.setIconHaloColorTransition(layer, styleValue); break; case "iconHaloWidth": - RCTMLNStyleFactory.setIconHaloWidth(layer, styleValue); + MLRNStyleFactory.setIconHaloWidth(layer, styleValue); break; case "iconHaloWidthTransition": - RCTMLNStyleFactory.setIconHaloWidthTransition(layer, styleValue); + MLRNStyleFactory.setIconHaloWidthTransition(layer, styleValue); break; case "iconHaloBlur": - RCTMLNStyleFactory.setIconHaloBlur(layer, styleValue); + MLRNStyleFactory.setIconHaloBlur(layer, styleValue); break; case "iconHaloBlurTransition": - RCTMLNStyleFactory.setIconHaloBlurTransition(layer, styleValue); + MLRNStyleFactory.setIconHaloBlurTransition(layer, styleValue); break; case "iconTranslate": - RCTMLNStyleFactory.setIconTranslate(layer, styleValue); + MLRNStyleFactory.setIconTranslate(layer, styleValue); break; case "iconTranslateTransition": - RCTMLNStyleFactory.setIconTranslateTransition(layer, styleValue); + MLRNStyleFactory.setIconTranslateTransition(layer, styleValue); break; case "iconTranslateAnchor": - RCTMLNStyleFactory.setIconTranslateAnchor(layer, styleValue); + MLRNStyleFactory.setIconTranslateAnchor(layer, styleValue); break; case "textOpacity": - RCTMLNStyleFactory.setTextOpacity(layer, styleValue); + MLRNStyleFactory.setTextOpacity(layer, styleValue); break; case "textOpacityTransition": - RCTMLNStyleFactory.setTextOpacityTransition(layer, styleValue); + MLRNStyleFactory.setTextOpacityTransition(layer, styleValue); break; case "textColor": - RCTMLNStyleFactory.setTextColor(layer, styleValue); + MLRNStyleFactory.setTextColor(layer, styleValue); break; case "textColorTransition": - RCTMLNStyleFactory.setTextColorTransition(layer, styleValue); + MLRNStyleFactory.setTextColorTransition(layer, styleValue); break; case "textHaloColor": - RCTMLNStyleFactory.setTextHaloColor(layer, styleValue); + MLRNStyleFactory.setTextHaloColor(layer, styleValue); break; case "textHaloColorTransition": - RCTMLNStyleFactory.setTextHaloColorTransition(layer, styleValue); + MLRNStyleFactory.setTextHaloColorTransition(layer, styleValue); break; case "textHaloWidth": - RCTMLNStyleFactory.setTextHaloWidth(layer, styleValue); + MLRNStyleFactory.setTextHaloWidth(layer, styleValue); break; case "textHaloWidthTransition": - RCTMLNStyleFactory.setTextHaloWidthTransition(layer, styleValue); + MLRNStyleFactory.setTextHaloWidthTransition(layer, styleValue); break; case "textHaloBlur": - RCTMLNStyleFactory.setTextHaloBlur(layer, styleValue); + MLRNStyleFactory.setTextHaloBlur(layer, styleValue); break; case "textHaloBlurTransition": - RCTMLNStyleFactory.setTextHaloBlurTransition(layer, styleValue); + MLRNStyleFactory.setTextHaloBlurTransition(layer, styleValue); break; case "textTranslate": - RCTMLNStyleFactory.setTextTranslate(layer, styleValue); + MLRNStyleFactory.setTextTranslate(layer, styleValue); break; case "textTranslateTransition": - RCTMLNStyleFactory.setTextTranslateTransition(layer, styleValue); + MLRNStyleFactory.setTextTranslateTransition(layer, styleValue); break; case "textTranslateAnchor": - RCTMLNStyleFactory.setTextTranslateAnchor(layer, styleValue); + MLRNStyleFactory.setTextTranslateAnchor(layer, styleValue); break; } } } - public static void setCircleLayerStyle(final CircleLayer layer, RCTMLNStyle style) { + public static void setCircleLayerStyle(final CircleLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -414,76 +414,76 @@ public static void setCircleLayerStyle(final CircleLayer layer, RCTMLNStyle styl } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "circleSortKey": - RCTMLNStyleFactory.setCircleSortKey(layer, styleValue); + MLRNStyleFactory.setCircleSortKey(layer, styleValue); break; case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "circleRadius": - RCTMLNStyleFactory.setCircleRadius(layer, styleValue); + MLRNStyleFactory.setCircleRadius(layer, styleValue); break; case "circleRadiusTransition": - RCTMLNStyleFactory.setCircleRadiusTransition(layer, styleValue); + MLRNStyleFactory.setCircleRadiusTransition(layer, styleValue); break; case "circleColor": - RCTMLNStyleFactory.setCircleColor(layer, styleValue); + MLRNStyleFactory.setCircleColor(layer, styleValue); break; case "circleColorTransition": - RCTMLNStyleFactory.setCircleColorTransition(layer, styleValue); + MLRNStyleFactory.setCircleColorTransition(layer, styleValue); break; case "circleBlur": - RCTMLNStyleFactory.setCircleBlur(layer, styleValue); + MLRNStyleFactory.setCircleBlur(layer, styleValue); break; case "circleBlurTransition": - RCTMLNStyleFactory.setCircleBlurTransition(layer, styleValue); + MLRNStyleFactory.setCircleBlurTransition(layer, styleValue); break; case "circleOpacity": - RCTMLNStyleFactory.setCircleOpacity(layer, styleValue); + MLRNStyleFactory.setCircleOpacity(layer, styleValue); break; case "circleOpacityTransition": - RCTMLNStyleFactory.setCircleOpacityTransition(layer, styleValue); + MLRNStyleFactory.setCircleOpacityTransition(layer, styleValue); break; case "circleTranslate": - RCTMLNStyleFactory.setCircleTranslate(layer, styleValue); + MLRNStyleFactory.setCircleTranslate(layer, styleValue); break; case "circleTranslateTransition": - RCTMLNStyleFactory.setCircleTranslateTransition(layer, styleValue); + MLRNStyleFactory.setCircleTranslateTransition(layer, styleValue); break; case "circleTranslateAnchor": - RCTMLNStyleFactory.setCircleTranslateAnchor(layer, styleValue); + MLRNStyleFactory.setCircleTranslateAnchor(layer, styleValue); break; case "circlePitchScale": - RCTMLNStyleFactory.setCirclePitchScale(layer, styleValue); + MLRNStyleFactory.setCirclePitchScale(layer, styleValue); break; case "circlePitchAlignment": - RCTMLNStyleFactory.setCirclePitchAlignment(layer, styleValue); + MLRNStyleFactory.setCirclePitchAlignment(layer, styleValue); break; case "circleStrokeWidth": - RCTMLNStyleFactory.setCircleStrokeWidth(layer, styleValue); + MLRNStyleFactory.setCircleStrokeWidth(layer, styleValue); break; case "circleStrokeWidthTransition": - RCTMLNStyleFactory.setCircleStrokeWidthTransition(layer, styleValue); + MLRNStyleFactory.setCircleStrokeWidthTransition(layer, styleValue); break; case "circleStrokeColor": - RCTMLNStyleFactory.setCircleStrokeColor(layer, styleValue); + MLRNStyleFactory.setCircleStrokeColor(layer, styleValue); break; case "circleStrokeColorTransition": - RCTMLNStyleFactory.setCircleStrokeColorTransition(layer, styleValue); + MLRNStyleFactory.setCircleStrokeColorTransition(layer, styleValue); break; case "circleStrokeOpacity": - RCTMLNStyleFactory.setCircleStrokeOpacity(layer, styleValue); + MLRNStyleFactory.setCircleStrokeOpacity(layer, styleValue); break; case "circleStrokeOpacityTransition": - RCTMLNStyleFactory.setCircleStrokeOpacityTransition(layer, styleValue); + MLRNStyleFactory.setCircleStrokeOpacityTransition(layer, styleValue); break; } } } - public static void setHeatmapLayerStyle(final HeatmapLayer layer, RCTMLNStyle style) { + public static void setHeatmapLayerStyle(final HeatmapLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -491,40 +491,40 @@ public static void setHeatmapLayerStyle(final HeatmapLayer layer, RCTMLNStyle st } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "heatmapRadius": - RCTMLNStyleFactory.setHeatmapRadius(layer, styleValue); + MLRNStyleFactory.setHeatmapRadius(layer, styleValue); break; case "heatmapRadiusTransition": - RCTMLNStyleFactory.setHeatmapRadiusTransition(layer, styleValue); + MLRNStyleFactory.setHeatmapRadiusTransition(layer, styleValue); break; case "heatmapWeight": - RCTMLNStyleFactory.setHeatmapWeight(layer, styleValue); + MLRNStyleFactory.setHeatmapWeight(layer, styleValue); break; case "heatmapIntensity": - RCTMLNStyleFactory.setHeatmapIntensity(layer, styleValue); + MLRNStyleFactory.setHeatmapIntensity(layer, styleValue); break; case "heatmapIntensityTransition": - RCTMLNStyleFactory.setHeatmapIntensityTransition(layer, styleValue); + MLRNStyleFactory.setHeatmapIntensityTransition(layer, styleValue); break; case "heatmapColor": - RCTMLNStyleFactory.setHeatmapColor(layer, styleValue); + MLRNStyleFactory.setHeatmapColor(layer, styleValue); break; case "heatmapOpacity": - RCTMLNStyleFactory.setHeatmapOpacity(layer, styleValue); + MLRNStyleFactory.setHeatmapOpacity(layer, styleValue); break; case "heatmapOpacityTransition": - RCTMLNStyleFactory.setHeatmapOpacityTransition(layer, styleValue); + MLRNStyleFactory.setHeatmapOpacityTransition(layer, styleValue); break; } } } - public static void setFillExtrusionLayerStyle(final FillExtrusionLayer layer, RCTMLNStyle style) { + public static void setFillExtrusionLayerStyle(final FillExtrusionLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -532,63 +532,63 @@ public static void setFillExtrusionLayerStyle(final FillExtrusionLayer layer, RC } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "fillExtrusionOpacity": - RCTMLNStyleFactory.setFillExtrusionOpacity(layer, styleValue); + MLRNStyleFactory.setFillExtrusionOpacity(layer, styleValue); break; case "fillExtrusionOpacityTransition": - RCTMLNStyleFactory.setFillExtrusionOpacityTransition(layer, styleValue); + MLRNStyleFactory.setFillExtrusionOpacityTransition(layer, styleValue); break; case "fillExtrusionColor": - RCTMLNStyleFactory.setFillExtrusionColor(layer, styleValue); + MLRNStyleFactory.setFillExtrusionColor(layer, styleValue); break; case "fillExtrusionColorTransition": - RCTMLNStyleFactory.setFillExtrusionColorTransition(layer, styleValue); + MLRNStyleFactory.setFillExtrusionColorTransition(layer, styleValue); break; case "fillExtrusionTranslate": - RCTMLNStyleFactory.setFillExtrusionTranslate(layer, styleValue); + MLRNStyleFactory.setFillExtrusionTranslate(layer, styleValue); break; case "fillExtrusionTranslateTransition": - RCTMLNStyleFactory.setFillExtrusionTranslateTransition(layer, styleValue); + MLRNStyleFactory.setFillExtrusionTranslateTransition(layer, styleValue); break; case "fillExtrusionTranslateAnchor": - RCTMLNStyleFactory.setFillExtrusionTranslateAnchor(layer, styleValue); + MLRNStyleFactory.setFillExtrusionTranslateAnchor(layer, styleValue); break; case "fillExtrusionPattern": style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() { @Override public void onAllImagesLoaded() { - RCTMLNStyleFactory.setFillExtrusionPattern(layer, styleValue); + MLRNStyleFactory.setFillExtrusionPattern(layer, styleValue); } }); break; case "fillExtrusionPatternTransition": - RCTMLNStyleFactory.setFillExtrusionPatternTransition(layer, styleValue); + MLRNStyleFactory.setFillExtrusionPatternTransition(layer, styleValue); break; case "fillExtrusionHeight": - RCTMLNStyleFactory.setFillExtrusionHeight(layer, styleValue); + MLRNStyleFactory.setFillExtrusionHeight(layer, styleValue); break; case "fillExtrusionHeightTransition": - RCTMLNStyleFactory.setFillExtrusionHeightTransition(layer, styleValue); + MLRNStyleFactory.setFillExtrusionHeightTransition(layer, styleValue); break; case "fillExtrusionBase": - RCTMLNStyleFactory.setFillExtrusionBase(layer, styleValue); + MLRNStyleFactory.setFillExtrusionBase(layer, styleValue); break; case "fillExtrusionBaseTransition": - RCTMLNStyleFactory.setFillExtrusionBaseTransition(layer, styleValue); + MLRNStyleFactory.setFillExtrusionBaseTransition(layer, styleValue); break; case "fillExtrusionVerticalGradient": - RCTMLNStyleFactory.setFillExtrusionVerticalGradient(layer, styleValue); + MLRNStyleFactory.setFillExtrusionVerticalGradient(layer, styleValue); break; } } } - public static void setRasterLayerStyle(final RasterLayer layer, RCTMLNStyle style) { + public static void setRasterLayerStyle(final RasterLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -596,58 +596,58 @@ public static void setRasterLayerStyle(final RasterLayer layer, RCTMLNStyle styl } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "rasterOpacity": - RCTMLNStyleFactory.setRasterOpacity(layer, styleValue); + MLRNStyleFactory.setRasterOpacity(layer, styleValue); break; case "rasterOpacityTransition": - RCTMLNStyleFactory.setRasterOpacityTransition(layer, styleValue); + MLRNStyleFactory.setRasterOpacityTransition(layer, styleValue); break; case "rasterHueRotate": - RCTMLNStyleFactory.setRasterHueRotate(layer, styleValue); + MLRNStyleFactory.setRasterHueRotate(layer, styleValue); break; case "rasterHueRotateTransition": - RCTMLNStyleFactory.setRasterHueRotateTransition(layer, styleValue); + MLRNStyleFactory.setRasterHueRotateTransition(layer, styleValue); break; case "rasterBrightnessMin": - RCTMLNStyleFactory.setRasterBrightnessMin(layer, styleValue); + MLRNStyleFactory.setRasterBrightnessMin(layer, styleValue); break; case "rasterBrightnessMinTransition": - RCTMLNStyleFactory.setRasterBrightnessMinTransition(layer, styleValue); + MLRNStyleFactory.setRasterBrightnessMinTransition(layer, styleValue); break; case "rasterBrightnessMax": - RCTMLNStyleFactory.setRasterBrightnessMax(layer, styleValue); + MLRNStyleFactory.setRasterBrightnessMax(layer, styleValue); break; case "rasterBrightnessMaxTransition": - RCTMLNStyleFactory.setRasterBrightnessMaxTransition(layer, styleValue); + MLRNStyleFactory.setRasterBrightnessMaxTransition(layer, styleValue); break; case "rasterSaturation": - RCTMLNStyleFactory.setRasterSaturation(layer, styleValue); + MLRNStyleFactory.setRasterSaturation(layer, styleValue); break; case "rasterSaturationTransition": - RCTMLNStyleFactory.setRasterSaturationTransition(layer, styleValue); + MLRNStyleFactory.setRasterSaturationTransition(layer, styleValue); break; case "rasterContrast": - RCTMLNStyleFactory.setRasterContrast(layer, styleValue); + MLRNStyleFactory.setRasterContrast(layer, styleValue); break; case "rasterContrastTransition": - RCTMLNStyleFactory.setRasterContrastTransition(layer, styleValue); + MLRNStyleFactory.setRasterContrastTransition(layer, styleValue); break; case "rasterResampling": - RCTMLNStyleFactory.setRasterResampling(layer, styleValue); + MLRNStyleFactory.setRasterResampling(layer, styleValue); break; case "rasterFadeDuration": - RCTMLNStyleFactory.setRasterFadeDuration(layer, styleValue); + MLRNStyleFactory.setRasterFadeDuration(layer, styleValue); break; } } } - public static void setHillshadeLayerStyle(final HillshadeLayer layer, RCTMLNStyle style) { + public static void setHillshadeLayerStyle(final HillshadeLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -655,46 +655,46 @@ public static void setHillshadeLayerStyle(final HillshadeLayer layer, RCTMLNStyl } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "hillshadeIlluminationDirection": - RCTMLNStyleFactory.setHillshadeIlluminationDirection(layer, styleValue); + MLRNStyleFactory.setHillshadeIlluminationDirection(layer, styleValue); break; case "hillshadeIlluminationAnchor": - RCTMLNStyleFactory.setHillshadeIlluminationAnchor(layer, styleValue); + MLRNStyleFactory.setHillshadeIlluminationAnchor(layer, styleValue); break; case "hillshadeExaggeration": - RCTMLNStyleFactory.setHillshadeExaggeration(layer, styleValue); + MLRNStyleFactory.setHillshadeExaggeration(layer, styleValue); break; case "hillshadeExaggerationTransition": - RCTMLNStyleFactory.setHillshadeExaggerationTransition(layer, styleValue); + MLRNStyleFactory.setHillshadeExaggerationTransition(layer, styleValue); break; case "hillshadeShadowColor": - RCTMLNStyleFactory.setHillshadeShadowColor(layer, styleValue); + MLRNStyleFactory.setHillshadeShadowColor(layer, styleValue); break; case "hillshadeShadowColorTransition": - RCTMLNStyleFactory.setHillshadeShadowColorTransition(layer, styleValue); + MLRNStyleFactory.setHillshadeShadowColorTransition(layer, styleValue); break; case "hillshadeHighlightColor": - RCTMLNStyleFactory.setHillshadeHighlightColor(layer, styleValue); + MLRNStyleFactory.setHillshadeHighlightColor(layer, styleValue); break; case "hillshadeHighlightColorTransition": - RCTMLNStyleFactory.setHillshadeHighlightColorTransition(layer, styleValue); + MLRNStyleFactory.setHillshadeHighlightColorTransition(layer, styleValue); break; case "hillshadeAccentColor": - RCTMLNStyleFactory.setHillshadeAccentColor(layer, styleValue); + MLRNStyleFactory.setHillshadeAccentColor(layer, styleValue); break; case "hillshadeAccentColorTransition": - RCTMLNStyleFactory.setHillshadeAccentColorTransition(layer, styleValue); + MLRNStyleFactory.setHillshadeAccentColorTransition(layer, styleValue); break; } } } - public static void setBackgroundLayerStyle(final BackgroundLayer layer, RCTMLNStyle style) { + public static void setBackgroundLayerStyle(final BackgroundLayer layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -702,39 +702,39 @@ public static void setBackgroundLayerStyle(final BackgroundLayer layer, RCTMLNSt } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "visibility": - RCTMLNStyleFactory.setVisibility(layer, styleValue); + MLRNStyleFactory.setVisibility(layer, styleValue); break; case "backgroundColor": - RCTMLNStyleFactory.setBackgroundColor(layer, styleValue); + MLRNStyleFactory.setBackgroundColor(layer, styleValue); break; case "backgroundColorTransition": - RCTMLNStyleFactory.setBackgroundColorTransition(layer, styleValue); + MLRNStyleFactory.setBackgroundColorTransition(layer, styleValue); break; case "backgroundPattern": style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() { @Override public void onAllImagesLoaded() { - RCTMLNStyleFactory.setBackgroundPattern(layer, styleValue); + MLRNStyleFactory.setBackgroundPattern(layer, styleValue); } }); break; case "backgroundPatternTransition": - RCTMLNStyleFactory.setBackgroundPatternTransition(layer, styleValue); + MLRNStyleFactory.setBackgroundPatternTransition(layer, styleValue); break; case "backgroundOpacity": - RCTMLNStyleFactory.setBackgroundOpacity(layer, styleValue); + MLRNStyleFactory.setBackgroundOpacity(layer, styleValue); break; case "backgroundOpacityTransition": - RCTMLNStyleFactory.setBackgroundOpacityTransition(layer, styleValue); + MLRNStyleFactory.setBackgroundOpacityTransition(layer, styleValue); break; } } } - public static void setLightLayerStyle(final Light layer, RCTMLNStyle style) { + public static void setLightLayerStyle(final Light layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -742,35 +742,35 @@ public static void setLightLayerStyle(final Light layer, RCTMLNStyle style) { } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { case "anchor": - RCTMLNStyleFactory.setAnchor(layer, styleValue); + MLRNStyleFactory.setAnchor(layer, styleValue); break; case "position": - RCTMLNStyleFactory.setPosition(layer, styleValue); + MLRNStyleFactory.setPosition(layer, styleValue); break; case "positionTransition": - RCTMLNStyleFactory.setPositionTransition(layer, styleValue); + MLRNStyleFactory.setPositionTransition(layer, styleValue); break; case "color": - RCTMLNStyleFactory.setColor(layer, styleValue); + MLRNStyleFactory.setColor(layer, styleValue); break; case "colorTransition": - RCTMLNStyleFactory.setColorTransition(layer, styleValue); + MLRNStyleFactory.setColorTransition(layer, styleValue); break; case "intensity": - RCTMLNStyleFactory.setIntensity(layer, styleValue); + MLRNStyleFactory.setIntensity(layer, styleValue); break; case "intensityTransition": - RCTMLNStyleFactory.setIntensityTransition(layer, styleValue); + MLRNStyleFactory.setIntensityTransition(layer, styleValue); break; } } } - public static void setFillSortKey(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillSortKey(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillSortKey(styleValue.getExpression())); } else { @@ -778,11 +778,11 @@ public static void setFillSortKey(FillLayer layer, RCTMLNStyleValue styleValue) } } - public static void setVisibility(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(FillLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setFillAntialias(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillAntialias(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillAntialias(styleValue.getExpression())); } else { @@ -790,7 +790,7 @@ public static void setFillAntialias(FillLayer layer, RCTMLNStyleValue styleValue } } - public static void setFillOpacity(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillOpacity(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillOpacity(styleValue.getExpression())); } else { @@ -799,14 +799,14 @@ public static void setFillOpacity(FillLayer layer, RCTMLNStyleValue styleValue) } - public static void setFillOpacityTransition(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillOpacityTransition(FillLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillOpacityTransition(transition); } } - public static void setFillColor(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillColor(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillColor(styleValue.getExpression())); } else { @@ -815,14 +815,14 @@ public static void setFillColor(FillLayer layer, RCTMLNStyleValue styleValue) { } - public static void setFillColorTransition(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillColorTransition(FillLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillColorTransition(transition); } } - public static void setFillOutlineColor(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillOutlineColor(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillOutlineColor(styleValue.getExpression())); } else { @@ -831,14 +831,14 @@ public static void setFillOutlineColor(FillLayer layer, RCTMLNStyleValue styleVa } - public static void setFillOutlineColorTransition(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillOutlineColorTransition(FillLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillOutlineColorTransition(transition); } } - public static void setFillTranslate(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillTranslate(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillTranslate(styleValue.getExpression())); } else { @@ -847,14 +847,14 @@ public static void setFillTranslate(FillLayer layer, RCTMLNStyleValue styleValue } - public static void setFillTranslateTransition(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillTranslateTransition(FillLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillTranslateTransition(transition); } } - public static void setFillTranslateAnchor(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillTranslateAnchor(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillTranslateAnchor(styleValue.getExpression())); } else { @@ -862,7 +862,7 @@ public static void setFillTranslateAnchor(FillLayer layer, RCTMLNStyleValue styl } } - public static void setFillPattern(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillPattern(FillLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { if (styleValue.isImageStringValue()) { layer.setProperties(PropertyFactory.fillPattern(styleValue.getImageStringValue())); @@ -875,14 +875,14 @@ public static void setFillPattern(FillLayer layer, RCTMLNStyleValue styleValue) } - public static void setFillPatternTransition(FillLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillPatternTransition(FillLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillPatternTransition(transition); } } - public static void setLineCap(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineCap(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineCap(styleValue.getExpression())); } else { @@ -890,7 +890,7 @@ public static void setLineCap(LineLayer layer, RCTMLNStyleValue styleValue) { } } - public static void setLineJoin(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineJoin(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineJoin(styleValue.getExpression())); } else { @@ -898,7 +898,7 @@ public static void setLineJoin(LineLayer layer, RCTMLNStyleValue styleValue) { } } - public static void setLineMiterLimit(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineMiterLimit(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineMiterLimit(styleValue.getExpression())); } else { @@ -906,7 +906,7 @@ public static void setLineMiterLimit(LineLayer layer, RCTMLNStyleValue styleValu } } - public static void setLineRoundLimit(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineRoundLimit(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineRoundLimit(styleValue.getExpression())); } else { @@ -914,7 +914,7 @@ public static void setLineRoundLimit(LineLayer layer, RCTMLNStyleValue styleValu } } - public static void setLineSortKey(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineSortKey(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineSortKey(styleValue.getExpression())); } else { @@ -922,11 +922,11 @@ public static void setLineSortKey(LineLayer layer, RCTMLNStyleValue styleValue) } } - public static void setVisibility(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(LineLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setLineOpacity(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineOpacity(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineOpacity(styleValue.getExpression())); } else { @@ -935,14 +935,14 @@ public static void setLineOpacity(LineLayer layer, RCTMLNStyleValue styleValue) } - public static void setLineOpacityTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineOpacityTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineOpacityTransition(transition); } } - public static void setLineColor(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineColor(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineColor(styleValue.getExpression())); } else { @@ -951,14 +951,14 @@ public static void setLineColor(LineLayer layer, RCTMLNStyleValue styleValue) { } - public static void setLineColorTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineColorTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineColorTransition(transition); } } - public static void setLineTranslate(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineTranslate(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineTranslate(styleValue.getExpression())); } else { @@ -967,14 +967,14 @@ public static void setLineTranslate(LineLayer layer, RCTMLNStyleValue styleValue } - public static void setLineTranslateTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineTranslateTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineTranslateTransition(transition); } } - public static void setLineTranslateAnchor(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineTranslateAnchor(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineTranslateAnchor(styleValue.getExpression())); } else { @@ -982,7 +982,7 @@ public static void setLineTranslateAnchor(LineLayer layer, RCTMLNStyleValue styl } } - public static void setLineWidth(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineWidth(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineWidth(styleValue.getExpression())); } else { @@ -991,14 +991,14 @@ public static void setLineWidth(LineLayer layer, RCTMLNStyleValue styleValue) { } - public static void setLineWidthTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineWidthTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineWidthTransition(transition); } } - public static void setLineGapWidth(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineGapWidth(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineGapWidth(styleValue.getExpression())); } else { @@ -1007,14 +1007,14 @@ public static void setLineGapWidth(LineLayer layer, RCTMLNStyleValue styleValue) } - public static void setLineGapWidthTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineGapWidthTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineGapWidthTransition(transition); } } - public static void setLineOffset(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineOffset(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineOffset(styleValue.getExpression())); } else { @@ -1023,14 +1023,14 @@ public static void setLineOffset(LineLayer layer, RCTMLNStyleValue styleValue) { } - public static void setLineOffsetTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineOffsetTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineOffsetTransition(transition); } } - public static void setLineBlur(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineBlur(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineBlur(styleValue.getExpression())); } else { @@ -1039,14 +1039,14 @@ public static void setLineBlur(LineLayer layer, RCTMLNStyleValue styleValue) { } - public static void setLineBlurTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineBlurTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineBlurTransition(transition); } } - public static void setLineDasharray(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineDasharray(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineDasharray(styleValue.getExpression())); } else { @@ -1055,14 +1055,14 @@ public static void setLineDasharray(LineLayer layer, RCTMLNStyleValue styleValue } - public static void setLineDasharrayTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineDasharrayTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLineDasharrayTransition(transition); } } - public static void setLinePattern(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLinePattern(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { if (styleValue.isImageStringValue()) { layer.setProperties(PropertyFactory.linePattern(styleValue.getImageStringValue())); @@ -1075,14 +1075,14 @@ public static void setLinePattern(LineLayer layer, RCTMLNStyleValue styleValue) } - public static void setLinePatternTransition(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLinePatternTransition(LineLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setLinePatternTransition(transition); } } - public static void setLineGradient(LineLayer layer, RCTMLNStyleValue styleValue) { + public static void setLineGradient(LineLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.lineGradient(styleValue.getExpression())); } else { @@ -1090,7 +1090,7 @@ public static void setLineGradient(LineLayer layer, RCTMLNStyleValue styleValue) } } - public static void setSymbolPlacement(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setSymbolPlacement(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.symbolPlacement(styleValue.getExpression())); } else { @@ -1098,7 +1098,7 @@ public static void setSymbolPlacement(SymbolLayer layer, RCTMLNStyleValue styleV } } - public static void setSymbolSpacing(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setSymbolSpacing(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.symbolSpacing(styleValue.getExpression())); } else { @@ -1106,7 +1106,7 @@ public static void setSymbolSpacing(SymbolLayer layer, RCTMLNStyleValue styleVal } } - public static void setSymbolAvoidEdges(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setSymbolAvoidEdges(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.symbolAvoidEdges(styleValue.getExpression())); } else { @@ -1114,7 +1114,7 @@ public static void setSymbolAvoidEdges(SymbolLayer layer, RCTMLNStyleValue style } } - public static void setSymbolSortKey(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setSymbolSortKey(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.symbolSortKey(styleValue.getExpression())); } else { @@ -1122,7 +1122,7 @@ public static void setSymbolSortKey(SymbolLayer layer, RCTMLNStyleValue styleVal } } - public static void setSymbolZOrder(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setSymbolZOrder(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.symbolZOrder(styleValue.getExpression())); } else { @@ -1130,7 +1130,7 @@ public static void setSymbolZOrder(SymbolLayer layer, RCTMLNStyleValue styleValu } } - public static void setIconAllowOverlap(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconAllowOverlap(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconAllowOverlap(styleValue.getExpression())); } else { @@ -1138,7 +1138,7 @@ public static void setIconAllowOverlap(SymbolLayer layer, RCTMLNStyleValue style } } - public static void setIconIgnorePlacement(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconIgnorePlacement(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconIgnorePlacement(styleValue.getExpression())); } else { @@ -1146,7 +1146,7 @@ public static void setIconIgnorePlacement(SymbolLayer layer, RCTMLNStyleValue st } } - public static void setIconOptional(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconOptional(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconOptional(styleValue.getExpression())); } else { @@ -1154,7 +1154,7 @@ public static void setIconOptional(SymbolLayer layer, RCTMLNStyleValue styleValu } } - public static void setIconRotationAlignment(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconRotationAlignment(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconRotationAlignment(styleValue.getExpression())); } else { @@ -1162,7 +1162,7 @@ public static void setIconRotationAlignment(SymbolLayer layer, RCTMLNStyleValue } } - public static void setIconSize(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconSize(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconSize(styleValue.getExpression())); } else { @@ -1170,7 +1170,7 @@ public static void setIconSize(SymbolLayer layer, RCTMLNStyleValue styleValue) { } } - public static void setIconTextFit(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconTextFit(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconTextFit(styleValue.getExpression())); } else { @@ -1178,7 +1178,7 @@ public static void setIconTextFit(SymbolLayer layer, RCTMLNStyleValue styleValue } } - public static void setIconTextFitPadding(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconTextFitPadding(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconTextFitPadding(styleValue.getExpression())); } else { @@ -1186,7 +1186,7 @@ public static void setIconTextFitPadding(SymbolLayer layer, RCTMLNStyleValue sty } } - public static void setIconImage(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconImage(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { if (styleValue.isImageStringValue()) { layer.setProperties(PropertyFactory.iconImage(styleValue.getImageStringValue())); @@ -1198,7 +1198,7 @@ public static void setIconImage(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setIconRotate(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconRotate(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconRotate(styleValue.getExpression())); } else { @@ -1206,7 +1206,7 @@ public static void setIconRotate(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setIconPadding(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconPadding(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconPadding(styleValue.getExpression())); } else { @@ -1214,7 +1214,7 @@ public static void setIconPadding(SymbolLayer layer, RCTMLNStyleValue styleValue } } - public static void setIconKeepUpright(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconKeepUpright(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconKeepUpright(styleValue.getExpression())); } else { @@ -1222,7 +1222,7 @@ public static void setIconKeepUpright(SymbolLayer layer, RCTMLNStyleValue styleV } } - public static void setIconOffset(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconOffset(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconOffset(styleValue.getExpression())); } else { @@ -1230,7 +1230,7 @@ public static void setIconOffset(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setIconAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconAnchor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconAnchor(styleValue.getExpression())); } else { @@ -1238,7 +1238,7 @@ public static void setIconAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setIconPitchAlignment(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconPitchAlignment(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconPitchAlignment(styleValue.getExpression())); } else { @@ -1246,7 +1246,7 @@ public static void setIconPitchAlignment(SymbolLayer layer, RCTMLNStyleValue sty } } - public static void setTextPitchAlignment(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextPitchAlignment(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textPitchAlignment(styleValue.getExpression())); } else { @@ -1254,7 +1254,7 @@ public static void setTextPitchAlignment(SymbolLayer layer, RCTMLNStyleValue sty } } - public static void setTextRotationAlignment(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextRotationAlignment(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textRotationAlignment(styleValue.getExpression())); } else { @@ -1262,7 +1262,7 @@ public static void setTextRotationAlignment(SymbolLayer layer, RCTMLNStyleValue } } - public static void setTextField(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextField(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textField(styleValue.getExpression())); } else { @@ -1270,7 +1270,7 @@ public static void setTextField(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setTextFont(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextFont(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textFont(styleValue.getExpression())); } else { @@ -1278,7 +1278,7 @@ public static void setTextFont(SymbolLayer layer, RCTMLNStyleValue styleValue) { } } - public static void setTextSize(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextSize(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textSize(styleValue.getExpression())); } else { @@ -1286,7 +1286,7 @@ public static void setTextSize(SymbolLayer layer, RCTMLNStyleValue styleValue) { } } - public static void setTextMaxWidth(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextMaxWidth(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textMaxWidth(styleValue.getExpression())); } else { @@ -1294,7 +1294,7 @@ public static void setTextMaxWidth(SymbolLayer layer, RCTMLNStyleValue styleValu } } - public static void setTextLineHeight(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextLineHeight(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textLineHeight(styleValue.getExpression())); } else { @@ -1302,7 +1302,7 @@ public static void setTextLineHeight(SymbolLayer layer, RCTMLNStyleValue styleVa } } - public static void setTextLetterSpacing(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextLetterSpacing(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textLetterSpacing(styleValue.getExpression())); } else { @@ -1310,7 +1310,7 @@ public static void setTextLetterSpacing(SymbolLayer layer, RCTMLNStyleValue styl } } - public static void setTextJustify(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextJustify(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textJustify(styleValue.getExpression())); } else { @@ -1318,7 +1318,7 @@ public static void setTextJustify(SymbolLayer layer, RCTMLNStyleValue styleValue } } - public static void setTextRadialOffset(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextRadialOffset(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textRadialOffset(styleValue.getExpression())); } else { @@ -1326,7 +1326,7 @@ public static void setTextRadialOffset(SymbolLayer layer, RCTMLNStyleValue style } } - public static void setTextVariableAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextVariableAnchor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textVariableAnchor(styleValue.getExpression())); } else { @@ -1334,7 +1334,7 @@ public static void setTextVariableAnchor(SymbolLayer layer, RCTMLNStyleValue sty } } - public static void setTextAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextAnchor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textAnchor(styleValue.getExpression())); } else { @@ -1342,7 +1342,7 @@ public static void setTextAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setTextMaxAngle(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextMaxAngle(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textMaxAngle(styleValue.getExpression())); } else { @@ -1350,7 +1350,7 @@ public static void setTextMaxAngle(SymbolLayer layer, RCTMLNStyleValue styleValu } } - public static void setTextWritingMode(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextWritingMode(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textWritingMode(styleValue.getExpression())); } else { @@ -1358,7 +1358,7 @@ public static void setTextWritingMode(SymbolLayer layer, RCTMLNStyleValue styleV } } - public static void setTextRotate(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextRotate(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textRotate(styleValue.getExpression())); } else { @@ -1366,7 +1366,7 @@ public static void setTextRotate(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setTextPadding(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextPadding(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textPadding(styleValue.getExpression())); } else { @@ -1374,7 +1374,7 @@ public static void setTextPadding(SymbolLayer layer, RCTMLNStyleValue styleValue } } - public static void setTextKeepUpright(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextKeepUpright(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textKeepUpright(styleValue.getExpression())); } else { @@ -1382,7 +1382,7 @@ public static void setTextKeepUpright(SymbolLayer layer, RCTMLNStyleValue styleV } } - public static void setTextTransform(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextTransform(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textTransform(styleValue.getExpression())); } else { @@ -1390,7 +1390,7 @@ public static void setTextTransform(SymbolLayer layer, RCTMLNStyleValue styleVal } } - public static void setTextOffset(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextOffset(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textOffset(styleValue.getExpression())); } else { @@ -1398,7 +1398,7 @@ public static void setTextOffset(SymbolLayer layer, RCTMLNStyleValue styleValue) } } - public static void setTextAllowOverlap(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextAllowOverlap(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textAllowOverlap(styleValue.getExpression())); } else { @@ -1406,7 +1406,7 @@ public static void setTextAllowOverlap(SymbolLayer layer, RCTMLNStyleValue style } } - public static void setTextIgnorePlacement(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextIgnorePlacement(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textIgnorePlacement(styleValue.getExpression())); } else { @@ -1414,7 +1414,7 @@ public static void setTextIgnorePlacement(SymbolLayer layer, RCTMLNStyleValue st } } - public static void setTextOptional(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextOptional(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textOptional(styleValue.getExpression())); } else { @@ -1422,11 +1422,11 @@ public static void setTextOptional(SymbolLayer layer, RCTMLNStyleValue styleValu } } - public static void setVisibility(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(SymbolLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setIconOpacity(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconOpacity(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconOpacity(styleValue.getExpression())); } else { @@ -1435,14 +1435,14 @@ public static void setIconOpacity(SymbolLayer layer, RCTMLNStyleValue styleValue } - public static void setIconOpacityTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconOpacityTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIconOpacityTransition(transition); } } - public static void setIconColor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconColor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconColor(styleValue.getExpression())); } else { @@ -1451,14 +1451,14 @@ public static void setIconColor(SymbolLayer layer, RCTMLNStyleValue styleValue) } - public static void setIconColorTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconColorTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIconColorTransition(transition); } } - public static void setIconHaloColor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconHaloColor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconHaloColor(styleValue.getExpression())); } else { @@ -1467,14 +1467,14 @@ public static void setIconHaloColor(SymbolLayer layer, RCTMLNStyleValue styleVal } - public static void setIconHaloColorTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconHaloColorTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIconHaloColorTransition(transition); } } - public static void setIconHaloWidth(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconHaloWidth(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconHaloWidth(styleValue.getExpression())); } else { @@ -1483,14 +1483,14 @@ public static void setIconHaloWidth(SymbolLayer layer, RCTMLNStyleValue styleVal } - public static void setIconHaloWidthTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconHaloWidthTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIconHaloWidthTransition(transition); } } - public static void setIconHaloBlur(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconHaloBlur(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconHaloBlur(styleValue.getExpression())); } else { @@ -1499,14 +1499,14 @@ public static void setIconHaloBlur(SymbolLayer layer, RCTMLNStyleValue styleValu } - public static void setIconHaloBlurTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconHaloBlurTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIconHaloBlurTransition(transition); } } - public static void setIconTranslate(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconTranslate(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconTranslate(styleValue.getExpression())); } else { @@ -1515,14 +1515,14 @@ public static void setIconTranslate(SymbolLayer layer, RCTMLNStyleValue styleVal } - public static void setIconTranslateTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconTranslateTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIconTranslateTransition(transition); } } - public static void setIconTranslateAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setIconTranslateAnchor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.iconTranslateAnchor(styleValue.getExpression())); } else { @@ -1530,7 +1530,7 @@ public static void setIconTranslateAnchor(SymbolLayer layer, RCTMLNStyleValue st } } - public static void setTextOpacity(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextOpacity(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textOpacity(styleValue.getExpression())); } else { @@ -1539,14 +1539,14 @@ public static void setTextOpacity(SymbolLayer layer, RCTMLNStyleValue styleValue } - public static void setTextOpacityTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextOpacityTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setTextOpacityTransition(transition); } } - public static void setTextColor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextColor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textColor(styleValue.getExpression())); } else { @@ -1555,14 +1555,14 @@ public static void setTextColor(SymbolLayer layer, RCTMLNStyleValue styleValue) } - public static void setTextColorTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextColorTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setTextColorTransition(transition); } } - public static void setTextHaloColor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextHaloColor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textHaloColor(styleValue.getExpression())); } else { @@ -1571,14 +1571,14 @@ public static void setTextHaloColor(SymbolLayer layer, RCTMLNStyleValue styleVal } - public static void setTextHaloColorTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextHaloColorTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setTextHaloColorTransition(transition); } } - public static void setTextHaloWidth(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextHaloWidth(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textHaloWidth(styleValue.getExpression())); } else { @@ -1587,14 +1587,14 @@ public static void setTextHaloWidth(SymbolLayer layer, RCTMLNStyleValue styleVal } - public static void setTextHaloWidthTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextHaloWidthTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setTextHaloWidthTransition(transition); } } - public static void setTextHaloBlur(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextHaloBlur(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textHaloBlur(styleValue.getExpression())); } else { @@ -1603,14 +1603,14 @@ public static void setTextHaloBlur(SymbolLayer layer, RCTMLNStyleValue styleValu } - public static void setTextHaloBlurTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextHaloBlurTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setTextHaloBlurTransition(transition); } } - public static void setTextTranslate(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextTranslate(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textTranslate(styleValue.getExpression())); } else { @@ -1619,14 +1619,14 @@ public static void setTextTranslate(SymbolLayer layer, RCTMLNStyleValue styleVal } - public static void setTextTranslateTransition(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextTranslateTransition(SymbolLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setTextTranslateTransition(transition); } } - public static void setTextTranslateAnchor(SymbolLayer layer, RCTMLNStyleValue styleValue) { + public static void setTextTranslateAnchor(SymbolLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.textTranslateAnchor(styleValue.getExpression())); } else { @@ -1634,7 +1634,7 @@ public static void setTextTranslateAnchor(SymbolLayer layer, RCTMLNStyleValue st } } - public static void setCircleSortKey(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleSortKey(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleSortKey(styleValue.getExpression())); } else { @@ -1642,11 +1642,11 @@ public static void setCircleSortKey(CircleLayer layer, RCTMLNStyleValue styleVal } } - public static void setVisibility(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(CircleLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setCircleRadius(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleRadius(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleRadius(styleValue.getExpression())); } else { @@ -1655,14 +1655,14 @@ public static void setCircleRadius(CircleLayer layer, RCTMLNStyleValue styleValu } - public static void setCircleRadiusTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleRadiusTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleRadiusTransition(transition); } } - public static void setCircleColor(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleColor(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleColor(styleValue.getExpression())); } else { @@ -1671,14 +1671,14 @@ public static void setCircleColor(CircleLayer layer, RCTMLNStyleValue styleValue } - public static void setCircleColorTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleColorTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleColorTransition(transition); } } - public static void setCircleBlur(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleBlur(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleBlur(styleValue.getExpression())); } else { @@ -1687,14 +1687,14 @@ public static void setCircleBlur(CircleLayer layer, RCTMLNStyleValue styleValue) } - public static void setCircleBlurTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleBlurTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleBlurTransition(transition); } } - public static void setCircleOpacity(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleOpacity(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleOpacity(styleValue.getExpression())); } else { @@ -1703,14 +1703,14 @@ public static void setCircleOpacity(CircleLayer layer, RCTMLNStyleValue styleVal } - public static void setCircleOpacityTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleOpacityTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleOpacityTransition(transition); } } - public static void setCircleTranslate(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleTranslate(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleTranslate(styleValue.getExpression())); } else { @@ -1719,14 +1719,14 @@ public static void setCircleTranslate(CircleLayer layer, RCTMLNStyleValue styleV } - public static void setCircleTranslateTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleTranslateTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleTranslateTransition(transition); } } - public static void setCircleTranslateAnchor(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleTranslateAnchor(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleTranslateAnchor(styleValue.getExpression())); } else { @@ -1734,7 +1734,7 @@ public static void setCircleTranslateAnchor(CircleLayer layer, RCTMLNStyleValue } } - public static void setCirclePitchScale(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCirclePitchScale(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circlePitchScale(styleValue.getExpression())); } else { @@ -1742,7 +1742,7 @@ public static void setCirclePitchScale(CircleLayer layer, RCTMLNStyleValue style } } - public static void setCirclePitchAlignment(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCirclePitchAlignment(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circlePitchAlignment(styleValue.getExpression())); } else { @@ -1750,7 +1750,7 @@ public static void setCirclePitchAlignment(CircleLayer layer, RCTMLNStyleValue s } } - public static void setCircleStrokeWidth(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleStrokeWidth(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleStrokeWidth(styleValue.getExpression())); } else { @@ -1759,14 +1759,14 @@ public static void setCircleStrokeWidth(CircleLayer layer, RCTMLNStyleValue styl } - public static void setCircleStrokeWidthTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleStrokeWidthTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleStrokeWidthTransition(transition); } } - public static void setCircleStrokeColor(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleStrokeColor(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleStrokeColor(styleValue.getExpression())); } else { @@ -1775,14 +1775,14 @@ public static void setCircleStrokeColor(CircleLayer layer, RCTMLNStyleValue styl } - public static void setCircleStrokeColorTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleStrokeColorTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleStrokeColorTransition(transition); } } - public static void setCircleStrokeOpacity(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleStrokeOpacity(CircleLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.circleStrokeOpacity(styleValue.getExpression())); } else { @@ -1791,18 +1791,18 @@ public static void setCircleStrokeOpacity(CircleLayer layer, RCTMLNStyleValue st } - public static void setCircleStrokeOpacityTransition(CircleLayer layer, RCTMLNStyleValue styleValue) { + public static void setCircleStrokeOpacityTransition(CircleLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setCircleStrokeOpacityTransition(transition); } } - public static void setVisibility(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(HeatmapLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setHeatmapRadius(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapRadius(HeatmapLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.heatmapRadius(styleValue.getExpression())); } else { @@ -1811,14 +1811,14 @@ public static void setHeatmapRadius(HeatmapLayer layer, RCTMLNStyleValue styleVa } - public static void setHeatmapRadiusTransition(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapRadiusTransition(HeatmapLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHeatmapRadiusTransition(transition); } } - public static void setHeatmapWeight(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapWeight(HeatmapLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.heatmapWeight(styleValue.getExpression())); } else { @@ -1826,7 +1826,7 @@ public static void setHeatmapWeight(HeatmapLayer layer, RCTMLNStyleValue styleVa } } - public static void setHeatmapIntensity(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapIntensity(HeatmapLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.heatmapIntensity(styleValue.getExpression())); } else { @@ -1835,14 +1835,14 @@ public static void setHeatmapIntensity(HeatmapLayer layer, RCTMLNStyleValue styl } - public static void setHeatmapIntensityTransition(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapIntensityTransition(HeatmapLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHeatmapIntensityTransition(transition); } } - public static void setHeatmapColor(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapColor(HeatmapLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.heatmapColor(styleValue.getExpression())); } else { @@ -1850,7 +1850,7 @@ public static void setHeatmapColor(HeatmapLayer layer, RCTMLNStyleValue styleVal } } - public static void setHeatmapOpacity(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapOpacity(HeatmapLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.heatmapOpacity(styleValue.getExpression())); } else { @@ -1859,18 +1859,18 @@ public static void setHeatmapOpacity(HeatmapLayer layer, RCTMLNStyleValue styleV } - public static void setHeatmapOpacityTransition(HeatmapLayer layer, RCTMLNStyleValue styleValue) { + public static void setHeatmapOpacityTransition(HeatmapLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHeatmapOpacityTransition(transition); } } - public static void setVisibility(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(FillExtrusionLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setFillExtrusionOpacity(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionOpacity(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionOpacity(styleValue.getExpression())); } else { @@ -1879,14 +1879,14 @@ public static void setFillExtrusionOpacity(FillExtrusionLayer layer, RCTMLNStyle } - public static void setFillExtrusionOpacityTransition(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionOpacityTransition(FillExtrusionLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillExtrusionOpacityTransition(transition); } } - public static void setFillExtrusionColor(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionColor(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionColor(styleValue.getExpression())); } else { @@ -1895,14 +1895,14 @@ public static void setFillExtrusionColor(FillExtrusionLayer layer, RCTMLNStyleVa } - public static void setFillExtrusionColorTransition(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionColorTransition(FillExtrusionLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillExtrusionColorTransition(transition); } } - public static void setFillExtrusionTranslate(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionTranslate(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionTranslate(styleValue.getExpression())); } else { @@ -1911,14 +1911,14 @@ public static void setFillExtrusionTranslate(FillExtrusionLayer layer, RCTMLNSty } - public static void setFillExtrusionTranslateTransition(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionTranslateTransition(FillExtrusionLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillExtrusionTranslateTransition(transition); } } - public static void setFillExtrusionTranslateAnchor(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionTranslateAnchor(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionTranslateAnchor(styleValue.getExpression())); } else { @@ -1926,7 +1926,7 @@ public static void setFillExtrusionTranslateAnchor(FillExtrusionLayer layer, RCT } } - public static void setFillExtrusionPattern(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionPattern(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { if (styleValue.isImageStringValue()) { layer.setProperties(PropertyFactory.fillExtrusionPattern(styleValue.getImageStringValue())); @@ -1939,14 +1939,14 @@ public static void setFillExtrusionPattern(FillExtrusionLayer layer, RCTMLNStyle } - public static void setFillExtrusionPatternTransition(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionPatternTransition(FillExtrusionLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillExtrusionPatternTransition(transition); } } - public static void setFillExtrusionHeight(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionHeight(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionHeight(styleValue.getExpression())); } else { @@ -1955,14 +1955,14 @@ public static void setFillExtrusionHeight(FillExtrusionLayer layer, RCTMLNStyleV } - public static void setFillExtrusionHeightTransition(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionHeightTransition(FillExtrusionLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillExtrusionHeightTransition(transition); } } - public static void setFillExtrusionBase(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionBase(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionBase(styleValue.getExpression())); } else { @@ -1971,14 +1971,14 @@ public static void setFillExtrusionBase(FillExtrusionLayer layer, RCTMLNStyleVal } - public static void setFillExtrusionBaseTransition(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionBaseTransition(FillExtrusionLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setFillExtrusionBaseTransition(transition); } } - public static void setFillExtrusionVerticalGradient(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) { + public static void setFillExtrusionVerticalGradient(FillExtrusionLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getExpression())); } else { @@ -1986,11 +1986,11 @@ public static void setFillExtrusionVerticalGradient(FillExtrusionLayer layer, RC } } - public static void setVisibility(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(RasterLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setRasterOpacity(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterOpacity(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterOpacity(styleValue.getExpression())); } else { @@ -1999,14 +1999,14 @@ public static void setRasterOpacity(RasterLayer layer, RCTMLNStyleValue styleVal } - public static void setRasterOpacityTransition(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterOpacityTransition(RasterLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setRasterOpacityTransition(transition); } } - public static void setRasterHueRotate(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterHueRotate(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterHueRotate(styleValue.getExpression())); } else { @@ -2015,14 +2015,14 @@ public static void setRasterHueRotate(RasterLayer layer, RCTMLNStyleValue styleV } - public static void setRasterHueRotateTransition(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterHueRotateTransition(RasterLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setRasterHueRotateTransition(transition); } } - public static void setRasterBrightnessMin(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterBrightnessMin(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterBrightnessMin(styleValue.getExpression())); } else { @@ -2031,14 +2031,14 @@ public static void setRasterBrightnessMin(RasterLayer layer, RCTMLNStyleValue st } - public static void setRasterBrightnessMinTransition(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterBrightnessMinTransition(RasterLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setRasterBrightnessMinTransition(transition); } } - public static void setRasterBrightnessMax(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterBrightnessMax(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterBrightnessMax(styleValue.getExpression())); } else { @@ -2047,14 +2047,14 @@ public static void setRasterBrightnessMax(RasterLayer layer, RCTMLNStyleValue st } - public static void setRasterBrightnessMaxTransition(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterBrightnessMaxTransition(RasterLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setRasterBrightnessMaxTransition(transition); } } - public static void setRasterSaturation(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterSaturation(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterSaturation(styleValue.getExpression())); } else { @@ -2063,14 +2063,14 @@ public static void setRasterSaturation(RasterLayer layer, RCTMLNStyleValue style } - public static void setRasterSaturationTransition(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterSaturationTransition(RasterLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setRasterSaturationTransition(transition); } } - public static void setRasterContrast(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterContrast(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterContrast(styleValue.getExpression())); } else { @@ -2079,14 +2079,14 @@ public static void setRasterContrast(RasterLayer layer, RCTMLNStyleValue styleVa } - public static void setRasterContrastTransition(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterContrastTransition(RasterLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setRasterContrastTransition(transition); } } - public static void setRasterResampling(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterResampling(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterResampling(styleValue.getExpression())); } else { @@ -2094,7 +2094,7 @@ public static void setRasterResampling(RasterLayer layer, RCTMLNStyleValue style } } - public static void setRasterFadeDuration(RasterLayer layer, RCTMLNStyleValue styleValue) { + public static void setRasterFadeDuration(RasterLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.rasterFadeDuration(styleValue.getExpression())); } else { @@ -2102,11 +2102,11 @@ public static void setRasterFadeDuration(RasterLayer layer, RCTMLNStyleValue sty } } - public static void setVisibility(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(HillshadeLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setHillshadeIlluminationDirection(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeIlluminationDirection(HillshadeLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.hillshadeIlluminationDirection(styleValue.getExpression())); } else { @@ -2114,7 +2114,7 @@ public static void setHillshadeIlluminationDirection(HillshadeLayer layer, RCTML } } - public static void setHillshadeIlluminationAnchor(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeIlluminationAnchor(HillshadeLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.hillshadeIlluminationAnchor(styleValue.getExpression())); } else { @@ -2122,7 +2122,7 @@ public static void setHillshadeIlluminationAnchor(HillshadeLayer layer, RCTMLNSt } } - public static void setHillshadeExaggeration(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeExaggeration(HillshadeLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.hillshadeExaggeration(styleValue.getExpression())); } else { @@ -2131,14 +2131,14 @@ public static void setHillshadeExaggeration(HillshadeLayer layer, RCTMLNStyleVal } - public static void setHillshadeExaggerationTransition(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeExaggerationTransition(HillshadeLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHillshadeExaggerationTransition(transition); } } - public static void setHillshadeShadowColor(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeShadowColor(HillshadeLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.hillshadeShadowColor(styleValue.getExpression())); } else { @@ -2147,14 +2147,14 @@ public static void setHillshadeShadowColor(HillshadeLayer layer, RCTMLNStyleValu } - public static void setHillshadeShadowColorTransition(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeShadowColorTransition(HillshadeLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHillshadeShadowColorTransition(transition); } } - public static void setHillshadeHighlightColor(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeHighlightColor(HillshadeLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.hillshadeHighlightColor(styleValue.getExpression())); } else { @@ -2163,14 +2163,14 @@ public static void setHillshadeHighlightColor(HillshadeLayer layer, RCTMLNStyleV } - public static void setHillshadeHighlightColorTransition(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeHighlightColorTransition(HillshadeLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHillshadeHighlightColorTransition(transition); } } - public static void setHillshadeAccentColor(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeAccentColor(HillshadeLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.hillshadeAccentColor(styleValue.getExpression())); } else { @@ -2179,18 +2179,18 @@ public static void setHillshadeAccentColor(HillshadeLayer layer, RCTMLNStyleValu } - public static void setHillshadeAccentColorTransition(HillshadeLayer layer, RCTMLNStyleValue styleValue) { + public static void setHillshadeAccentColorTransition(HillshadeLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setHillshadeAccentColorTransition(transition); } } - public static void setVisibility(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setVisibility(BackgroundLayer layer, MLRNStyleValue styleValue) { layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY))); } - public static void setBackgroundColor(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setBackgroundColor(BackgroundLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.backgroundColor(styleValue.getExpression())); } else { @@ -2199,14 +2199,14 @@ public static void setBackgroundColor(BackgroundLayer layer, RCTMLNStyleValue st } - public static void setBackgroundColorTransition(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setBackgroundColorTransition(BackgroundLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setBackgroundColorTransition(transition); } } - public static void setBackgroundPattern(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setBackgroundPattern(BackgroundLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { if (styleValue.isImageStringValue()) { layer.setProperties(PropertyFactory.backgroundPattern(styleValue.getImageStringValue())); @@ -2219,14 +2219,14 @@ public static void setBackgroundPattern(BackgroundLayer layer, RCTMLNStyleValue } - public static void setBackgroundPatternTransition(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setBackgroundPatternTransition(BackgroundLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setBackgroundPatternTransition(transition); } } - public static void setBackgroundOpacity(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setBackgroundOpacity(BackgroundLayer layer, MLRNStyleValue styleValue) { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.backgroundOpacity(styleValue.getExpression())); } else { @@ -2235,48 +2235,48 @@ public static void setBackgroundOpacity(BackgroundLayer layer, RCTMLNStyleValue } - public static void setBackgroundOpacityTransition(BackgroundLayer layer, RCTMLNStyleValue styleValue) { + public static void setBackgroundOpacityTransition(BackgroundLayer layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setBackgroundOpacityTransition(transition); } } - public static void setAnchor(Light layer, RCTMLNStyleValue styleValue) { + public static void setAnchor(Light layer, MLRNStyleValue styleValue) { layer.setAnchor(styleValue.getString(VALUE_KEY)); } - public static void setPosition(Light layer, RCTMLNStyleValue styleValue) { + public static void setPosition(Light layer, MLRNStyleValue styleValue) { Float[] values = styleValue.getFloatArray(VALUE_KEY); layer.setPosition(Position.fromPosition(values[0], values[1], values[2])); } - public static void setPositionTransition(Light layer, RCTMLNStyleValue styleValue) { + public static void setPositionTransition(Light layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setPositionTransition(transition); } } - public static void setColor(Light layer, RCTMLNStyleValue styleValue) { + public static void setColor(Light layer, MLRNStyleValue styleValue) { layer.setColor(styleValue.getInt(VALUE_KEY)); } - public static void setColorTransition(Light layer, RCTMLNStyleValue styleValue) { + public static void setColorTransition(Light layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setColorTransition(transition); } } - public static void setIntensity(Light layer, RCTMLNStyleValue styleValue) { + public static void setIntensity(Light layer, MLRNStyleValue styleValue) { layer.setIntensity(styleValue.getFloat(VALUE_KEY)); } - public static void setIntensityTransition(Light layer, RCTMLNStyleValue styleValue) { + public static void setIntensityTransition(Light layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.setIntensityTransition(transition); diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFunctionParser.java similarity index 89% rename from android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFunctionParser.java index caae4853d..f753c1b6d 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFunctionParser.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles; +package org.maplibre.mlrn.components.styles; import android.util.Log; @@ -24,10 +24,10 @@ * Created by nickitaliano on 9/12/17. */ -public abstract class RCTMLNStyleFunctionParser { - private RCTMLNStyleValue mStyleValue; +public abstract class MLRNStyleFunctionParser { + private MLRNStyleValue mStyleValue; - public RCTMLNStyleFunctionParser(RCTMLNStyleValue styleValue) { + public MLRNStyleFunctionParser(MLRNStyleValue styleValue) { mStyleValue = styleValue; } @@ -41,7 +41,7 @@ public List getRawStops() { ReadableMap jsStopKey = rawStop.getMap(0); ReadableMap jsStopValue = rawStop.getMap(1); - RCTMLNStyleValue innerStyleValue = new RCTMLNStyleValue(jsStopValue); + MLRNStyleValue innerStyleValue = new MLRNStyleValue(jsStopValue); Object propertyValue = null; try { @@ -72,7 +72,7 @@ public List getRawStops() { return rawStops; } - protected abstract T getRawStopValue (RCTMLNStyleValue styleValue); + protected abstract T getRawStopValue (MLRNStyleValue styleValue); protected abstract PropertyValue getStopValue(T value); private Object getStopKey(ReadableMap jsStopKey) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleValue.java b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleValue.java similarity index 94% rename from android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleValue.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleValue.java index e6db3dbde..187c370dc 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/RCTMLNStyleValue.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleValue.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles; +package org.maplibre.mlrn.components.styles; import androidx.annotation.NonNull; @@ -10,15 +10,15 @@ import com.google.gson.JsonArray; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.TransitionOptions; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.ExpressionParser; -import org.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.ExpressionParser; +import org.maplibre.mlrn.utils.ImageEntry; /** * Created by nickitaliano on 9/12/17. */ -public class RCTMLNStyleValue { +public class MLRNStyleValue { private String mType; private boolean isExpression; @@ -34,7 +34,7 @@ public class RCTMLNStyleValue { public static final int InterpolationModeCategorical = 102; public static final int InterpolationModeIdentity = 103; - public RCTMLNStyleValue(@NonNull ReadableMap config) { + public MLRNStyleValue(@NonNull ReadableMap config) { mType = config.getString("styletype"); mPayload = config.getMap("stylevalue"); @@ -192,7 +192,7 @@ public TransitionOptions getTransition() { if (!mType.equals("transition")) { return null; } - ReadableMap config = getMap(RCTMLNStyleFactory.VALUE_KEY); + ReadableMap config = getMap(MLRNStyleFactory.VALUE_KEY); boolean enablePlacementTransitions = true; if (config.hasKey("enablePlacementTransitions")) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java new file mode 100644 index 000000000..1be1d4e6e --- /dev/null +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java @@ -0,0 +1,27 @@ +package org.maplibre.mlrn.components.styles.layers; + +import android.content.Context; + +import org.maplibre.android.style.layers.BackgroundLayer; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; + +/** + * Created by nickitaliano on 9/25/17. + */ + +public class MLRNBackgroundLayer extends RCTLayer { + public MLRNBackgroundLayer(Context context) { + super(context); + } + + @Override + public BackgroundLayer makeLayer() { + return new BackgroundLayer(mID); + } + + @Override + public void addStyles() { + MLRNStyleFactory.setBackgroundLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); + } +} diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayerManager.java similarity index 50% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayerManager.java index c55a9e528..a67b6a073 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; @@ -9,8 +9,8 @@ * Created by nickitaliano on 9/25/17. */ -public class RCTMLNBackgroundLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNBackgroundLayer"; +public class MLRNBackgroundLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNBackgroundLayer"; @Override public String getName() { @@ -18,47 +18,47 @@ public String getName() { } @Override - protected RCTMLNBackgroundLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNBackgroundLayer(reactContext); + protected MLRNBackgroundLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNBackgroundLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNBackgroundLayer layer, String id) { + public void setId(MLRNBackgroundLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNBackgroundLayer layer, String sourceID) { + public void setSourceID(MLRNBackgroundLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNBackgroundLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNBackgroundLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNBackgroundLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNBackgroundLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNBackgroundLayer layer, int layerIndex){ + public void setLayerIndex(MLRNBackgroundLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNBackgroundLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNBackgroundLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNBackgroundLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNBackgroundLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNBackgroundLayer layer, ReadableMap style) { + public void setReactStyle(MLRNBackgroundLayer layer, ReadableMap style) { layer.setReactStyle(style); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java similarity index 64% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java index cb2fedef9..0dcf7a4d0 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java @@ -1,21 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.CircleLayer; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/18/17. */ -public class RCTMLNCircleLayer extends RCTLayer { +public class MLRNCircleLayer extends RCTLayer { private String mSourceLayerID; - public RCTMLNCircleLayer(Context context) { + public MLRNCircleLayer(Context context) { super(context); } @@ -25,7 +25,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { super.addToMap(mapView); } @@ -42,7 +42,7 @@ public CircleLayer makeLayer() { @Override public void addStyles() { - RCTMLNStyleFactory.setCircleLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setCircleLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); } public void setSourceLayerID(String sourceLayerID) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayerManager.java similarity index 55% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayerManager.java index 19bc5943b..39b6ab006 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayerManager.java @@ -1,21 +1,19 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.components.AbstractMapFeature; -import java.util.Map; +import java.util.ArrayList; /** * Created by nickitaliano on 9/18/17. */ -public class RCTMLNLineLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNLineLayer"; +public class MLRNCircleLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNCircleLayer"; @Override public String getName() { @@ -23,57 +21,57 @@ public String getName() { } @Override - protected RCTMLNLineLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNLineLayer(reactContext); + protected MLRNCircleLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNCircleLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNLineLayer layer, String id) { + public void setId(MLRNCircleLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNLineLayer layer, String sourceID) { + public void setSourceID(MLRNCircleLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNLineLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNCircleLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNLineLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNCircleLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNLineLayer layer, int layerIndex){ + public void setLayerIndex(MLRNCircleLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNLineLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNCircleLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNLineLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNCircleLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNLineLayer layer, ReadableMap style) { + public void setReactStyle(MLRNCircleLayer layer, ReadableMap style) { layer.setReactStyle(style); } @ReactProp(name="sourceLayerID") - public void setSourceLayerId(RCTMLNLineLayer layer, String sourceLayerID) { + public void setSourceLayerId(MLRNCircleLayer layer, String sourceLayerID) { layer.setSourceLayerID(sourceLayerID); } @ReactProp(name="filter") - public void setFilter(RCTMLNLineLayer layer, ReadableArray filterList) { + public void setFilter(MLRNCircleLayer layer, ReadableArray filterList) { layer.setFilter(filterList); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java similarity index 64% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java index d0fda0d9b..9246d4cb2 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java @@ -1,21 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.FillExtrusionLayer; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/15/17. */ -public class RCTMLNFillExtrusionLayer extends RCTLayer { +public class MLRNFillExtrusionLayer extends RCTLayer { private String mSourceLayerID; - public RCTMLNFillExtrusionLayer(Context context) { + public MLRNFillExtrusionLayer(Context context) { super(context); } @@ -25,7 +25,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { super.addToMap(mapView); } @@ -42,7 +42,7 @@ public FillExtrusionLayer makeLayer() { @Override public void addStyles() { - RCTMLNStyleFactory.setFillExtrusionLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setFillExtrusionLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); } public void setSourceLayerID(String sourceLayerID) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java similarity index 51% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java index 942d726f4..3d5d2ded8 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.mlrn.components.AbstractEventEmitter; import java.util.HashMap; import java.util.Map; @@ -15,8 +15,8 @@ * Created by nickitaliano on 9/15/17. */ -public class RCTMLNFillExtrusionLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNFillExtrusionLayer"; +public class MLRNFillExtrusionLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNFillExtrusionLayer"; @Override public String getName() { @@ -24,57 +24,57 @@ public String getName() { } @Override - protected RCTMLNFillExtrusionLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNFillExtrusionLayer(reactContext); + protected MLRNFillExtrusionLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNFillExtrusionLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNFillExtrusionLayer layer, String id) { + public void setId(MLRNFillExtrusionLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNFillExtrusionLayer layer, String sourceID) { + public void setSourceID(MLRNFillExtrusionLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNFillExtrusionLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNFillExtrusionLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNFillExtrusionLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNFillExtrusionLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNFillExtrusionLayer layer, int layerIndex){ + public void setLayerIndex(MLRNFillExtrusionLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNFillExtrusionLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNFillExtrusionLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNFillExtrusionLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNFillExtrusionLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNFillExtrusionLayer layer, ReadableMap style) { + public void setReactStyle(MLRNFillExtrusionLayer layer, ReadableMap style) { layer.setReactStyle(style); } @ReactProp(name="sourceLayerID") - public void setSourceLayerId(RCTMLNFillExtrusionLayer layer, String sourceLayerID) { + public void setSourceLayerId(MLRNFillExtrusionLayer layer, String sourceLayerID) { layer.setSourceLayerID(sourceLayerID); } @ReactProp(name="filter") - public void setFilter(RCTMLNFillExtrusionLayer layer, ReadableArray filterList) { + public void setFilter(MLRNFillExtrusionLayer layer, ReadableArray filterList) { layer.setFilter(filterList); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java similarity index 64% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java index c6903a56d..60628eb31 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java @@ -1,21 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.FillLayer; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/8/17. */ -public class RCTMLNFillLayer extends RCTLayer { +public class MLRNFillLayer extends RCTLayer { private String mSourceLayerID; - public RCTMLNFillLayer(Context context) { + public MLRNFillLayer(Context context) { super(context); } @@ -25,7 +25,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { super.addToMap(mapView); } @@ -42,7 +42,7 @@ public FillLayer makeLayer() { @Override public void addStyles() { - RCTMLNStyleFactory.setFillLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setFillLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); } public void setSourceLayerID(String sourceLayerID) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayerManager.java similarity index 54% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayerManager.java index 17ef739f4..653228707 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.mlrn.components.AbstractEventEmitter; import java.util.HashMap; import java.util.Map; @@ -15,8 +15,8 @@ * Created by nickitaliano on 9/8/17. */ -public class RCTMLNFillLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNFillLayer"; +public class MLRNFillLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNFillLayer"; @Override public String getName() { @@ -24,57 +24,57 @@ public String getName() { } @Override - protected RCTMLNFillLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNFillLayer(reactContext); + protected MLRNFillLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNFillLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNFillLayer layer, String id) { + public void setId(MLRNFillLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNFillLayer layer, String sourceID) { + public void setSourceID(MLRNFillLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="sourceLayerID") - public void setSourceLayerId(RCTMLNFillLayer layer, String sourceLayerID) { + public void setSourceLayerId(MLRNFillLayer layer, String sourceLayerID) { layer.setSourceLayerID(sourceLayerID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNFillLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNFillLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNFillLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNFillLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNFillLayer layer, int layerIndex){ + public void setLayerIndex(MLRNFillLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNFillLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNFillLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNFillLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNFillLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNFillLayer layer, ReadableMap style) { + public void setReactStyle(MLRNFillLayer layer, ReadableMap style) { layer.setReactStyle(style); } @ReactProp(name="filter") - public void setFilter(RCTMLNFillLayer layer, ReadableArray filterList) { + public void setFilter(MLRNFillLayer layer, ReadableArray filterList) { layer.setFilter(filterList); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java similarity index 64% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java index e86bc13f9..6a05a2a1d 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java @@ -1,21 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.HeatmapLayer; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; /** * Created by dhee9000 on 6/8/2019 */ -public class RCTMLNHeatmapLayer extends RCTLayer { +public class MLRNHeatmapLayer extends RCTLayer { private String mSourceLayerID; - public RCTMLNHeatmapLayer(Context context){ + public MLRNHeatmapLayer(Context context){ super(context); } @@ -25,7 +25,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { super.addToMap(mapView); } @@ -42,7 +42,7 @@ public HeatmapLayer makeLayer() { @Override public void addStyles() { - RCTMLNStyleFactory.setHeatmapLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setHeatmapLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); } public void setSourceLayerID(String sourceLayerID) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayerManager.java similarity index 51% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayerManager.java index 2b782770c..4024e809b 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; @@ -12,8 +12,8 @@ * Created by dhee9000 on 6/8/2019 */ -public class RCTMLNHeatmapLayerManager extends ViewGroupManager{ - public static final String REACT_CLASS = "RCTMLNHeatmapLayer"; +public class MLRNHeatmapLayerManager extends ViewGroupManager{ + public static final String REACT_CLASS = "MLRNHeatmapLayer"; @Override public String getName() { @@ -21,57 +21,57 @@ public String getName() { } @Override - protected RCTMLNHeatmapLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNHeatmapLayer(reactContext); + protected MLRNHeatmapLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNHeatmapLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNHeatmapLayer layer, String id) { + public void setId(MLRNHeatmapLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNHeatmapLayer layer, String sourceID) { + public void setSourceID(MLRNHeatmapLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNHeatmapLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNHeatmapLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNHeatmapLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNHeatmapLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNHeatmapLayer layer, int layerIndex){ + public void setLayerIndex(MLRNHeatmapLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNHeatmapLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNHeatmapLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNHeatmapLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNHeatmapLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNHeatmapLayer layer, ReadableMap style) { + public void setReactStyle(MLRNHeatmapLayer layer, ReadableMap style) { layer.setReactStyle(style); } @ReactProp(name="sourceLayerID") - public void setSourceLayerId(RCTMLNHeatmapLayer layer, String sourceLayerID) { + public void setSourceLayerId(MLRNHeatmapLayer layer, String sourceLayerID) { layer.setSourceLayerID(sourceLayerID); } @ReactProp(name="filter") - public void setFilter(RCTMLNHeatmapLayer layer, ReadableArray filterList) { + public void setFilter(MLRNHeatmapLayer layer, ReadableArray filterList) { layer.setFilter(filterList); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java similarity index 64% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java index 076343727..538d9ec1d 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java @@ -1,21 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.LineLayer; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/18/17. */ -public class RCTMLNLineLayer extends RCTLayer { +public class MLRNLineLayer extends RCTLayer { private String mSourceLayerID; - public RCTMLNLineLayer(Context context) { + public MLRNLineLayer(Context context) { super(context); } @@ -25,7 +25,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { super.addToMap(mapView); } @@ -42,7 +42,7 @@ public LineLayer makeLayer() { @Override public void addStyles() { - RCTMLNStyleFactory.setLineLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setLineLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); } public void setSourceLayerID(String sourceLayerID) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayerManager.java similarity index 51% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayerManager.java index d9a7b5bc1..6e0e1c358 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayerManager.java @@ -1,19 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.components.AbstractMapFeature; -import java.util.ArrayList; +import java.util.Map; /** * Created by nickitaliano on 9/18/17. */ -public class RCTMLNCircleLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNCircleLayer"; +public class MLRNLineLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNLineLayer"; @Override public String getName() { @@ -21,57 +23,57 @@ public String getName() { } @Override - protected RCTMLNCircleLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNCircleLayer(reactContext); + protected MLRNLineLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNLineLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNCircleLayer layer, String id) { + public void setId(MLRNLineLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNCircleLayer layer, String sourceID) { + public void setSourceID(MLRNLineLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNCircleLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNLineLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNCircleLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNLineLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNCircleLayer layer, int layerIndex){ + public void setLayerIndex(MLRNLineLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNCircleLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNLineLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNCircleLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNLineLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNCircleLayer layer, ReadableMap style) { + public void setReactStyle(MLRNLineLayer layer, ReadableMap style) { layer.setReactStyle(style); } @ReactProp(name="sourceLayerID") - public void setSourceLayerId(RCTMLNCircleLayer layer, String sourceLayerID) { + public void setSourceLayerId(MLRNLineLayer layer, String sourceLayerID) { layer.setSourceLayerID(sourceLayerID); } @ReactProp(name="filter") - public void setFilter(RCTMLNCircleLayer layer, ReadableArray filterList) { + public void setFilter(MLRNLineLayer layer, ReadableArray filterList) { layer.setFilter(filterList); } } diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java new file mode 100644 index 000000000..f07f03f76 --- /dev/null +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java @@ -0,0 +1,27 @@ +package org.maplibre.mlrn.components.styles.layers; + +import android.content.Context; + +import org.maplibre.android.style.layers.RasterLayer; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; + +/** + * Created by nickitaliano on 9/25/17. + */ + +public class MLRNRasterLayer extends RCTLayer { + public MLRNRasterLayer(Context context) { + super(context); + } + + @Override + public RasterLayer makeLayer() { + return new RasterLayer(mID, mSourceID); + } + + @Override + public void addStyles() { + MLRNStyleFactory.setRasterLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); + } +} diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayerManager.java similarity index 51% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayerManager.java index f55adeadf..69875ed37 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; @@ -9,8 +9,8 @@ * Created by nickitaliano on 9/25/17. */ -public class RCTMLNRasterLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNRasterLayer"; +public class MLRNRasterLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNRasterLayer"; @Override public String getName() { @@ -18,47 +18,47 @@ public String getName() { } @Override - protected RCTMLNRasterLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNRasterLayer(reactContext); + protected MLRNRasterLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNRasterLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNRasterLayer layer, String id) { + public void setId(MLRNRasterLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNRasterLayer layer, String sourceID) { + public void setSourceID(MLRNRasterLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNRasterLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNRasterLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNRasterLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNRasterLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNRasterLayer layer, int layerIndex){ + public void setLayerIndex(MLRNRasterLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNRasterLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNRasterLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNRasterLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNRasterLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNRasterLayer layer, ReadableMap style) { + public void setReactStyle(MLRNRasterLayer layer, ReadableMap style) { layer.setReactStyle(style); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java similarity index 64% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java index 1fecbbf57..4097f8b60 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java @@ -1,21 +1,21 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.SymbolLayer; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/19/17. */ -public class RCTMLNSymbolLayer extends RCTLayer { +public class MLRNSymbolLayer extends RCTLayer { private String mSourceLayerID; - public RCTMLNSymbolLayer(Context context) { + public MLRNSymbolLayer(Context context) { super(context); } @@ -25,7 +25,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { super.addToMap(mapView); } @@ -42,7 +42,7 @@ public SymbolLayer makeLayer() { @Override public void addStyles() { - RCTMLNStyleFactory.setSymbolLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setSymbolLayerStyle(mLayer, new MLRNStyle(getContext(), mReactStyle, mMap)); } public void setSourceLayerID(String sourceLayerID) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayerManager.java similarity index 52% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayerManager.java index 214d63abd..bd3fbdd98 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; @@ -10,8 +10,8 @@ * Created by nickitaliano on 9/19/17. */ -public class RCTMLNSymbolLayerManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNSymbolLayer"; +public class MLRNSymbolLayerManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNSymbolLayer"; @Override public String getName() { @@ -19,57 +19,57 @@ public String getName() { } @Override - protected RCTMLNSymbolLayer createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNSymbolLayer(reactContext); + protected MLRNSymbolLayer createViewInstance(ThemedReactContext reactContext) { + return new MLRNSymbolLayer(reactContext); } @ReactProp(name="id") - public void setId(RCTMLNSymbolLayer layer, String id) { + public void setId(MLRNSymbolLayer layer, String id) { layer.setID(id); } @ReactProp(name="sourceID") - public void setSourceID(RCTMLNSymbolLayer layer, String sourceID) { + public void setSourceID(MLRNSymbolLayer layer, String sourceID) { layer.setSourceID(sourceID); } @ReactProp(name="aboveLayerID") - public void setAboveLayerID(RCTMLNSymbolLayer layer, String aboveLayerID) { + public void setAboveLayerID(MLRNSymbolLayer layer, String aboveLayerID) { layer.setAboveLayerID(aboveLayerID); } @ReactProp(name="belowLayerID") - public void setBelowLayerID(RCTMLNSymbolLayer layer, String belowLayerID) { + public void setBelowLayerID(MLRNSymbolLayer layer, String belowLayerID) { layer.setBelowLayerID(belowLayerID); } @ReactProp(name="layerIndex") - public void setLayerIndex(RCTMLNSymbolLayer layer, int layerIndex){ + public void setLayerIndex(MLRNSymbolLayer layer, int layerIndex){ layer.setLayerIndex(layerIndex); } @ReactProp(name="minZoomLevel") - public void setMinZoomLevel(RCTMLNSymbolLayer layer, double minZoomLevel) { + public void setMinZoomLevel(MLRNSymbolLayer layer, double minZoomLevel) { layer.setMinZoomLevel(minZoomLevel); } @ReactProp(name="maxZoomLevel") - public void setMaxZoomLevel(RCTMLNSymbolLayer layer, double maxZoomLevel) { + public void setMaxZoomLevel(MLRNSymbolLayer layer, double maxZoomLevel) { layer.setMaxZoomLevel(maxZoomLevel); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNSymbolLayer layer, ReadableMap style) { + public void setReactStyle(MLRNSymbolLayer layer, ReadableMap style) { layer.setReactStyle(style); } @ReactProp(name="sourceLayerID") - public void setSourceLayerId(RCTMLNSymbolLayer layer, String sourceLayerID) { + public void setSourceLayerId(MLRNSymbolLayer layer, String sourceLayerID) { layer.setSourceLayerID(sourceLayerID); } @ReactProp(name="filter") - public void setFilter(RCTMLNSymbolLayer layer, ReadableArray filterList) { + public void setFilter(MLRNSymbolLayer layer, ReadableArray filterList) { layer.setFilter(filterList); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/RCTLayer.java similarity index 93% rename from android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/RCTLayer.java index 9ac6da190..3295a304a 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/RCTLayer.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.layers; +package org.maplibre.mlrn.components.styles.layers; import android.content.Context; @@ -12,9 +12,9 @@ import org.maplibre.android.style.layers.Layer; import org.maplibre.android.style.layers.Property; import org.maplibre.android.style.layers.PropertyFactory; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.utils.ExpressionParser; import java.util.Arrays; import java.util.HashSet; @@ -43,7 +43,7 @@ public abstract class RCTLayer extends AbstractMapFeature { protected T mLayer; protected Context mContext; - protected RCTMLNMapView mMapView; + protected MLRNMapView mMapView; protected boolean mHadFilter; @@ -170,7 +170,7 @@ public void add() { } public void addAbove(final String aboveLayerID) { - mMapView.waitForLayer(aboveLayerID, new RCTMLNMapView.FoundLayerCallback() { + mMapView.waitForLayer(aboveLayerID, new MLRNMapView.FoundLayerCallback() { public void found(Layer layer) { if (!hasInitialized()) { return; @@ -183,7 +183,7 @@ public void found(Layer layer) { } public void addBelow(final String belowLayerID) { - mMapView.waitForLayer(belowLayerID, new RCTMLNMapView.FoundLayerCallback() { + mMapView.waitForLayer(belowLayerID, new MLRNMapView.FoundLayerCallback() { public void found(Layer layer) { if (!hasInitialized()) { return; @@ -243,7 +243,7 @@ protected void updateFilter(Expression expression) { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mMap = mapView.getMapboxMap(); mMapView = mapView; @@ -265,7 +265,7 @@ public void addToMap(RCTMLNMapView mapView) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { if (getStyle() != null) { getStyle().removeLayer(mLayer); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLight.java b/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLight.java similarity index 65% rename from android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLight.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLight.java index 397913f80..0de9039e1 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLight.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLight.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.light; +package org.maplibre.mlrn.components.styles.light; import android.content.Context; @@ -8,10 +8,10 @@ import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.MLRNStyle; +import org.maplibre.mlrn.components.styles.MLRNStyleFactory; import java.util.HashMap; import java.util.Map; @@ -20,22 +20,22 @@ * Created by nickitaliano on 9/26/17. */ -public class RCTMLNLight extends AbstractMapFeature { +public class MLRNLight extends AbstractMapFeature { private MapLibreMap mMap; private ReadableMap mReactStyle; - public RCTMLNLight(Context context) { + public MLRNLight(Context context) { super(context); } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mMap = mapView.getMapboxMap(); setLight(); } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { // ignore there's nothing to remove just update the light style } @@ -46,7 +46,7 @@ public void setReactStyle(ReadableMap reactStyle) { } private void setLight(Light light) { - RCTMLNStyleFactory.setLightLayerStyle(light, new RCTMLNStyle(getContext(), mReactStyle, mMap)); + MLRNStyleFactory.setLightLayerStyle(light, new MLRNStyle(getContext(), mReactStyle, mMap)); } private void setLight() { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLightManager.java similarity index 53% rename from android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLightManager.java index 3832e36bc..d6fd391e3 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLightManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.light; +package org.maplibre.mlrn.components.styles.light; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; @@ -9,8 +9,8 @@ * Created by nickitaliano on 9/26/17. */ -public class RCTMLNLightManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNLight"; +public class MLRNLightManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNLight"; @Override public String getName() { @@ -18,12 +18,12 @@ public String getName() { } @Override - protected RCTMLNLight createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNLight(reactContext); + protected MLRNLight createViewInstance(ThemedReactContext reactContext) { + return new MLRNLight(reactContext); } @ReactProp(name="reactStyle") - public void setReactStyle(RCTMLNLight light, ReadableMap reactStyle) { + public void setReactStyle(MLRNLight light, ReadableMap reactStyle) { light.setReactStyle(reactStyle); } } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java similarity index 89% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java index 7454014c2..b87310081 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; import android.util.Log; @@ -18,14 +18,14 @@ * Created by nickitaliano on 11/29/17. */ -public class RCTMLNImageSource extends RCTSource { - public static final String LOG_TAG = "RCTMLNImageSource"; +public class MLRNImageSource extends RCTSource { + public static final String LOG_TAG = "MLRNImageSource"; private URL mURL; private int mResourceId; private LatLngQuad mCoordQuad; - public RCTMLNImageSource(Context context) { + public MLRNImageSource(Context context) { super(context); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSourceManager.java similarity index 55% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSourceManager.java index 067ef4cb3..2800f6b04 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; import android.view.View; @@ -9,15 +9,15 @@ import com.facebook.react.uimanager.annotations.ReactProp; import com.facebook.react.views.imagehelper.ImageSource; import org.maplibre.android.geometry.LatLngQuad; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; /** * Created by nickitaliano on 11/29/17. */ -public class RCTMLNImageSourceManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNImageSource"; +public class MLRNImageSourceManager extends ViewGroupManager { + public static final String REACT_CLASS = "MLRNImageSource"; @Override public String getName() { @@ -25,42 +25,42 @@ public String getName() { } @Override - protected RCTMLNImageSource createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNImageSource(reactContext); + protected MLRNImageSource createViewInstance(ThemedReactContext reactContext) { + return new MLRNImageSource(reactContext); } @Override - public View getChildAt(RCTMLNImageSource source, int childPosition) { + public View getChildAt(MLRNImageSource source, int childPosition) { return source.getLayerAt(childPosition); } @Override - public int getChildCount(RCTMLNImageSource source) { + public int getChildCount(MLRNImageSource source) { return source.getLayerCount(); } @Override - public void addView(RCTMLNImageSource source, View childView, int childPosition) { + public void addView(MLRNImageSource source, View childView, int childPosition) { source.addLayer(childView, childPosition); } @Override - public void removeViewAt(RCTMLNImageSource source, int childPosition) { + public void removeViewAt(MLRNImageSource source, int childPosition) { source.removeLayer(childPosition); } @ReactProp(name = "id") - public void setId(RCTMLNImageSource source, String id) { + public void setId(MLRNImageSource source, String id) { source.setID(id); } @ReactProp(name = "url") - public void setUrl(RCTMLNImageSource source, String url) { + public void setUrl(MLRNImageSource source, String url) { source.setURL(url); } @ReactProp(name = "coordinates") - public void setCoordinates(RCTMLNImageSource source, ReadableArray arr) { + public void setCoordinates(MLRNImageSource source, ReadableArray arr) { LatLngQuad quad = GeoJSONUtils.toLatLngQuad(arr); if (quad == null) { diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSource.java similarity index 84% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSource.java index 1edaa8b73..2b9c26a76 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSource.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; @@ -11,10 +11,10 @@ * Created by nickitaliano on 9/25/17. */ -public class RCTMLNRasterSource extends RCTMLNTileSource { +public class MLRNRasterSource extends MLRNTileSource { private Integer mTileSize; - public RCTMLNRasterSource(Context context) { + public MLRNRasterSource(Context context) { super(context); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSourceManager.java similarity index 54% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSourceManager.java index 5bde1f8c3..dafc9350a 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ThemedReactContext; @@ -13,10 +13,10 @@ * Created by nickitaliano on 9/25/17. */ -public class RCTMLNRasterSourceManager extends RCTMLNTileSourceManager { - public static final String REACT_CLASS = "RCTMLNRasterSource"; +public class MLRNRasterSourceManager extends MLRNTileSourceManager { + public static final String REACT_CLASS = "MLRNRasterSource"; - public RCTMLNRasterSourceManager(ReactApplicationContext reactApplicationContext) { + public MLRNRasterSourceManager(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); } @@ -28,12 +28,12 @@ public String getName() { @Nonnull @Override - protected RCTMLNRasterSource createViewInstance(@Nonnull ThemedReactContext reactContext) { - return new RCTMLNRasterSource(reactContext); + protected MLRNRasterSource createViewInstance(@Nonnull ThemedReactContext reactContext) { + return new MLRNRasterSource(reactContext); } @ReactProp(name="tileSize") - public void setTileSize(RCTMLNRasterSource source, int tileSize) { + public void setTileSize(MLRNRasterSource source, int tileSize) { source.setTileSize(tileSize); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java similarity index 93% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java index 828b08a1d..7e70aeaf7 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; import android.graphics.Bitmap; @@ -18,13 +18,13 @@ import org.maplibre.android.style.sources.GeoJsonOptions; import org.maplibre.android.style.sources.GeoJsonSource; import org.maplibre.android.utils.BitmapUtils; -import org.maplibre.rctmln.R; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.events.AndroidCallbackEvent; -import org.maplibre.rctmln.events.FeatureClickEvent; -import org.maplibre.rctmln.utils.ClusterPropertyEntry; -import org.maplibre.rctmln.utils.DownloadMapImageTask; -import org.maplibre.rctmln.utils.ImageEntry; +import org.maplibre.mlrn.R; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.events.AndroidCallbackEvent; +import org.maplibre.mlrn.events.FeatureClickEvent; +import org.maplibre.mlrn.utils.ClusterPropertyEntry; +import org.maplibre.mlrn.utils.DownloadMapImageTask; +import org.maplibre.mlrn.utils.ImageEntry; import java.net.URL; import java.util.ArrayList; @@ -36,9 +36,9 @@ * Created by nickitaliano on 9/19/17. */ -public class RCTMLNShapeSource extends RCTSource { +public class MLRNShapeSource extends RCTSource { private URL mURL; - private RCTMLNShapeSourceManager mManager; + private MLRNShapeSourceManager mManager; private String mShape; @@ -56,19 +56,19 @@ public class RCTMLNShapeSource extends RCTSource { private List> mImages; private List> mNativeImages; - public RCTMLNShapeSource(Context context, RCTMLNShapeSourceManager manager) { + public MLRNShapeSource(Context context, MLRNShapeSourceManager manager) { super(context); mManager = manager; } @Override - public void addToMap(final RCTMLNMapView mapView) { + public void addToMap(final MLRNMapView mapView) { // Wait for style before adding the source to the map mapView.getMapboxMap().getStyle(new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { MapLibreMap map = mapView.getMapboxMap(); - RCTMLNShapeSource.super.addToMap(mapView); + MLRNShapeSource.super.addToMap(mapView); } }); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java similarity index 74% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java index 37efb0386..e7165c270 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; import android.graphics.drawable.BitmapDrawable; @@ -19,15 +19,15 @@ import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; import org.maplibre.android.style.expressions.Expression; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.components.annotation.RCTMLNCallout; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.layers.RCTLayer; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.utils.ClusterPropertyEntry; -import org.maplibre.rctmln.utils.ExpressionParser; -import org.maplibre.rctmln.utils.ImageEntry; -import org.maplibre.rctmln.utils.ResourceUtils; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.components.annotation.MLRNCallout; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.layers.RCTLayer; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.utils.ClusterPropertyEntry; +import org.maplibre.mlrn.utils.ExpressionParser; +import org.maplibre.mlrn.utils.ImageEntry; +import org.maplibre.mlrn.utils.ResourceUtils; import java.net.MalformedURLException; import java.net.URL; @@ -40,13 +40,13 @@ * Created by nickitaliano on 9/19/17. */ -public class RCTMLNShapeSourceManager extends AbstractEventEmitter { - public static final String LOG_TAG = "RCTMLNShapeSourceManager"; - public static final String REACT_CLASS = "RCTMLNShapeSource"; +public class MLRNShapeSourceManager extends AbstractEventEmitter { + public static final String LOG_TAG = "MLRNShapeSourceManager"; + public static final String REACT_CLASS = "MLRNShapeSource"; private ReactApplicationContext mContext; - public RCTMLNShapeSourceManager(ReactApplicationContext context) { + public MLRNShapeSourceManager(ReactApplicationContext context) { super(context); mContext = context; } @@ -57,37 +57,37 @@ public String getName() { } @Override - protected RCTMLNShapeSource createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNShapeSource(reactContext, this); + protected MLRNShapeSource createViewInstance(ThemedReactContext reactContext) { + return new MLRNShapeSource(reactContext, this); } @Override - public View getChildAt(RCTMLNShapeSource source, int childPosition) { + public View getChildAt(MLRNShapeSource source, int childPosition) { return source.getLayerAt(childPosition); } @Override - public int getChildCount(RCTMLNShapeSource source) { + public int getChildCount(MLRNShapeSource source) { return source.getLayerCount(); } @Override - public void addView(RCTMLNShapeSource source, View childView, int childPosition) { + public void addView(MLRNShapeSource source, View childView, int childPosition) { source.addLayer(childView, getChildCount(source)); } @Override - public void removeViewAt(RCTMLNShapeSource source, int childPosition) { + public void removeViewAt(MLRNShapeSource source, int childPosition) { source.removeLayer(childPosition); } @ReactProp(name = "id") - public void setId(RCTMLNShapeSource source, String id) { + public void setId(MLRNShapeSource source, String id) { source.setID(id); } @ReactProp(name = "url") - public void setURL(RCTMLNShapeSource source, String urlStr) { + public void setURL(MLRNShapeSource source, String urlStr) { try { source.setURL(new URL(urlStr)); } catch (MalformedURLException e) { @@ -96,27 +96,27 @@ public void setURL(RCTMLNShapeSource source, String urlStr) { } @ReactProp(name = "shape") - public void setGeometry(RCTMLNShapeSource source, String geoJSONStr) { + public void setGeometry(MLRNShapeSource source, String geoJSONStr) { source.setShape(geoJSONStr); } @ReactProp(name = "cluster") - public void setCluster(RCTMLNShapeSource source, int cluster) { + public void setCluster(MLRNShapeSource source, int cluster) { source.setCluster(cluster == 1); } @ReactProp(name = "clusterRadius") - public void setClusterRadius(RCTMLNShapeSource source, int radius) { + public void setClusterRadius(MLRNShapeSource source, int radius) { source.setClusterRadius(radius); } @ReactProp(name = "clusterMaxZoomLevel") - public void setClusterMaxZoomLevel(RCTMLNShapeSource source, int clusterMaxZoom) { + public void setClusterMaxZoomLevel(MLRNShapeSource source, int clusterMaxZoom) { source.setClusterMaxZoom(clusterMaxZoom); } @ReactProp(name = "clusterProperties") - public void setClusterProperties(RCTMLNShapeSource source, ReadableMap map) { + public void setClusterProperties(MLRNShapeSource source, ReadableMap map) { List> properties = new ArrayList<>(); ReadableMapKeySetIterator iterator = map.keySetIterator(); @@ -140,32 +140,32 @@ public void setClusterProperties(RCTMLNShapeSource source, ReadableMap map) { } @ReactProp(name = "maxZoomLevel") - public void setMaxZoomLevel(RCTMLNShapeSource source, int maxZoom) { + public void setMaxZoomLevel(MLRNShapeSource source, int maxZoom) { source.setMaxZoom(maxZoom); } @ReactProp(name = "buffer") - public void setBuffer(RCTMLNShapeSource source, int buffer) { + public void setBuffer(MLRNShapeSource source, int buffer) { source.setBuffer(buffer); } @ReactProp(name = "tolerance") - public void setTolerance(RCTMLNShapeSource source, double tolerance) { + public void setTolerance(MLRNShapeSource source, double tolerance) { source.setTolerance(tolerance); } @ReactProp(name = "lineMetrics") - public void setLineMetrics(RCTMLNShapeSource source, boolean lineMetrics) { + public void setLineMetrics(MLRNShapeSource source, boolean lineMetrics) { source.setLineMetrics(lineMetrics); } @ReactProp(name = "hasPressListener") - public void setHasPressListener(RCTMLNShapeSource source, boolean hasPressListener) { + public void setHasPressListener(MLRNShapeSource source, boolean hasPressListener) { source.setHasPressListener(hasPressListener); } @ReactProp(name="hitbox") - public void setHitbox(RCTMLNShapeSource source, ReadableMap map) { + public void setHitbox(MLRNShapeSource source, ReadableMap map) { source.setHitbox(map); } @@ -206,7 +206,7 @@ public Map getCommandsMap() { } @Override - public void receiveCommand(RCTMLNShapeSource source, int commandID, @Nullable ReadableArray args) { + public void receiveCommand(MLRNShapeSource source, int commandID, @Nullable ReadableArray args) { switch (commandID) { case METHOD_FEATURES: source.querySourceFeatures( diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java similarity index 92% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java index ada519c65..ced6f6cbc 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; @@ -8,7 +8,7 @@ import java.util.Collection; @SuppressWarnings("unused") -public abstract class RCTMLNTileSource extends RCTSource { +public abstract class MLRNTileSource extends RCTSource { static final String TILE_SPEC_VERSION = "2.1.0"; private String mURL; @@ -20,7 +20,7 @@ public abstract class RCTMLNTileSource extends RCTSource { private boolean mIsTmsSource; - public RCTMLNTileSource(Context context) { + public MLRNTileSource(Context context) { super(context); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSourceManager.java similarity index 87% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSourceManager.java index 005d3aa63..b01073ba2 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.view.View; @@ -6,14 +6,14 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableType; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.components.AbstractEventEmitter; +import org.maplibre.mlrn.components.AbstractEventEmitter; import java.util.ArrayList; import java.util.List; -public abstract class RCTMLNTileSourceManager extends AbstractEventEmitter { +public abstract class MLRNTileSourceManager extends AbstractEventEmitter { - RCTMLNTileSourceManager(ReactApplicationContext reactApplicationContext) { + MLRNTileSourceManager(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSource.java similarity index 84% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSource.java index 440ac600f..91016e6d2 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSource.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; import androidx.annotation.Nullable; @@ -10,8 +10,8 @@ import org.maplibre.geojson.FeatureCollection; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.sources.VectorSource; -import org.maplibre.rctmln.events.AndroidCallbackEvent; -import org.maplibre.rctmln.events.FeatureClickEvent; +import org.maplibre.mlrn.events.AndroidCallbackEvent; +import org.maplibre.mlrn.events.FeatureClickEvent; import java.util.List; @@ -19,10 +19,10 @@ * Created by nickitaliano on 9/8/17. */ -public class RCTMLNVectorSource extends RCTMLNTileSource { - private RCTMLNVectorSourceManager mManager; +public class MLRNVectorSource extends MLRNTileSource { + private MLRNVectorSourceManager mManager; - public RCTMLNVectorSource(Context context, RCTMLNVectorSourceManager manager) { + public MLRNVectorSource(Context context, MLRNVectorSourceManager manager) { super(context); mManager = manager; } diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSourceManager.java similarity index 66% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSourceManager.java index 96f6fc99a..fa84de3aa 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import androidx.annotation.Nullable; @@ -8,9 +8,9 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.ExpressionParser; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.ExpressionParser; import javax.annotation.Nonnull; @@ -20,10 +20,10 @@ * Created by nickitaliano on 9/8/17. */ -public class RCTMLNVectorSourceManager extends RCTMLNTileSourceManager { - public static final String REACT_CLASS = "RCTMLNVectorSource"; +public class MLRNVectorSourceManager extends MLRNTileSourceManager { + public static final String REACT_CLASS = "MLRNVectorSource"; - public RCTMLNVectorSourceManager(ReactApplicationContext reactApplicationContext) { + public MLRNVectorSourceManager(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); } @@ -35,17 +35,17 @@ public String getName() { @Nonnull @Override - protected RCTMLNVectorSource createViewInstance(@Nonnull ThemedReactContext reactContext) { - return new RCTMLNVectorSource(reactContext, this); + protected MLRNVectorSource createViewInstance(@Nonnull ThemedReactContext reactContext) { + return new MLRNVectorSource(reactContext, this); } @ReactProp(name = "hasPressListener") - public void setHasPressListener(RCTMLNVectorSource source, boolean hasPressListener) { + public void setHasPressListener(MLRNVectorSource source, boolean hasPressListener) { source.setHasPressListener(hasPressListener); } @ReactProp(name="hitbox") - public void setHitbox(RCTMLNVectorSource source, ReadableMap map) { + public void setHitbox(MLRNVectorSource source, ReadableMap map) { source.setHitbox(map); } @@ -69,7 +69,7 @@ public Map getCommandsMap() { } @Override - public void receiveCommand(RCTMLNVectorSource vectorSource, int commandID, @Nullable ReadableArray args) { + public void receiveCommand(MLRNVectorSource vectorSource, int commandID, @Nullable ReadableArray args) { switch (commandID) { case METHOD_FEATURES: diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/RCTSource.java similarity index 94% rename from android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/RCTSource.java index 57ffe7238..f9143eb25 100644 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/sources/RCTSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/RCTSource.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.components.styles.sources; +package org.maplibre.mlrn.components.styles.sources; import android.content.Context; import androidx.annotation.NonNull; @@ -14,9 +14,9 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; import org.maplibre.android.style.sources.Source; -import org.maplibre.rctmln.components.AbstractMapFeature; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.components.styles.layers.RCTLayer; +import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.components.styles.layers.RCTLayer; import java.util.ArrayList; import java.util.HashMap; @@ -34,7 +34,7 @@ public abstract class RCTSource extends AbstractMapFeature { public static final double DEFAULT_HITBOX_WIDTH = 44.0; public static final double DEFAULT_HITBOX_HEIGHT = 44.0; - protected RCTMLNMapView mMapView; + protected MLRNMapView mMapView; protected MapLibreMap mMap; protected String mID; @@ -116,7 +116,7 @@ public int getLayerCount () { } @Override - public void addToMap(RCTMLNMapView mapView) { + public void addToMap(MLRNMapView mapView) { mMapView = mapView; mMap = mapView.getMapboxMap(); mMap.getStyle(new Style.OnStyleLoaded() { @@ -146,7 +146,7 @@ public void onStyleLoaded(@NonNull Style style) { } @Override - public void removeFromMap(RCTMLNMapView mapView) { + public void removeFromMap(MLRNMapView mapView) { if (mLayers.size() > 0) { for (int i = 0; i < mLayers.size(); i++) { RCTLayer layer = mLayers.get(i); diff --git a/android/src/main/java/org/maplibre/rctmln/events/AbstractEvent.java b/android/src/main/java/org/maplibre/mlrn/events/AbstractEvent.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/events/AbstractEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/AbstractEvent.java index 8123e5377..62eb72b96 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/AbstractEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/AbstractEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.view.View; diff --git a/android/src/main/java/org/maplibre/rctmln/events/AndroidCallbackEvent.java b/android/src/main/java/org/maplibre/mlrn/events/AndroidCallbackEvent.java similarity index 91% rename from android/src/main/java/org/maplibre/rctmln/events/AndroidCallbackEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/AndroidCallbackEvent.java index 2e63452a5..d55b39954 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/AndroidCallbackEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/AndroidCallbackEvent.java @@ -1,10 +1,10 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.view.View; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; -import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventKeys; /** * Created by nickitaliano on 10/3/17. diff --git a/android/src/main/java/org/maplibre/rctmln/events/EventEmitter.java b/android/src/main/java/org/maplibre/mlrn/events/EventEmitter.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/events/EventEmitter.java rename to android/src/main/java/org/maplibre/mlrn/events/EventEmitter.java index efec47629..08708fb79 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/EventEmitter.java +++ b/android/src/main/java/org/maplibre/mlrn/events/EventEmitter.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/rctmln/events/FeatureClickEvent.java b/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java similarity index 89% rename from android/src/main/java/org/maplibre/rctmln/events/FeatureClickEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java index 6dcdb7286..b0f5687cd 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/FeatureClickEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.graphics.PointF; import android.view.View; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableMap; import org.maplibre.geojson.Feature; import org.maplibre.android.geometry.LatLng; -import org.maplibre.rctmln.components.styles.sources.RCTSource; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.styles.sources.RCTSource; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; import java.util.List; diff --git a/android/src/main/java/org/maplibre/rctmln/events/IEvent.java b/android/src/main/java/org/maplibre/mlrn/events/IEvent.java similarity index 90% rename from android/src/main/java/org/maplibre/rctmln/events/IEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/IEvent.java index f620ea2b7..2967990f2 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/IEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/IEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import com.facebook.react.bridge.WritableMap; diff --git a/android/src/main/java/org/maplibre/rctmln/events/ImageMissingEvent.java b/android/src/main/java/org/maplibre/mlrn/events/ImageMissingEvent.java similarity index 87% rename from android/src/main/java/org/maplibre/rctmln/events/ImageMissingEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/ImageMissingEvent.java index d8c664b16..c53f8ea4f 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/ImageMissingEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/ImageMissingEvent.java @@ -1,9 +1,9 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; import android.view.View; diff --git a/android/src/main/java/org/maplibre/rctmln/events/LocationEvent.java b/android/src/main/java/org/maplibre/mlrn/events/LocationEvent.java similarity index 88% rename from android/src/main/java/org/maplibre/rctmln/events/LocationEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/LocationEvent.java index 764af5501..f754d5ff2 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/LocationEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/LocationEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.location.Location; import androidx.annotation.NonNull; @@ -6,18 +6,18 @@ import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import org.maplibre.rctmln.components.mapview.RCTMLNMapView; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; +import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; import java.util.UUID; public class LocationEvent implements IEvent { private UUID uuid; - private RCTMLNMapView mapView; + private MLRNMapView mapView; private Location location; - public LocationEvent(@NonNull Location location, RCTMLNMapView mapView) { + public LocationEvent(@NonNull Location location, MLRNMapView mapView) { this.mapView = mapView; this.location = location; this.uuid = UUID.randomUUID(); diff --git a/android/src/main/java/org/maplibre/rctmln/events/MapChangeEvent.java b/android/src/main/java/org/maplibre/mlrn/events/MapChangeEvent.java similarity index 85% rename from android/src/main/java/org/maplibre/rctmln/events/MapChangeEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/MapChangeEvent.java index b325f2b85..43f2a17b8 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/MapChangeEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/MapChangeEvent.java @@ -1,11 +1,11 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import org.maplibre.rctmln.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventKeys; /** * Created by nickitaliano on 8/27/17. @@ -40,7 +40,7 @@ public WritableMap getPayload() { public boolean canCoalesce() { // Make sure EventDispatcher never merges EventKeys.MAP_ONCHANGE events. // This event name is used to emit events with different - // org.maplibre.rctmln.events.constants.EventTypes which are dispatched separately on + // org.maplibre.mlrn.events.constants.EventTypes which are dispatched separately on // the JS side return false; } diff --git a/android/src/main/java/org/maplibre/rctmln/events/MapClickEvent.java b/android/src/main/java/org/maplibre/mlrn/events/MapClickEvent.java similarity index 87% rename from android/src/main/java/org/maplibre/rctmln/events/MapClickEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/MapClickEvent.java index 9ee57e6dd..e684c4009 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/MapClickEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/MapClickEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,9 +8,9 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.geometry.LatLng; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.GeoJSONUtils; /** * Created by nickitaliano on 8/23/17. diff --git a/android/src/main/java/org/maplibre/rctmln/events/MapUserTrackingModeEvent.java b/android/src/main/java/org/maplibre/mlrn/events/MapUserTrackingModeEvent.java similarity index 81% rename from android/src/main/java/org/maplibre/rctmln/events/MapUserTrackingModeEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/MapUserTrackingModeEvent.java index 92ce7f164..a90d8067b 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/MapUserTrackingModeEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/MapUserTrackingModeEvent.java @@ -1,12 +1,12 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.location.UserTrackingMode; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.location.UserTrackingMode; /** * Created by nickitaliano on 12/19/17. diff --git a/android/src/main/java/org/maplibre/rctmln/events/OfflineEvent.java b/android/src/main/java/org/maplibre/mlrn/events/OfflineEvent.java similarity index 94% rename from android/src/main/java/org/maplibre/rctmln/events/OfflineEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/OfflineEvent.java index 4f6093b9c..0dcdc8b50 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/OfflineEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/OfflineEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableMap; diff --git a/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationClickEvent.java b/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationClickEvent.java similarity index 70% rename from android/src/main/java/org/maplibre/rctmln/events/PointAnnotationClickEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/PointAnnotationClickEvent.java index bd4ffe27c..383da106c 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationClickEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationClickEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,22 +8,22 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.plugins.markerview.MarkerView; import org.maplibre.android.geometry.LatLng; -import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.annotation.MLRNPointAnnotation; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; /** * Created by nickitaliano on 10/11/17. */ public class PointAnnotationClickEvent extends MapClickEvent { - private RCTMLNPointAnnotation mView; + private MLRNPointAnnotation mView; private LatLng mTouchedLatLng; private PointF mScreenPoint; - public PointAnnotationClickEvent(RCTMLNPointAnnotation view, @NonNull LatLng latLng, @NonNull PointF screenPoint, String eventType) { + public PointAnnotationClickEvent(MLRNPointAnnotation view, @NonNull LatLng latLng, @NonNull PointF screenPoint, String eventType) { super(view, latLng, screenPoint, eventType); mView = view; mTouchedLatLng = latLng; diff --git a/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationDragEvent.java b/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationDragEvent.java similarity index 73% rename from android/src/main/java/org/maplibre/rctmln/events/PointAnnotationDragEvent.java rename to android/src/main/java/org/maplibre/mlrn/events/PointAnnotationDragEvent.java index 19c2cec48..63b618218 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/PointAnnotationDragEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationDragEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events; +package org.maplibre.mlrn.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,18 +8,18 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.plugins.markerview.MarkerView; import org.maplibre.android.geometry.LatLng; -import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotation; -import org.maplibre.rctmln.events.constants.EventKeys; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.components.annotation.MLRNPointAnnotation; +import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; public class PointAnnotationDragEvent extends MapClickEvent { - RCTMLNPointAnnotation mView; + MLRNPointAnnotation mView; private LatLng mTouchedLatLng; private PointF mScreenPoint; - public PointAnnotationDragEvent(RCTMLNPointAnnotation view, @NonNull LatLng latLng, @NonNull PointF screenPoint, String eventType) { + public PointAnnotationDragEvent(MLRNPointAnnotation view, @NonNull LatLng latLng, @NonNull PointF screenPoint, String eventType) { super(view, latLng, screenPoint, eventType); mView = view; mTouchedLatLng = latLng; diff --git a/android/src/main/java/org/maplibre/rctmln/events/constants/EventKeys.java b/android/src/main/java/org/maplibre/mlrn/events/constants/EventKeys.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/events/constants/EventKeys.java rename to android/src/main/java/org/maplibre/mlrn/events/constants/EventKeys.java index fbc036a40..bed42d190 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/constants/EventKeys.java +++ b/android/src/main/java/org/maplibre/mlrn/events/constants/EventKeys.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events.constants; +package org.maplibre.mlrn.events.constants; /** * Created by nickitaliano on 8/27/17. diff --git a/android/src/main/java/org/maplibre/rctmln/events/constants/EventTypes.java b/android/src/main/java/org/maplibre/mlrn/events/constants/EventTypes.java similarity index 98% rename from android/src/main/java/org/maplibre/rctmln/events/constants/EventTypes.java rename to android/src/main/java/org/maplibre/mlrn/events/constants/EventTypes.java index b444ee27f..69373aaa2 100644 --- a/android/src/main/java/org/maplibre/rctmln/events/constants/EventTypes.java +++ b/android/src/main/java/org/maplibre/mlrn/events/constants/EventTypes.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.events.constants; +package org.maplibre.mlrn.events.constants; /** * Created by nickitaliano on 8/24/17. diff --git a/android/src/main/java/org/maplibre/rctmln/http/CustomHeadersInterceptor.java b/android/src/main/java/org/maplibre/mlrn/http/CustomHeadersInterceptor.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/http/CustomHeadersInterceptor.java rename to android/src/main/java/org/maplibre/mlrn/http/CustomHeadersInterceptor.java index 4514076fb..9025cc514 100644 --- a/android/src/main/java/org/maplibre/rctmln/http/CustomHeadersInterceptor.java +++ b/android/src/main/java/org/maplibre/mlrn/http/CustomHeadersInterceptor.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.http; +package org.maplibre.mlrn.http; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/rctmln/location/LocationManager.java b/android/src/main/java/org/maplibre/mlrn/location/LocationManager.java similarity index 99% rename from android/src/main/java/org/maplibre/rctmln/location/LocationManager.java rename to android/src/main/java/org/maplibre/mlrn/location/LocationManager.java index 9409e053d..0a2759764 100644 --- a/android/src/main/java/org/maplibre/rctmln/location/LocationManager.java +++ b/android/src/main/java/org/maplibre/mlrn/location/LocationManager.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.location; +package org.maplibre.mlrn.location; import android.content.Context; import android.location.Location; diff --git a/android/src/main/java/org/maplibre/rctmln/location/UserLocation.java b/android/src/main/java/org/maplibre/mlrn/location/UserLocation.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/location/UserLocation.java rename to android/src/main/java/org/maplibre/mlrn/location/UserLocation.java index 0b9e529e8..da8780f4b 100644 --- a/android/src/main/java/org/maplibre/rctmln/location/UserLocation.java +++ b/android/src/main/java/org/maplibre/mlrn/location/UserLocation.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.location; +package org.maplibre.mlrn.location; import android.location.Location; diff --git a/android/src/main/java/org/maplibre/rctmln/location/UserLocationVerticalAlignment.java b/android/src/main/java/org/maplibre/mlrn/location/UserLocationVerticalAlignment.java similarity index 84% rename from android/src/main/java/org/maplibre/rctmln/location/UserLocationVerticalAlignment.java rename to android/src/main/java/org/maplibre/mlrn/location/UserLocationVerticalAlignment.java index cddffcea9..1e3c433b0 100644 --- a/android/src/main/java/org/maplibre/rctmln/location/UserLocationVerticalAlignment.java +++ b/android/src/main/java/org/maplibre/mlrn/location/UserLocationVerticalAlignment.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.location; +package org.maplibre.mlrn.location; /** * Created by nickitaliano on 12/13/17. diff --git a/android/src/main/java/org/maplibre/rctmln/location/UserTrackingMode.java b/android/src/main/java/org/maplibre/mlrn/location/UserTrackingMode.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/location/UserTrackingMode.java rename to android/src/main/java/org/maplibre/mlrn/location/UserTrackingMode.java index 9a517203b..f0b86392d 100644 --- a/android/src/main/java/org/maplibre/rctmln/location/UserTrackingMode.java +++ b/android/src/main/java/org/maplibre/mlrn/location/UserTrackingMode.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.location; +package org.maplibre.mlrn.location; /* import org.maplibre.android.plugins.locationlayer.modes.RenderMode; diff --git a/android/src/main/java/org/maplibre/rctmln/location/UserTrackingState.java b/android/src/main/java/org/maplibre/mlrn/location/UserTrackingState.java similarity index 92% rename from android/src/main/java/org/maplibre/rctmln/location/UserTrackingState.java rename to android/src/main/java/org/maplibre/mlrn/location/UserTrackingState.java index df7db4a4e..01c12519b 100644 --- a/android/src/main/java/org/maplibre/rctmln/location/UserTrackingState.java +++ b/android/src/main/java/org/maplibre/mlrn/location/UserTrackingState.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.location; +package org.maplibre.mlrn.location; /** * Created by nickitaliano on 12/13/17. diff --git a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLocationModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java similarity index 92% rename from android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLocationModule.java rename to android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java index b106d6fb8..3cf313e34 100644 --- a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLocationModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.modules; +package org.maplibre.mlrn.modules; import android.location.Location; import androidx.annotation.NonNull; @@ -12,12 +12,12 @@ import com.facebook.react.modules.core.RCTNativeAppEventEmitter; import org.maplibre.android.location.engine.LocationEngineCallback; import org.maplibre.android.location.engine.LocationEngineResult; -import org.maplibre.rctmln.events.EventEmitter; -import org.maplibre.rctmln.events.LocationEvent; -import org.maplibre.rctmln.location.LocationManager; +import org.maplibre.mlrn.events.EventEmitter; +import org.maplibre.mlrn.events.LocationEvent; +import org.maplibre.mlrn.location.LocationManager; -@ReactModule(name = RCTMLNLocationModule.REACT_CLASS) -public class RCTMLNLocationModule extends ReactContextBaseJavaModule { +@ReactModule(name = MLRNLocationModule.REACT_CLASS) +public class MLRNLocationModule extends ReactContextBaseJavaModule { public static final String REACT_CLASS = "MLNLocationModule"; public static final String LOCATION_UPDATE = "MapboxUserLocationUpdate"; @@ -58,7 +58,7 @@ public void onLocationChange(Location location) { } }; - public RCTMLNLocationModule(ReactApplicationContext reactContext) { + public MLRNLocationModule(ReactApplicationContext reactContext) { super(reactContext); locationManager = LocationManager.getInstance(reactContext); reactContext.addLifecycleEventListener(lifecycleEventListener); diff --git a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLogging.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java similarity index 94% rename from android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLogging.java rename to android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java index 5d9dc8234..b8f6da318 100644 --- a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNLogging.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.modules; +package org.maplibre.mlrn.modules; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactApplicationContext; @@ -11,12 +11,12 @@ import org.maplibre.android.log.LoggerDefinition; import android.util.Log; -@ReactModule(name = RCTMLNLogging.REACT_CLASS) -public class RCTMLNLogging extends ReactContextBaseJavaModule { +@ReactModule(name = MLRNLogging.REACT_CLASS) +public class MLRNLogging extends ReactContextBaseJavaModule { public static final String REACT_CLASS = "MLNLogging"; private ReactApplicationContext mReactContext; - public RCTMLNLogging(ReactApplicationContext reactApplicationContext) { + public MLRNLogging(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); mReactContext = reactApplicationContext; diff --git a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java similarity index 90% rename from android/src/main/java/org/maplibre/rctmln/modules/RCTMLNModule.java rename to android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java index ad858d0d1..b30ec5a17 100644 --- a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.modules; +package org.maplibre.mlrn.modules; import android.os.Handler; import android.util.Log; @@ -12,13 +12,13 @@ import org.maplibre.android.MapLibre; import org.maplibre.android.WellKnownTileServer; import org.maplibre.android.style.layers.Property; -import org.maplibre.rctmln.components.camera.constants.CameraMode; -import org.maplibre.rctmln.components.styles.RCTMLNStyleValue; -import org.maplibre.rctmln.components.styles.sources.RCTSource; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.http.CustomHeadersInterceptor; -import org.maplibre.rctmln.location.UserLocationVerticalAlignment; -import org.maplibre.rctmln.location.UserTrackingMode; +import org.maplibre.mlrn.components.camera.constants.CameraMode; +import org.maplibre.mlrn.components.styles.MLRNStyleValue; +import org.maplibre.mlrn.components.styles.sources.RCTSource; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.http.CustomHeadersInterceptor; +import org.maplibre.mlrn.location.UserLocationVerticalAlignment; +import org.maplibre.mlrn.location.UserTrackingMode; import okhttp3.Dispatcher; import okhttp3.OkHttpClient; @@ -34,8 +34,8 @@ * Created by nickitaliano on 8/18/17. */ -@ReactModule(name = RCTMLNModule.REACT_CLASS) -public class RCTMLNModule extends ReactContextBaseJavaModule { +@ReactModule(name = MLRNModule.REACT_CLASS) +public class MLRNModule extends ReactContextBaseJavaModule { public static final String REACT_CLASS = "MLNModule"; private static boolean customHeaderInterceptorAdded = false; @@ -43,7 +43,7 @@ public class RCTMLNModule extends ReactContextBaseJavaModule { private Handler mUiThreadHandler; private ReactApplicationContext mReactContext; - public RCTMLNModule(ReactApplicationContext reactApplicationContext) { + public MLRNModule(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); mReactContext = reactApplicationContext; } @@ -105,10 +105,10 @@ public Map getConstants() { // interpolation modes Map interpolationModes = new HashMap<>(); - interpolationModes.put("Exponential", RCTMLNStyleValue.InterpolationModeExponential); - interpolationModes.put("Categorical", RCTMLNStyleValue.InterpolationModeCategorical); - interpolationModes.put("Interval", RCTMLNStyleValue.InterpolationModeInterval); - interpolationModes.put("Identity", RCTMLNStyleValue.InterpolationModeIdentity); + interpolationModes.put("Exponential", MLRNStyleValue.InterpolationModeExponential); + interpolationModes.put("Categorical", MLRNStyleValue.InterpolationModeCategorical); + interpolationModes.put("Interval", MLRNStyleValue.InterpolationModeInterval); + interpolationModes.put("Identity", MLRNStyleValue.InterpolationModeIdentity); // line layer constants Map lineJoin = new HashMap<>(); @@ -226,18 +226,18 @@ public Map getConstants() { // offline region download states Map offlinePackDownloadStates = new HashMap<>(); - offlinePackDownloadStates.put("Inactive", RCTMLNOfflineModule.INACTIVE_REGION_DOWNLOAD_STATE); - offlinePackDownloadStates.put("Active", RCTMLNOfflineModule.ACTIVE_REGION_DOWNLOAD_STATE); - offlinePackDownloadStates.put("Complete", RCTMLNOfflineModule.COMPLETE_REGION_DOWNLOAD_STATE); + offlinePackDownloadStates.put("Inactive", MLRNOfflineModule.INACTIVE_REGION_DOWNLOAD_STATE); + offlinePackDownloadStates.put("Active", MLRNOfflineModule.ACTIVE_REGION_DOWNLOAD_STATE); + offlinePackDownloadStates.put("Complete", MLRNOfflineModule.COMPLETE_REGION_DOWNLOAD_STATE); // offline module callback names Map offlineModuleCallbackNames = new HashMap<>(); - offlineModuleCallbackNames.put("Error", RCTMLNOfflineModule.OFFLINE_ERROR); - offlineModuleCallbackNames.put("Progress", RCTMLNOfflineModule.OFFLINE_PROGRESS); + offlineModuleCallbackNames.put("Error", MLRNOfflineModule.OFFLINE_ERROR); + offlineModuleCallbackNames.put("Progress", MLRNOfflineModule.OFFLINE_PROGRESS); // location module callback names Map locationModuleCallbackNames = new HashMap<>(); - locationModuleCallbackNames.put("Update", RCTMLNLocationModule.LOCATION_UPDATE); + locationModuleCallbackNames.put("Update", MLRNLocationModule.LOCATION_UPDATE); return MapBuilder.builder() .put("StyleURL", styleURLS) diff --git a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNOfflineModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/modules/RCTMLNOfflineModule.java rename to android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java index d303c44bb..4a44dfa48 100644 --- a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNOfflineModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.modules; +package org.maplibre.mlrn.modules; import android.content.Context; import android.os.Handler; @@ -18,11 +18,11 @@ import org.maplibre.android.offline.OfflineRegionStatus; import org.maplibre.android.offline.OfflineTilePyramidRegionDefinition; import org.maplibre.android.storage.FileSource; -import org.maplibre.rctmln.events.IEvent; -import org.maplibre.rctmln.events.OfflineEvent; -import org.maplibre.rctmln.events.constants.EventTypes; -import org.maplibre.rctmln.utils.ConvertUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.events.IEvent; +import org.maplibre.mlrn.events.OfflineEvent; +import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.mlrn.utils.ConvertUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; import org.maplibre.android.maps.Style; import org.json.JSONException; @@ -36,8 +36,8 @@ * Created by nickitaliano on 10/24/17. */ -@ReactModule(name = RCTMLNOfflineModule.REACT_CLASS) -public class RCTMLNOfflineModule extends ReactContextBaseJavaModule { +@ReactModule(name = MLRNOfflineModule.REACT_CLASS) +public class MLRNOfflineModule extends ReactContextBaseJavaModule { public static final String REACT_CLASS = "MLNOfflineModule"; public static final int INACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_INACTIVE; @@ -55,7 +55,7 @@ public class RCTMLNOfflineModule extends ReactContextBaseJavaModule { private final ReactContext mReactContext; private Double mProgressEventThrottle = 300.0; - public RCTMLNOfflineModule(ReactApplicationContext reactApplicationContext) { + public MLRNOfflineModule(ReactApplicationContext reactApplicationContext) { super(reactApplicationContext); mReactContext = reactApplicationContext; mContext = reactApplicationContext.getApplicationContext(); diff --git a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNSnapshotModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java similarity index 93% rename from android/src/main/java/org/maplibre/rctmln/modules/RCTMLNSnapshotModule.java rename to android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java index a474d9cc7..3a380d90d 100644 --- a/android/src/main/java/org/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.modules; +package org.maplibre.mlrn.modules; import android.content.Context; import android.content.pm.PackageManager; @@ -23,8 +23,8 @@ import org.maplibre.android.snapshotter.MapSnapshot; import org.maplibre.android.snapshotter.MapSnapshotter; import org.maplibre.android.storage.FileSource; -import org.maplibre.rctmln.utils.BitmapUtils; -import org.maplibre.rctmln.utils.GeoJSONUtils; +import org.maplibre.mlrn.utils.BitmapUtils; +import org.maplibre.mlrn.utils.GeoJSONUtils; import java.io.IOException; import java.io.OutputStream; @@ -38,8 +38,8 @@ * Created by nickitaliano on 11/30/17. */ -@ReactModule(name = RCTMLNSnapshotModule.REACT_CLASS) -public class RCTMLNSnapshotModule extends ReactContextBaseJavaModule { +@ReactModule(name = MLRNSnapshotModule.REACT_CLASS) +public class MLRNSnapshotModule extends ReactContextBaseJavaModule { public static final String REACT_CLASS = "MLNSnapshotModule"; private ReactApplicationContext mContext; @@ -47,7 +47,7 @@ public class RCTMLNSnapshotModule extends ReactContextBaseJavaModule { // prevents snapshotter from being GC'ed private Map mSnapshotterMap; - public RCTMLNSnapshotModule(ReactApplicationContext reactContext) { + public MLRNSnapshotModule(ReactApplicationContext reactContext) { super(reactContext); mContext = reactContext; mSnapshotterMap = new HashMap<>(); diff --git a/android/src/main/java/org/maplibre/rctmln/utils/BitmapUtils.java b/android/src/main/java/org/maplibre/mlrn/utils/BitmapUtils.java similarity index 99% rename from android/src/main/java/org/maplibre/rctmln/utils/BitmapUtils.java rename to android/src/main/java/org/maplibre/mlrn/utils/BitmapUtils.java index ef36a9474..6de7b2581 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/BitmapUtils.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/BitmapUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/ClusterPropertyEntry.java b/android/src/main/java/org/maplibre/mlrn/utils/ClusterPropertyEntry.java similarity index 89% rename from android/src/main/java/org/maplibre/rctmln/utils/ClusterPropertyEntry.java rename to android/src/main/java/org/maplibre/mlrn/utils/ClusterPropertyEntry.java index a24563c14..78c07f4c8 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/ClusterPropertyEntry.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/ClusterPropertyEntry.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import org.maplibre.android.style.expressions.Expression; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/ConvertUtils.java b/android/src/main/java/org/maplibre/mlrn/utils/ConvertUtils.java similarity index 99% rename from android/src/main/java/org/maplibre/rctmln/utils/ConvertUtils.java rename to android/src/main/java/org/maplibre/mlrn/utils/ConvertUtils.java index e4a43067b..6b1d54fee 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/ConvertUtils.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/ConvertUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import android.graphics.PointF; import android.graphics.RectF; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/DownloadMapImageTask.java b/android/src/main/java/org/maplibre/mlrn/utils/DownloadMapImageTask.java similarity index 99% rename from android/src/main/java/org/maplibre/rctmln/utils/DownloadMapImageTask.java rename to android/src/main/java/org/maplibre/mlrn/utils/DownloadMapImageTask.java index 9104a8691..62840bd6d 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/DownloadMapImageTask.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/DownloadMapImageTask.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/ExpressionParser.java b/android/src/main/java/org/maplibre/mlrn/utils/ExpressionParser.java similarity index 98% rename from android/src/main/java/org/maplibre/rctmln/utils/ExpressionParser.java rename to android/src/main/java/org/maplibre/mlrn/utils/ExpressionParser.java index 221f378ac..59012240c 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/ExpressionParser.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/ExpressionParser.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/GeoJSONUtils.java b/android/src/main/java/org/maplibre/mlrn/utils/GeoJSONUtils.java similarity index 99% rename from android/src/main/java/org/maplibre/rctmln/utils/GeoJSONUtils.java rename to android/src/main/java/org/maplibre/mlrn/utils/GeoJSONUtils.java index 53625fbd1..c5c48c661 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/GeoJSONUtils.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/GeoJSONUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReadableArray; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/GeoViewport.java b/android/src/main/java/org/maplibre/mlrn/utils/GeoViewport.java similarity index 97% rename from android/src/main/java/org/maplibre/rctmln/utils/GeoViewport.java rename to android/src/main/java/org/maplibre/mlrn/utils/GeoViewport.java index 872729cf7..35386990c 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/GeoViewport.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/GeoViewport.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import android.graphics.PointF; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/ImageEntry.java b/android/src/main/java/org/maplibre/mlrn/utils/ImageEntry.java similarity index 93% rename from android/src/main/java/org/maplibre/rctmln/utils/ImageEntry.java rename to android/src/main/java/org/maplibre/mlrn/utils/ImageEntry.java index 309e3251a..742c0d78f 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/ImageEntry.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/ImageEntry.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; public class ImageEntry { public String uri; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/ResourceUtils.java b/android/src/main/java/org/maplibre/mlrn/utils/ResourceUtils.java similarity index 95% rename from android/src/main/java/org/maplibre/rctmln/utils/ResourceUtils.java rename to android/src/main/java/org/maplibre/mlrn/utils/ResourceUtils.java index 3848000a8..1433e6823 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/ResourceUtils.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/ResourceUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/org/maplibre/rctmln/utils/SimpleEventCallback.java b/android/src/main/java/org/maplibre/mlrn/utils/SimpleEventCallback.java similarity index 81% rename from android/src/main/java/org/maplibre/rctmln/utils/SimpleEventCallback.java rename to android/src/main/java/org/maplibre/mlrn/utils/SimpleEventCallback.java index 2a6d0191f..c9ace3801 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/SimpleEventCallback.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/SimpleEventCallback.java @@ -1,9 +1,9 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.rctmln.components.AbstractEventEmitter; -import org.maplibre.rctmln.events.IEvent; +import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.mlrn.events.IEvent; /** * Created by nickitaliano on 8/31/17. diff --git a/android/src/main/java/org/maplibre/rctmln/utils/SphericalMercator.java b/android/src/main/java/org/maplibre/mlrn/utils/SphericalMercator.java similarity index 98% rename from android/src/main/java/org/maplibre/rctmln/utils/SphericalMercator.java rename to android/src/main/java/org/maplibre/mlrn/utils/SphericalMercator.java index 0f2337fa0..de361a0d3 100644 --- a/android/src/main/java/org/maplibre/rctmln/utils/SphericalMercator.java +++ b/android/src/main/java/org/maplibre/mlrn/utils/SphericalMercator.java @@ -1,4 +1,4 @@ -package org.maplibre.rctmln.utils; +package org.maplibre.mlrn.utils; import android.graphics.Point; import android.graphics.PointF; diff --git a/android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java b/android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java deleted file mode 100644 index db0356673..000000000 --- a/android/src/main/java/org/maplibre/rctmln/RCTMLNPackage.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.maplibre.rctmln; - -import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.JavaScriptModule; -import com.facebook.react.bridge.NativeModule; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.uimanager.ViewManager; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.maplibre.rctmln.components.annotation.RCTMLNCalloutManager; -import org.maplibre.rctmln.components.annotation.RCTMLNPointAnnotationManager; -import org.maplibre.rctmln.components.annotation.RCTMLNMarkerViewManager; -import org.maplibre.rctmln.components.camera.RCTMLNCameraManager; -import org.maplibre.rctmln.components.images.RCTMLNImagesManager; -import org.maplibre.rctmln.components.location.RCTMLNNativeUserLocationManager; -import org.maplibre.rctmln.components.mapview.RCTMLNMapViewManager; -import org.maplibre.rctmln.components.mapview.RCTMLNAndroidTextureMapViewManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNBackgroundLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNCircleLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNFillExtrusionLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNFillLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNHeatmapLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNLineLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNRasterLayerManager; -import org.maplibre.rctmln.components.styles.layers.RCTMLNSymbolLayerManager; -import org.maplibre.rctmln.components.styles.light.RCTMLNLightManager; -import org.maplibre.rctmln.components.styles.sources.RCTMLNImageSourceManager; -import org.maplibre.rctmln.components.styles.sources.RCTMLNRasterSourceManager; -import org.maplibre.rctmln.components.styles.sources.RCTMLNShapeSourceManager; -import org.maplibre.rctmln.components.styles.sources.RCTMLNVectorSourceManager; -import org.maplibre.rctmln.modules.RCTMLNLocationModule; -import org.maplibre.rctmln.modules.RCTMLNLogging; -import org.maplibre.rctmln.modules.RCTMLNModule; -import org.maplibre.rctmln.modules.RCTMLNOfflineModule; -import org.maplibre.rctmln.modules.RCTMLNSnapshotModule; - -/** - * Created by nickitaliano on 8/18/17. - */ - -public class RCTMLNPackage implements ReactPackage { - - @Override - public List createNativeModules(ReactApplicationContext reactApplicationContext) { - List modules = new ArrayList<>(); - - modules.add(new RCTMLNModule(reactApplicationContext)); - modules.add(new RCTMLNOfflineModule(reactApplicationContext)); - modules.add(new RCTMLNSnapshotModule(reactApplicationContext)); - modules.add(new RCTMLNLocationModule(reactApplicationContext)); - modules.add(new RCTMLNLogging(reactApplicationContext)); - - return modules; - } - - @Deprecated - public List> createJSModules() { - return Collections.emptyList(); - } - - @Override - public List createViewManagers(ReactApplicationContext reactApplicationContext) { - List managers = new ArrayList<>(); - - // components - managers.add(new RCTMLNCameraManager(reactApplicationContext)); - managers.add(new RCTMLNMapViewManager(reactApplicationContext)); - managers.add(new RCTMLNMarkerViewManager(reactApplicationContext)); - managers.add(new RCTMLNAndroidTextureMapViewManager(reactApplicationContext)); - managers.add(new RCTMLNLightManager()); - managers.add(new RCTMLNPointAnnotationManager(reactApplicationContext)); - managers.add(new RCTMLNCalloutManager()); - managers.add(new RCTMLNNativeUserLocationManager()); - - // sources - managers.add(new RCTMLNVectorSourceManager(reactApplicationContext)); - managers.add(new RCTMLNShapeSourceManager(reactApplicationContext)); - managers.add(new RCTMLNRasterSourceManager(reactApplicationContext)); - managers.add(new RCTMLNImageSourceManager()); - - // images - managers.add(new RCTMLNImagesManager(reactApplicationContext)); - - // layers - managers.add(new RCTMLNFillLayerManager()); - managers.add(new RCTMLNFillExtrusionLayerManager()); - managers.add(new RCTMLNHeatmapLayerManager()); - managers.add(new RCTMLNLineLayerManager()); - managers.add(new RCTMLNCircleLayerManager()); - managers.add(new RCTMLNSymbolLayerManager()); - managers.add(new RCTMLNRasterLayerManager()); - managers.add(new RCTMLNBackgroundLayerManager()); - - return managers; - } -} diff --git a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java b/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java deleted file mode 100644 index 36d978786..000000000 --- a/android/src/main/java/org/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.maplibre.rctmln.components.annotation; - -import com.facebook.react.uimanager.ThemedReactContext; -import com.facebook.react.uimanager.ViewGroupManager; - -/** - * Created by nickitaliano on 10/11/17. - */ - -public class RCTMLNCalloutManager extends ViewGroupManager { - public static final String REACT_CLASS = "RCTMLNCallout"; - - @Override - public String getName() { - return REACT_CLASS; - } - - @Override - protected RCTMLNCallout createViewInstance(ThemedReactContext reactContext) { - return new RCTMLNCallout(reactContext); - } -} diff --git a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java deleted file mode 100644 index 86849705c..000000000 --- a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.maplibre.rctmln.components.mapview; - -import android.content.Context; -import org.maplibre.android.maps.MapLibreMapOptions; -/** - * Created by hernanmateo on 12/11/18. - */ - -@SuppressWarnings({"MissingPermission"}) -public class RCTMLNAndroidTextureMapView extends RCTMLNMapView { - public static final String LOG_TAG = "RCTMLNAndroidTextureMapView"; - - public RCTMLNAndroidTextureMapView(Context context, RCTMLNAndroidTextureMapViewManager manager, MapLibreMapOptions options) { - super(context, manager, options); - } -} diff --git a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java b/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java deleted file mode 100644 index 1017f50d4..000000000 --- a/android/src/main/java/org/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.maplibre.rctmln.components.mapview; - -import com.facebook.react.bridge.ReactApplicationContext; -import org.maplibre.android.maps.MapLibreMapOptions; -import com.facebook.react.uimanager.ThemedReactContext; -import com.facebook.react.uimanager.annotations.ReactProp; - -/** - * Created by hernanmateo on 12/11/18. - */ - -public class RCTMLNAndroidTextureMapViewManager extends RCTMLNMapViewManager { - public static final String LOG_TAG = "RCTMLNAndroidTextureMapViewManager"; - public static final String REACT_CLASS = "RCTMLNAndroidTextureMapView"; - - public RCTMLNAndroidTextureMapViewManager(ReactApplicationContext context) { - super(context); - } - - @Override - public String getName() { - return REACT_CLASS; - } - - @Override - protected RCTMLNAndroidTextureMapView createViewInstance(ThemedReactContext themedReactContext) { - MapLibreMapOptions options = new MapLibreMapOptions(); - options.textureMode(true); - return new RCTMLNAndroidTextureMapView(themedReactContext, this, options); - } -} diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java deleted file mode 100644 index e1c30a3af..000000000 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.maplibre.rctmln.components.styles.layers; - -import android.content.Context; - -import org.maplibre.android.style.layers.BackgroundLayer; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; - -/** - * Created by nickitaliano on 9/25/17. - */ - -public class RCTMLNBackgroundLayer extends RCTLayer { - public RCTMLNBackgroundLayer(Context context) { - super(context); - } - - @Override - public BackgroundLayer makeLayer() { - return new BackgroundLayer(mID); - } - - @Override - public void addStyles() { - RCTMLNStyleFactory.setBackgroundLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); - } -} diff --git a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java b/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java deleted file mode 100644 index 40efeb7b1..000000000 --- a/android/src/main/java/org/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.maplibre.rctmln.components.styles.layers; - -import android.content.Context; - -import org.maplibre.android.style.layers.RasterLayer; -import org.maplibre.rctmln.components.styles.RCTMLNStyle; -import org.maplibre.rctmln.components.styles.RCTMLNStyleFactory; - -/** - * Created by nickitaliano on 9/25/17. - */ - -public class RCTMLNRasterLayer extends RCTLayer { - public RCTMLNRasterLayer(Context context) { - super(context); - } - - @Override - public RasterLayer makeLayer() { - return new RasterLayer(mID, mSourceID); - } - - @Override - public void addStyles() { - RCTMLNStyleFactory.setRasterLayerStyle(mLayer, new RCTMLNStyle(getContext(), mReactStyle, mMap)); - } -} diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml index 43880429c..a60874842 100644 --- a/android/src/main/res/values/strings.xml +++ b/android/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - RCTMLN + MLRN diff --git a/docs/Callout.md b/docs/Callout.md index be75f887a..b4f95963d 100644 --- a/docs/Callout.md +++ b/docs/Callout.md @@ -8,7 +8,7 @@ Callout that displays information about a selected annotation near the annotatio | ---- | :--: | :-----: | :------: | :----------: | | title | `string` | `none` | `false` | String that get's displayed in the default callout. | | style | `ViewStyle` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this | -| containerStyle | `ViewStyle` | `none` | `false` | Style property for the native RCTMLNCallout container, set at your own risk. | +| containerStyle | `ViewStyle` | `none` | `false` | Style property for the native MLRNCallout container, set at your own risk. | | contentStyle | `ViewStyle` | `none` | `false` | Style property for the content bubble. | | tipStyle | `ViewStyle` | `none` | `false` | Style property for the triangle tip under the content. | | textStyle | `ViewStyle` | `none` | `false` | Style property for the title in the content bubble. | diff --git a/docs/docs.json b/docs/docs.json index d7f926fb1..cb8152403 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -210,7 +210,7 @@ "required": false, "type": "ViewStyle", "default": "none", - "description": "Style property for the native RCTMLNCallout container, set at your own risk." + "description": "Style property for the native MLRNCallout container, set at your own risk." }, { "name": "contentStyle", diff --git a/ios/RCTMLN.xcodeproj/project.pbxproj b/ios/MLRN.xcodeproj/project.pbxproj similarity index 100% rename from ios/RCTMLN.xcodeproj/project.pbxproj rename to ios/MLRN.xcodeproj/project.pbxproj diff --git a/ios/RCTMLN/CameraMode.h b/ios/MLRN/CameraMode.h similarity index 97% rename from ios/RCTMLN/CameraMode.h rename to ios/MLRN/CameraMode.h index f16b437d6..fa9f5a82d 100644 --- a/ios/RCTMLN/CameraMode.h +++ b/ios/MLRN/CameraMode.h @@ -1,6 +1,6 @@ // // CameraMode.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/6/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/CameraMode.m b/ios/MLRN/CameraMode.m similarity index 97% rename from ios/RCTMLN/CameraMode.m rename to ios/MLRN/CameraMode.m index f7317c3dd..3da6597e2 100644 --- a/ios/RCTMLN/CameraMode.m +++ b/ios/MLRN/CameraMode.m @@ -1,6 +1,6 @@ // // CameraMode.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/6/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/CameraStop.h b/ios/MLRN/CameraStop.h similarity index 94% rename from ios/RCTMLN/CameraStop.h rename to ios/MLRN/CameraStop.h index fa7105b3f..90dbb2f50 100644 --- a/ios/RCTMLN/CameraStop.h +++ b/ios/MLRN/CameraStop.h @@ -1,13 +1,13 @@ // // CameraStop.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/5/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // @import MapLibre; -#import "RCTMLNCamera.h" +#import "MLRNCamera.h" @interface CameraStop : NSObject diff --git a/ios/RCTMLN/CameraStop.m b/ios/MLRN/CameraStop.m similarity index 88% rename from ios/RCTMLN/CameraStop.m rename to ios/MLRN/CameraStop.m index eec659525..e82c5e4b4 100644 --- a/ios/RCTMLN/CameraStop.m +++ b/ios/MLRN/CameraStop.m @@ -1,6 +1,6 @@ // // CameraStop.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/5/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,8 +8,8 @@ #import "CameraStop.h" #import "CameraMode.h" -#import "RCTMLNUtils.h" -#import "RCTMLNCamera.h" +#import "MLRNUtils.h" +#import "MLRNCamera.h" @implementation CameraStop @@ -50,7 +50,7 @@ + (CameraStop*)fromDictionary:(NSDictionary *)args } if (args[@"centerCoordinate"]) { - stop.coordinate = [RCTMLNUtils fromFeature:args[@"centerCoordinate"]]; + stop.coordinate = [MLRNUtils fromFeature:args[@"centerCoordinate"]]; } if (args[@"zoom"]) { @@ -62,7 +62,7 @@ + (CameraStop*)fromDictionary:(NSDictionary *)args } if (args[@"bounds"]) { - stop.bounds = [RCTMLNUtils fromFeatureCollection:args[@"bounds"]]; + stop.bounds = [MLRNUtils fromFeatureCollection:args[@"bounds"]]; } CGFloat paddingTop = args[@"paddingTop"] ? [args[@"paddingTop"] floatValue] : 0.0; @@ -73,7 +73,7 @@ + (CameraStop*)fromDictionary:(NSDictionary *)args NSTimeInterval duration = 2.0; if (args[@"duration"]) { - duration = [RCTMLNUtils fromMS:args[@"duration"]]; + duration = [MLRNUtils fromMS:args[@"duration"]]; } stop.duration = duration; diff --git a/ios/RCTMLN/CameraUpdateItem.h b/ios/MLRN/CameraUpdateItem.h similarity index 63% rename from ios/RCTMLN/CameraUpdateItem.h rename to ios/MLRN/CameraUpdateItem.h index b71f02587..53bc73a0e 100644 --- a/ios/RCTMLN/CameraUpdateItem.h +++ b/ios/MLRN/CameraUpdateItem.h @@ -1,18 +1,18 @@ // // CameraUpdateItem.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/6/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import "CameraStop.h" -#import "RCTMLNMapView.h" +#import "MLRNMapView.h" @interface CameraUpdateItem : NSObject @property (nonatomic, strong) CameraStop* _Nonnull cameraStop; -- (void)execute:(RCTMLNMapView* _Nonnull)mapView withCompletionHandler:(nullable void (^)(void))completionHandler; +- (void)execute:(MLRNMapView* _Nonnull)mapView withCompletionHandler:(nullable void (^)(void))completionHandler; @end diff --git a/ios/RCTMLN/CameraUpdateItem.m b/ios/MLRN/CameraUpdateItem.m similarity index 87% rename from ios/RCTMLN/CameraUpdateItem.m rename to ios/MLRN/CameraUpdateItem.m index 6e274142c..97805e15d 100644 --- a/ios/RCTMLN/CameraUpdateItem.m +++ b/ios/MLRN/CameraUpdateItem.m @@ -1,6 +1,6 @@ // // CameraUpdateItem.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/6/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -14,20 +14,20 @@ @interface MLNMapView(FlyToWithPadding) - (void)_flyToCamera:(MLNMapCamera *)camera edgePadding:(UIEdgeInsets)insets withDuration:(NSTimeInterval)duration peakAltitude:(CLLocationDistance)peakAltitude completionHandler:(nullable void (^)(void))completion; @end -@interface RCTMLNCameraWithPadding : MLNMapCamera +@interface MLRNCameraWithPadding : MLNMapCamera @property (nonatomic) MLNMapCamera* _Nonnull camera; @property (nonatomic) UIEdgeInsets boundsPadding; @end -@implementation RCTMLNCameraWithPadding +@implementation MLRNCameraWithPadding @end @implementation CameraUpdateItem -- (void)execute:(RCTMLNMapView *)mapView withCompletionHandler:(void (^)(void))completionHandler +- (void)execute:(MLRNMapView *)mapView withCompletionHandler:(void (^)(void))completionHandler { if (_cameraStop.mode == [NSNumber numberWithInt:RCT_MAPBOX_CAMERA_MODE_FLIGHT]) { [self _flyToCamera:mapView withCompletionHandler:completionHandler]; @@ -40,9 +40,9 @@ - (void)execute:(RCTMLNMapView *)mapView withCompletionHandler:(void (^)(void))c } } -- (void)_flyToCamera:(RCTMLNMapView*)mapView withCompletionHandler:(void (^)(void))completionHandler +- (void)_flyToCamera:(MLRNMapView*)mapView withCompletionHandler:(void (^)(void))completionHandler { - RCTMLNCameraWithPadding *nextCamera = [self _makeCamera:mapView]; + MLRNCameraWithPadding *nextCamera = [self _makeCamera:mapView]; if ([mapView respondsToSelector:@selector(_flyToCamera:edgePadding:withDuration:peakAltitude:completionHandler:)]) { [mapView @@ -59,9 +59,9 @@ - (void)_flyToCamera:(RCTMLNMapView*)mapView withCompletionHandler:(void (^)(voi } } -- (void)_moveCamera:(RCTMLNMapView*)mapView animated:(BOOL)animated ease:(BOOL)ease withCompletionHandler:(void (^)(void))completionHandler +- (void)_moveCamera:(MLRNMapView*)mapView animated:(BOOL)animated ease:(BOOL)ease withCompletionHandler:(void (^)(void))completionHandler { - RCTMLNCameraWithPadding *nextCamera = [self _makeCamera:mapView]; + MLRNCameraWithPadding *nextCamera = [self _makeCamera:mapView]; NSString *easeFunctionName = ease ? kCAMediaTimingFunctionEaseInEaseOut : kCAMediaTimingFunctionLinear; [mapView setCamera:nextCamera.camera @@ -71,7 +71,7 @@ - (void)_moveCamera:(RCTMLNMapView*)mapView animated:(BOOL)animated ease:(BOOL)e completionHandler:completionHandler]; } -- (RCTMLNCameraWithPadding*)_makeCamera:(RCTMLNMapView*)mapView +- (MLRNCameraWithPadding*)_makeCamera:(MLRNMapView*)mapView { MLNMapCamera *nextCamera = [mapView.camera copy]; @@ -117,13 +117,13 @@ - (RCTMLNCameraWithPadding*)_makeCamera:(RCTMLNMapView*)mapView atPitch:nextCamera.pitch]; } - RCTMLNCameraWithPadding* cameraWithPadding = [[RCTMLNCameraWithPadding alloc] init]; + MLRNCameraWithPadding* cameraWithPadding = [[MLRNCameraWithPadding alloc] init]; cameraWithPadding.camera = nextCamera; cameraWithPadding.boundsPadding = padding; return cameraWithPadding; } -- (UIEdgeInsets)_clippedPadding:(UIEdgeInsets)padding forView:(RCTMLNMapView*)mapView +- (UIEdgeInsets)_clippedPadding:(UIEdgeInsets)padding forView:(MLRNMapView*)mapView { UIEdgeInsets result = padding; if ((padding.top + padding.bottom) >= mapView.frame.size.height) { diff --git a/ios/RCTMLN/CameraUpdateQueue.h b/ios/MLRN/CameraUpdateQueue.h similarity index 80% rename from ios/RCTMLN/CameraUpdateQueue.h rename to ios/MLRN/CameraUpdateQueue.h index e4c322cb7..22c15db4c 100644 --- a/ios/RCTMLN/CameraUpdateQueue.h +++ b/ios/MLRN/CameraUpdateQueue.h @@ -1,6 +1,6 @@ // // CameraUpdateQueue.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/6/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,7 +8,7 @@ #import "CameraStop.h" #import "CameraUpdateItem.h" -#import "RCTMLNMapView.h" +#import "MLRNMapView.h" @interface CameraUpdateQueue : NSObject @@ -16,6 +16,6 @@ - (CameraStop* _Nonnull)dequeue; - (void)flush; - (BOOL)isEmpty; -- (void)execute:(RCTMLNMapView* _Nonnull)mapView; +- (void)execute:(MLRNMapView* _Nonnull)mapView; @end diff --git a/ios/RCTMLN/CameraUpdateQueue.m b/ios/MLRN/CameraUpdateQueue.m similarity index 92% rename from ios/RCTMLN/CameraUpdateQueue.m rename to ios/MLRN/CameraUpdateQueue.m index b120ab231..552257a39 100644 --- a/ios/RCTMLN/CameraUpdateQueue.m +++ b/ios/MLRN/CameraUpdateQueue.m @@ -1,6 +1,6 @@ // // CameraUpdateQueue.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/6/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -47,7 +47,7 @@ - (BOOL)isEmpty return queue.count == 0; } -- (void)execute:(RCTMLNMapView*)mapView +- (void)execute:(MLRNMapView*)mapView { if (mapView == nil) { return; @@ -66,7 +66,7 @@ - (void)execute:(RCTMLNMapView*)mapView item.cameraStop = stop; __weak CameraUpdateQueue *weakSelf = self; - __weak RCTMLNMapView *weakMap = mapView; + __weak MLRNMapView *weakMap = mapView; [item execute:mapView withCompletionHandler:^{ [weakSelf execute:weakMap]; }]; } diff --git a/ios/RCTMLN/FilterParser.h b/ios/MLRN/FilterParser.h similarity index 95% rename from ios/RCTMLN/FilterParser.h rename to ios/MLRN/FilterParser.h index b0fc66f02..13c82bbf9 100644 --- a/ios/RCTMLN/FilterParser.h +++ b/ios/MLRN/FilterParser.h @@ -1,6 +1,6 @@ // // FilterParser.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 10/3/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/FilterParser.m b/ios/MLRN/FilterParser.m similarity index 97% rename from ios/RCTMLN/FilterParser.m rename to ios/MLRN/FilterParser.m index 4c91525c6..e690a87ea 100644 --- a/ios/RCTMLN/FilterParser.m +++ b/ios/MLRN/FilterParser.m @@ -1,6 +1,6 @@ // // FilterParser.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 10/3/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/MLNCustomHeaders.h b/ios/MLRN/MLNCustomHeaders.h similarity index 97% rename from ios/RCTMLN/MLNCustomHeaders.h rename to ios/MLRN/MLNCustomHeaders.h index 8fd40bcb6..6f71c4250 100644 --- a/ios/RCTMLN/MLNCustomHeaders.h +++ b/ios/MLRN/MLNCustomHeaders.h @@ -1,6 +1,6 @@ // // MLNCustomHeaders.h -// RCTMLN +// MLRN // #import diff --git a/ios/RCTMLN/MLNCustomHeaders.m b/ios/MLRN/MLNCustomHeaders.m similarity index 99% rename from ios/RCTMLN/MLNCustomHeaders.m rename to ios/MLRN/MLNCustomHeaders.m index 4328a56f0..5649b5187 100644 --- a/ios/RCTMLN/MLNCustomHeaders.m +++ b/ios/MLRN/MLNCustomHeaders.m @@ -1,6 +1,6 @@ // // MLNCustomHeaders.h -// RCTMLN +// MLRN // #import diff --git a/ios/RCTMLN/MLNFaux3DUserLocationAnnotationView.h b/ios/MLRN/MLNFaux3DUserLocationAnnotationView.h similarity index 98% rename from ios/RCTMLN/MLNFaux3DUserLocationAnnotationView.h rename to ios/MLRN/MLNFaux3DUserLocationAnnotationView.h index eeb39d446..4ae5ed95b 100644 --- a/ios/RCTMLN/MLNFaux3DUserLocationAnnotationView.h +++ b/ios/MLRN/MLNFaux3DUserLocationAnnotationView.h @@ -1,6 +1,6 @@ // // MLNFaux3DUserLocationAnnotationView.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 12/20/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/MLNFaux3DUserLocationAnnotationView.m b/ios/MLRN/MLNFaux3DUserLocationAnnotationView.m similarity index 99% rename from ios/RCTMLN/MLNFaux3DUserLocationAnnotationView.m rename to ios/MLRN/MLNFaux3DUserLocationAnnotationView.m index 4af66d54c..02ef665be 100644 --- a/ios/RCTMLN/MLNFaux3DUserLocationAnnotationView.m +++ b/ios/MLRN/MLNFaux3DUserLocationAnnotationView.m @@ -8,7 +8,7 @@ #import "MLNUserLocationHeadingArrowLayer.h" #import "MLNUserLocationHeadingBeamLayer.h" -#import "RCTMLNMapView.h" +#import "MLRNMapView.h" const CGFloat MLNUserLocationAnnotationDotSize = 22.0; const CGFloat MLNUserLocationAnnotationHaloSize = 115.0; @@ -53,7 +53,7 @@ - (void)update if (CLLocationCoordinate2DIsValid(self.userLocation.coordinate)) { - RCTMLNMapView *reactMapView = (RCTMLNMapView *)self.mapView; + MLRNMapView *reactMapView = (MLRNMapView *)self.mapView; // FM - TODO (reactMapView.userTrackingMode == MLNUserTrackingModeFollowWithCourse) ? [self drawPuck] : [self drawDot]; [self updatePitch]; @@ -234,7 +234,7 @@ - (void)drawDot } // heading indicator (tinted, beam or arrow) - RCTMLNMapView *reactMapView = (RCTMLNMapView *)self.mapView; + MLRNMapView *reactMapView = (MLRNMapView *)self.mapView; BOOL headingTrackingModeEnabled = reactMapView.userTrackingMode == MLNUserTrackingModeFollowWithHeading; BOOL showHeadingIndicator = self.mapView.showsUserHeadingIndicator || headingTrackingModeEnabled; diff --git a/ios/RCTMLN/MLNModule.h b/ios/MLRN/MLNModule.h similarity index 95% rename from ios/RCTMLN/MLNModule.h rename to ios/MLRN/MLNModule.h index 419f0096e..bf9bf7222 100644 --- a/ios/RCTMLN/MLNModule.h +++ b/ios/MLRN/MLNModule.h @@ -1,6 +1,6 @@ // // MLNModule.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/MLNModule.m b/ios/MLRN/MLNModule.m similarity index 99% rename from ios/RCTMLN/MLNModule.m rename to ios/MLRN/MLNModule.m index d80b3b563..eff6ec7cf 100644 --- a/ios/RCTMLN/MLNModule.m +++ b/ios/MLRN/MLNModule.m @@ -1,16 +1,16 @@ // // MLNModule.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import "MLNModule.h" -#import "RCTMLNEventTypes.h" +#import "MLRNEventTypes.h" #import "MLNOfflineModule.h" #import "CameraMode.h" -#import "RCTMLNSource.h" +#import "MLRNSource.h" #import "MLNCustomHeaders.h" @import MapLibre; diff --git a/ios/RCTMLN/MLNOfflineModule.h b/ios/MLRN/MLNOfflineModule.h similarity index 97% rename from ios/RCTMLN/MLNOfflineModule.h rename to ios/MLRN/MLNOfflineModule.h index 0da2e5949..899f42380 100644 --- a/ios/RCTMLN/MLNOfflineModule.h +++ b/ios/MLRN/MLNOfflineModule.h @@ -1,6 +1,6 @@ // // MLNOfflineModule.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 10/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/MLNOfflineModule.m b/ios/MLRN/MLNOfflineModule.m similarity index 95% rename from ios/RCTMLN/MLNOfflineModule.m rename to ios/MLRN/MLNOfflineModule.m index 69f883849..3d432b97f 100644 --- a/ios/RCTMLN/MLNOfflineModule.m +++ b/ios/MLRN/MLNOfflineModule.m @@ -1,15 +1,15 @@ // // MLNOfflineModule.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 10/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import "MLNOfflineModule.h" -#import "RCTMLNUtils.h" -#import "RCTMLNEvent.h" -#import "RCTMLNEventTypes.h" +#import "MLRNUtils.h" +#import "MLRNEvent.h" +#import "MLRNEventTypes.h" @implementation MLNOfflineModule { @@ -99,7 +99,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N rejecter:(RCTPromiseRejectBlock)reject) { NSString *styleURL = options[@"styleURL"]; - MLNCoordinateBounds bounds = [RCTMLNUtils fromFeatureCollection:options[@"bounds"]]; + MLNCoordinateBounds bounds = [MLRNUtils fromFeatureCollection:options[@"bounds"]]; id offlineRegion = [[MLNTilePyramidOfflineRegion alloc] initWithStyleURL:[NSURL URLWithString:styleURL] bounds:bounds @@ -341,7 +341,7 @@ - (void)offlinePackProgressDidChange:(NSNotification *)notification if ([self _shouldSendProgressEvent:[self _getCurrentTimestamp] pack:pack]) { NSDictionary *metadata = [self _unarchiveMetadata:pack]; - RCTMLNEvent *event = [self _makeProgressEvent:metadata[@"name"] pack:pack]; + MLRNEvent *event = [self _makeProgressEvent:metadata[@"name"] pack:pack]; [self _sendEvent:RCT_MAPBOX_OFFLINE_CALLBACK_PROGRESS event:event]; lastPackTimestamp = [self _getCurrentTimestamp]; } @@ -360,7 +360,7 @@ - (void)offlinePackDidReceiveError:(NSNotification *)notification NSString *name = metadata[@"name"]; if (name != nil) { NSError *error = notification.userInfo[MLNOfflinePackUserInfoKeyError]; - RCTMLNEvent *event = [self _makeErrorEvent:name + MLRNEvent *event = [self _makeErrorEvent:name type:RCT_MAPBOX_OFFLINE_ERROR message:error.description]; [self _sendEvent:RCT_MAPBOX_OFFLINE_CALLBACK_ERROR event:event]; @@ -374,7 +374,7 @@ - (void)offlinePackDidReceiveMaxAllowedMapboxTiles:(NSNotification *)notificatio NSString *name = metadata[@"name"]; if (name != nil) { - RCTMLNEvent *event = [self _makeErrorEvent:name + MLRNEvent *event = [self _makeErrorEvent:name type:RCT_MAPBOX_OFFLINE_ERROR message:@"Mapbox tile limit exceeded"]; [self _sendEvent:RCT_MAPBOX_OFFLINE_CALLBACK_ERROR event:event]; @@ -440,15 +440,15 @@ - (NSDictionary *)_makeRegionStatusPayload:(NSString *)name pack:(MLNOfflinePack }; } -- (RCTMLNEvent *)_makeProgressEvent:(NSString *)name pack:(MLNOfflinePack *)pack +- (MLRNEvent *)_makeProgressEvent:(NSString *)name pack:(MLNOfflinePack *)pack { - return [RCTMLNEvent makeEvent:RCT_MAPBOX_OFFLINE_PROGRESS withPayload:[self _makeRegionStatusPayload:name pack:pack]]; + return [MLRNEvent makeEvent:RCT_MAPBOX_OFFLINE_PROGRESS withPayload:[self _makeRegionStatusPayload:name pack:pack]]; } -- (RCTMLNEvent *)_makeErrorEvent:(NSString *)name type:(NSString *)type message:(NSString *)message +- (MLRNEvent *)_makeErrorEvent:(NSString *)name type:(NSString *)type message:(NSString *)message { NSDictionary *payload = @{ @"name": name, @"message": message }; - return [RCTMLNEvent makeEvent:type withPayload:payload]; + return [MLRNEvent makeEvent:type withPayload:payload]; } - (NSArray *)_convertPacksToJson:(NSArray *)packs @@ -509,7 +509,7 @@ - (MLNOfflinePack *)_getPackFromName:(NSString *)name return nil; } -- (void)_sendEvent:(NSString *)eventName event:(RCTMLNEvent *)event +- (void)_sendEvent:(NSString *)eventName event:(MLRNEvent *)event { if (!hasListeners) { return; diff --git a/ios/RCTMLN/MLNSnapshotModule.h b/ios/MLRN/MLNSnapshotModule.h similarity index 95% rename from ios/RCTMLN/MLNSnapshotModule.h rename to ios/MLRN/MLNSnapshotModule.h index a8b985aaa..66c65b8e9 100644 --- a/ios/RCTMLN/MLNSnapshotModule.h +++ b/ios/MLRN/MLNSnapshotModule.h @@ -1,6 +1,6 @@ // // MLNSnapshotModule.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 12/1/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/MLNSnapshotModule.m b/ios/MLRN/MLNSnapshotModule.m similarity index 91% rename from ios/RCTMLN/MLNSnapshotModule.m rename to ios/MLRN/MLNSnapshotModule.m index 7d6820a96..4bcd25e66 100644 --- a/ios/RCTMLN/MLNSnapshotModule.m +++ b/ios/MLRN/MLNSnapshotModule.m @@ -1,13 +1,13 @@ // // MLNSnapshotModule.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 12/1/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import "MLNSnapshotModule.h" -#import "RCTMLNUtils.h" +#import "MLRNUtils.h" #import "RNMBImageUtils.h" @import MapLibre; @@ -56,7 +56,7 @@ - (MLNMapSnapshotOptions *)_getOptions:(NSDictionary *)jsOptions camera.heading = [jsOptions[@"heading"] doubleValue]; if (jsOptions[@"centerCoordinate"] != nil) { - camera.centerCoordinate = [RCTMLNUtils fromFeature:jsOptions[@"centerCoordinate"]]; + camera.centerCoordinate = [MLRNUtils fromFeature:jsOptions[@"centerCoordinate"]]; } NSNumber *width = jsOptions[@"width"]; @@ -71,7 +71,7 @@ - (MLNMapSnapshotOptions *)_getOptions:(NSDictionary *)jsOptions } if (jsOptions[@"bounds"] != nil) { - options.coordinateBounds = [RCTMLNUtils fromFeatureCollection:jsOptions[@"bounds"]]; + options.coordinateBounds = [MLRNUtils fromFeatureCollection:jsOptions[@"bounds"]]; } return options; diff --git a/ios/RCTMLN/MLNUserLocationHeadingArrowLayer.h b/ios/MLRN/MLNUserLocationHeadingArrowLayer.h similarity index 100% rename from ios/RCTMLN/MLNUserLocationHeadingArrowLayer.h rename to ios/MLRN/MLNUserLocationHeadingArrowLayer.h diff --git a/ios/RCTMLN/MLNUserLocationHeadingArrowLayer.m b/ios/MLRN/MLNUserLocationHeadingArrowLayer.m similarity index 100% rename from ios/RCTMLN/MLNUserLocationHeadingArrowLayer.m rename to ios/MLRN/MLNUserLocationHeadingArrowLayer.m diff --git a/ios/RCTMLN/MLNUserLocationHeadingBeamLayer.h b/ios/MLRN/MLNUserLocationHeadingBeamLayer.h similarity index 100% rename from ios/RCTMLN/MLNUserLocationHeadingBeamLayer.h rename to ios/MLRN/MLNUserLocationHeadingBeamLayer.h diff --git a/ios/RCTMLN/MLNUserLocationHeadingBeamLayer.m b/ios/MLRN/MLNUserLocationHeadingBeamLayer.m similarity index 100% rename from ios/RCTMLN/MLNUserLocationHeadingBeamLayer.m rename to ios/MLRN/MLNUserLocationHeadingBeamLayer.m diff --git a/ios/RCTMLN/MLNUserLocationHeadingIndicator.h b/ios/MLRN/MLNUserLocationHeadingIndicator.h similarity index 100% rename from ios/RCTMLN/MLNUserLocationHeadingIndicator.h rename to ios/MLRN/MLNUserLocationHeadingIndicator.h diff --git a/ios/RCTMLN/RCTMLN.h b/ios/MLRN/MLRN.h similarity index 73% rename from ios/RCTMLN/RCTMLN.h rename to ios/MLRN/MLRN.h index 28d9090cb..3c025dc00 100644 --- a/ios/RCTMLN/RCTMLN.h +++ b/ios/MLRN/MLRN.h @@ -1,6 +1,6 @@ // -// RCTMLN.h -// RCTMLN +// MLRN.h +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import -@interface RCTMLN : NSObject +@interface MLRN : NSObject @end diff --git a/ios/RCTMLN/RCTMLN.m b/ios/MLRN/MLRN.m similarity index 63% rename from ios/RCTMLN/RCTMLN.m rename to ios/MLRN/MLRN.m index 9d02fbeec..9e9b184cf 100644 --- a/ios/RCTMLN/RCTMLN.m +++ b/ios/MLRN/MLRN.m @@ -1,13 +1,13 @@ // -// RCTMLN.m -// RCTMLN +// MLRN.m +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLN.h" +#import "MLRN.h" -@implementation RCTMLN +@implementation MLRN @end diff --git a/ios/RCTMLN/RCTMLNRasterLayer.h b/ios/MLRN/MLRNBackgroundLayer.h similarity index 56% rename from ios/RCTMLN/RCTMLNRasterLayer.h rename to ios/MLRN/MLRNBackgroundLayer.h index aceb55f92..5a5b6ebde 100644 --- a/ios/RCTMLN/RCTMLNRasterLayer.h +++ b/ios/MLRN/MLRNBackgroundLayer.h @@ -1,14 +1,14 @@ // -// RCTMLNRasterLayer.h -// RCTMLN +// MLRNBackgroundLayer.h +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLayer.h" +#import "MLRNLayer.h" @import MapLibre; -@interface RCTMLNRasterLayer : RCTMLNLayer +@interface MLRNBackgroundLayer : MLRNLayer @end diff --git a/ios/RCTMLN/RCTMLNBackgroundLayer.m b/ios/MLRN/MLRNBackgroundLayer.m similarity index 67% rename from ios/RCTMLN/RCTMLNBackgroundLayer.m rename to ios/MLRN/MLRNBackgroundLayer.m index aed204091..55a1e9a84 100644 --- a/ios/RCTMLN/RCTMLNBackgroundLayer.m +++ b/ios/MLRN/MLRNBackgroundLayer.m @@ -1,15 +1,15 @@ // -// RCTMLNBackgroundLayer.m -// RCTMLN +// MLRNBackgroundLayer.m +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNBackgroundLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNBackgroundLayer.h" +#import "MLRNStyle.h" -@implementation RCTMLNBackgroundLayer +@implementation MLRNBackgroundLayer - (MLNStyleLayer*)makeLayer:(MLNStyle*)style { @@ -18,7 +18,7 @@ - (MLNStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style backgroundLayer:(MLNBackgroundStyleLayer*)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; }]; diff --git a/ios/RCTMLN/RCTMLNRasterSourceManager.h b/ios/MLRN/MLRNBackgroundLayerManager.h similarity index 59% rename from ios/RCTMLN/RCTMLNRasterSourceManager.h rename to ios/MLRN/MLRNBackgroundLayerManager.h index 46a744993..92204bef8 100644 --- a/ios/RCTMLN/RCTMLNRasterSourceManager.h +++ b/ios/MLRN/MLRNBackgroundLayerManager.h @@ -1,6 +1,6 @@ // -// RCTMLNRasterSourceManager.h -// RCTMLN +// MLRNBackgroundLayerManager.h +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNRasterSourceManager : ViewManager +@interface MLRNBackgroundLayerManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNBackgroundLayerManager.m b/ios/MLRN/MLRNBackgroundLayerManager.m similarity index 72% rename from ios/RCTMLN/RCTMLNBackgroundLayerManager.m rename to ios/MLRN/MLRNBackgroundLayerManager.m index eec1210a7..caa6a9c8f 100644 --- a/ios/RCTMLN/RCTMLNBackgroundLayerManager.m +++ b/ios/MLRN/MLRNBackgroundLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNBackgroundLayerManager.m -// RCTMLN +// MLRNBackgroundLayerManager.m +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNBackgroundLayerManager.h" -#import "RCTMLNBackgroundLayer.h" +#import "MLRNBackgroundLayerManager.h" +#import "MLRNBackgroundLayer.h" -@implementation RCTMLNBackgroundLayerManager +@implementation MLRNBackgroundLayerManager RCT_EXPORT_MODULE() @@ -27,7 +27,7 @@ @implementation RCTMLNBackgroundLayerManager - (UIView*)view { - RCTMLNBackgroundLayer *layer = [[RCTMLNBackgroundLayer alloc] init]; + MLRNBackgroundLayer *layer = [[MLRNBackgroundLayer alloc] init]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNCallout.h b/ios/MLRN/MLRNCallout.h similarity index 64% rename from ios/RCTMLN/RCTMLNCallout.h rename to ios/MLRN/MLRNCallout.h index 23a2dff53..56b2940ed 100644 --- a/ios/RCTMLN/RCTMLNCallout.h +++ b/ios/MLRN/MLRNCallout.h @@ -1,6 +1,6 @@ // -// RCTMLNCalloutView.h -// RCTMLN +// MLRNCalloutView.h +// MLRN // // Created by Nick Italiano on 10/13/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -10,6 +10,6 @@ @import MapLibre; -@interface RCTMLNCallout : RCTView +@interface MLRNCallout : RCTView @end diff --git a/ios/RCTMLN/RCTMLNCallout.m b/ios/MLRN/MLRNCallout.m similarity index 95% rename from ios/RCTMLN/RCTMLNCallout.m rename to ios/MLRN/MLRNCallout.m index e1575e091..63429d1a1 100644 --- a/ios/RCTMLN/RCTMLNCallout.m +++ b/ios/MLRN/MLRNCallout.m @@ -1,15 +1,15 @@ // -// RCTMLNCalloutView.m -// RCTMLN +// MLRNCalloutView.m +// MLRN // // Created by Nick Italiano on 10/13/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNCallout.h" +#import "MLRNCallout.h" #import -@implementation RCTMLNCallout +@implementation MLRNCallout { id _representedObject; __unused UIView *_leftAccessoryView;/* unused */ diff --git a/ios/RCTMLN/RCTMLNCalloutManager.h b/ios/MLRN/MLRNCalloutManager.h similarity index 61% rename from ios/RCTMLN/RCTMLNCalloutManager.h rename to ios/MLRN/MLRNCalloutManager.h index d6d7f6109..80b8100b9 100644 --- a/ios/RCTMLN/RCTMLNCalloutManager.h +++ b/ios/MLRN/MLRNCalloutManager.h @@ -1,6 +1,6 @@ // -// RCTMLNCalloutViewManager.h -// RCTMLN +// MLRNCalloutViewManager.h +// MLRN // // Created by Nick Italiano on 10/13/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNCalloutManager : ViewManager +@interface MLRNCalloutManager : ViewManager @end diff --git a/ios/MLRN/MLRNCalloutManager.m b/ios/MLRN/MLRNCalloutManager.m new file mode 100644 index 000000000..263d11650 --- /dev/null +++ b/ios/MLRN/MLRNCalloutManager.m @@ -0,0 +1,21 @@ +// +// MLRNCalloutViewManager.m +// MLRN +// +// Created by Nick Italiano on 10/13/17. +// Copyright © 2017 Mapbox Inc. All rights reserved. +// + +#import "MLRNCalloutManager.h" +#import "MLRNCallout.h" + +@implementation MLRNCalloutManager + +RCT_EXPORT_MODULE() + +- (UIView *)view +{ + return [[MLRNCallout alloc] init]; +} + +@end diff --git a/ios/RCTMLN/RCTMLNCamera.h b/ios/MLRN/MLRNCamera.h similarity index 83% rename from ios/RCTMLN/RCTMLNCamera.h rename to ios/MLRN/MLRNCamera.h index d7aa404e9..8f52ae3ac 100644 --- a/ios/RCTMLN/RCTMLNCamera.h +++ b/ios/MLRN/MLRNCamera.h @@ -1,21 +1,21 @@ // -// RCTMLNCamera.h -// RCTMLN +// MLRNCamera.h +// MLRN // // Created by Nick Italiano on 6/22/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // #import #import -#import "RCTMLNMapView.h" +#import "MLRNMapView.h" -@class RCTMLNMapView; +@class MLRNMapView; -@interface RCTMLNCamera : UIView +@interface MLRNCamera : UIView @property (nonatomic, strong) NSDictionary *stop; @property (nonatomic, strong) NSDictionary *defaultStop; -@property (nonatomic, strong) RCTMLNMapView *map; +@property (nonatomic, strong) MLRNMapView *map; @property (nonatomic, assign) BOOL followUserLocation; @property (nonatomic, copy) NSString *followUserMode; diff --git a/ios/RCTMLN/RCTMLNCamera.m b/ios/MLRN/MLRNCamera.m similarity index 92% rename from ios/RCTMLN/RCTMLNCamera.m rename to ios/MLRN/MLRNCamera.m index 68e3e0826..4e0aac7dc 100644 --- a/ios/RCTMLN/RCTMLNCamera.m +++ b/ios/MLRN/MLRNCamera.m @@ -1,25 +1,25 @@ // -// RCTMLNCamera.m -// RCTMLN +// MLRNCamera.m +// MLRN // // Created by Nick Italiano on 6/22/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // -#import "RCTMLNCamera.h" +#import "MLRNCamera.h" #import "CameraStop.h" #import "CameraUpdateQueue.h" -#import "RCTMLNLocation.h" -#import "RCTMLNUtils.h" -#import "RCTMLNLocationManager.h" -#import "RCTMLNEvent.h" -#import "RCTMLNEventTypes.h" +#import "MLRNLocation.h" +#import "MLRNUtils.h" +#import "MLRNLocationManager.h" +#import "MLRNEvent.h" +#import "MLRNEventTypes.h" #import "CameraMode.h" -@implementation RCTMLNCamera +@implementation MLRNCamera { CameraUpdateQueue *cameraUpdateQueue; - RCTMLNCamera *followCamera; + MLRNCamera *followCamera; } - (instancetype)init @@ -63,7 +63,7 @@ - (void)setStop:(NSDictionary *)stop [self _updateCamera]; } -- (void)setMap:(RCTMLNMapView *)map +- (void)setMap:(MLRNMapView *)map { if (_map != nil) { _map.reactCamera = nil; @@ -172,7 +172,7 @@ - (void)_updateMaxBounds { if (_map != nil) { if (_maxBounds) { - _map.maxBounds = [RCTMLNUtils fromFeatureCollection:_maxBounds]; + _map.maxBounds = [MLRNUtils fromFeatureCollection:_maxBounds]; } } } @@ -249,7 +249,7 @@ - (void)initialLayout - (void)didChangeUserTrackingMode:(MLNUserTrackingMode)mode animated:(BOOL)animated { NSDictionary *payload = @{ @"followUserMode": [self _trackingModeToString: mode], @"followUserLocation": @((BOOL)(mode != MLNUserTrackingModeNone)) }; - RCTMLNEvent *event = [RCTMLNEvent makeEvent:RCT_MAPBOX_USER_TRACKING_MODE_CHANGE withPayload:payload]; + MLRNEvent *event = [MLRNEvent makeEvent:RCT_MAPBOX_USER_TRACKING_MODE_CHANGE withPayload:payload]; if (_onUserTrackingModeChange) { _onUserTrackingModeChange([event toJSON]); } diff --git a/ios/RCTMLN/RCTMLNCameraManager.h b/ios/MLRN/MLRNCameraManager.h similarity index 62% rename from ios/RCTMLN/RCTMLNCameraManager.h rename to ios/MLRN/MLRNCameraManager.h index ae7d74db9..44eb0f320 100644 --- a/ios/RCTMLN/RCTMLNCameraManager.h +++ b/ios/MLRN/MLRNCameraManager.h @@ -1,6 +1,6 @@ // -// RCTMLNCameraManager.h -// RCTMLN +// MLRNCameraManager.h +// MLRN // // Created by Nick Italiano on 6/22/18. // Copyright © 2018 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNCameraManager : ViewManager +@interface MLRNCameraManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNCameraManager.m b/ios/MLRN/MLRNCameraManager.m similarity index 80% rename from ios/RCTMLN/RCTMLNCameraManager.m rename to ios/MLRN/MLRNCameraManager.m index 9d18792f4..662fc2796 100644 --- a/ios/RCTMLN/RCTMLNCameraManager.m +++ b/ios/MLRN/MLRNCameraManager.m @@ -1,17 +1,17 @@ // -// RCTMLNCameraManager.m -// RCTMLN +// MLRNCameraManager.m +// MLRN // // Created by Nick Italiano on 6/22/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // -#import "RCTMLNCameraManager.h" -#import "RCTMLNCamera.h" +#import "MLRNCameraManager.h" +#import "MLRNCamera.h" -@implementation RCTMLNCameraManager +@implementation MLRNCameraManager -RCT_EXPORT_MODULE(RCTMLNCamera) +RCT_EXPORT_MODULE(MLRNCamera) #pragma - View Properties @@ -43,7 +43,7 @@ - (BOOL)requiresMainQueueSetup - (UIView *)view { - return [[RCTMLNCamera alloc] init]; + return [[MLRNCamera alloc] init]; } @end diff --git a/ios/MLRN/MLRNCircleLayer.h b/ios/MLRN/MLRNCircleLayer.h new file mode 100644 index 000000000..68c380b57 --- /dev/null +++ b/ios/MLRN/MLRNCircleLayer.h @@ -0,0 +1,13 @@ +// +// MLRNCircleLayer.h +// MLRN +// +// Created by Nick Italiano on 9/18/17. +// Copyright © 2017 Mapbox Inc. All rights reserved. +// + +#import "MLRNVectorLayer.h" + +@interface MLRNCircleLayer : MLRNVectorLayer + +@end diff --git a/ios/RCTMLN/RCTMLNCircleLayer.m b/ios/MLRN/MLRNCircleLayer.m similarity index 77% rename from ios/RCTMLN/RCTMLNCircleLayer.m rename to ios/MLRN/MLRNCircleLayer.m index f114dabd0..6c2a157db 100644 --- a/ios/RCTMLN/RCTMLNCircleLayer.m +++ b/ios/MLRN/MLRNCircleLayer.m @@ -1,17 +1,17 @@ // -// RCTMLNCircleLayer.m -// RCTMLN +// MLRNCircleLayer.m +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNCircleLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNCircleLayer.h" +#import "MLRNStyle.h" #import -@implementation RCTMLNCircleLayer +@implementation MLRNCircleLayer - (MLNCircleStyleLayer*)makeLayer:(MLNStyle*)style { @@ -24,7 +24,7 @@ - (MLNCircleStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style circleLayer:(MLNCircleStyleLayer*)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; diff --git a/ios/RCTMLN/RCTMLNLineLayerManager.h b/ios/MLRN/MLRNCircleLayerManager.h similarity index 60% rename from ios/RCTMLN/RCTMLNLineLayerManager.h rename to ios/MLRN/MLRNCircleLayerManager.h index 02ee287d2..89114672f 100644 --- a/ios/RCTMLN/RCTMLNLineLayerManager.h +++ b/ios/MLRN/MLRNCircleLayerManager.h @@ -1,6 +1,6 @@ // -// RCTMLNLineLayerManager.h -// RCTMLN +// MLRNCircleLayerManager.h +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNLineLayerManager : ViewManager +@interface MLRNCircleLayerManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNCircleLayerManager.m b/ios/MLRN/MLRNCircleLayerManager.m similarity index 78% rename from ios/RCTMLN/RCTMLNCircleLayerManager.m rename to ios/MLRN/MLRNCircleLayerManager.m index 86d8a1e0e..52d254ea9 100644 --- a/ios/RCTMLN/RCTMLNCircleLayerManager.m +++ b/ios/MLRN/MLRNCircleLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNCircleLayerManager.m -// RCTMLN +// MLRNCircleLayerManager.m +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNCircleLayerManager.h" -#import "RCTMLNCircleLayer.h" +#import "MLRNCircleLayerManager.h" +#import "MLRNCircleLayer.h" -@implementation RCTMLNCircleLayerManager +@implementation MLRNCircleLayerManager RCT_EXPORT_MODULE() @@ -31,7 +31,7 @@ @implementation RCTMLNCircleLayerManager - (UIView*)view { - RCTMLNCircleLayer *layer = [RCTMLNCircleLayer new]; + MLRNCircleLayer *layer = [MLRNCircleLayer new]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNEvent.h b/ios/MLRN/MLRNEvent.h similarity index 55% rename from ios/RCTMLN/RCTMLNEvent.h rename to ios/MLRN/MLRNEvent.h index 4ef971f5e..f0bb7c43e 100644 --- a/ios/RCTMLN/RCTMLNEvent.h +++ b/ios/MLRN/MLRNEvent.h @@ -1,21 +1,21 @@ // -// RCTMLNEvent.h -// RCTMLN +// MLRNEvent.h +// MLRN // // Created by Nick Italiano on 8/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNEventProtocol.h" +#import "MLRNEventProtocol.h" -@interface RCTMLNEvent : NSObject +@interface MLRNEvent : NSObject @property (nonatomic, copy) NSString *type; @property (nonatomic, strong) NSDictionary *payload; @property (nonatomic, readonly) NSTimeInterval timestamp; -+ (RCTMLNEvent*)makeEvent:(NSString*)eventType; -+ (RCTMLNEvent*)makeEvent:(NSString*)eventType withPayload:(NSDictionary*)payload; ++ (MLRNEvent*)makeEvent:(NSString*)eventType; ++ (MLRNEvent*)makeEvent:(NSString*)eventType withPayload:(NSDictionary*)payload; @end diff --git a/ios/RCTMLN/RCTMLNEvent.m b/ios/MLRN/MLRNEvent.m similarity index 63% rename from ios/RCTMLN/RCTMLNEvent.m rename to ios/MLRN/MLRNEvent.m index 62a401a3c..4d42a68fe 100644 --- a/ios/RCTMLN/RCTMLNEvent.m +++ b/ios/MLRN/MLRNEvent.m @@ -1,14 +1,14 @@ // -// RCTMLNEvent.m -// RCTMLN +// MLRNEvent.m +// MLRN // // Created by Nick Italiano on 8/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNEvent.h" +#import "MLRNEvent.h" -@implementation RCTMLNEvent +@implementation MLRNEvent - (instancetype)init { @@ -31,14 +31,14 @@ - (NSDictionary*)toJSON return @{ @"type": self.type, @"payload": self.payload }; } -+ (RCTMLNEvent*)makeEvent:(NSString*)type ++ (MLRNEvent*)makeEvent:(NSString*)type { - return [RCTMLNEvent makeEvent:type withPayload:@{}]; + return [MLRNEvent makeEvent:type withPayload:@{}]; } -+ (RCTMLNEvent*)makeEvent:(NSString*)type withPayload:(NSDictionary*)payload ++ (MLRNEvent*)makeEvent:(NSString*)type withPayload:(NSDictionary*)payload { - RCTMLNEvent *event = [[RCTMLNEvent alloc] init]; + MLRNEvent *event = [[MLRNEvent alloc] init]; event.type = type; event.payload = payload; return event; diff --git a/ios/RCTMLN/RCTMLNEventProtocol.h b/ios/MLRN/MLRNEventProtocol.h similarity index 77% rename from ios/RCTMLN/RCTMLNEventProtocol.h rename to ios/MLRN/MLRNEventProtocol.h index 23c5715e3..1295e8a20 100644 --- a/ios/RCTMLN/RCTMLNEventProtocol.h +++ b/ios/MLRN/MLRNEventProtocol.h @@ -1,12 +1,12 @@ // -// RCTMLNEvent.h -// RCTMLN +// MLRNEvent.h +// MLRN // // Created by Nick Italiano on 8/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -@protocol RCTMLNEventProtocol +@protocol MLRNEventProtocol @property (nonatomic, copy) NSString *type; @property (nonatomic, strong) NSDictionary *payload; diff --git a/ios/RCTMLN/RCTMLNEventTypes.h b/ios/MLRN/MLRNEventTypes.h similarity index 95% rename from ios/RCTMLN/RCTMLNEventTypes.h rename to ios/MLRN/MLRNEventTypes.h index 120599648..9efe31b28 100644 --- a/ios/RCTMLN/RCTMLNEventTypes.h +++ b/ios/MLRN/MLRNEventTypes.h @@ -1,6 +1,6 @@ // -// RCTMLNEventTypes.h -// RCTMLN +// MLRNEventTypes.h +// MLRN // // Created by Nick Italiano on 8/27/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,7 +8,7 @@ #import -@interface RCTMLNEventTypes : NSObject +@interface MLRNEventTypes : NSObject extern NSString *const RCT_MAPBOX_EVENT_TAP; extern NSString *const RCT_MAPBOX_EVENT_LONGPRESS; diff --git a/ios/RCTMLN/RCTMLNEventTypes.m b/ios/MLRN/MLRNEventTypes.m similarity index 95% rename from ios/RCTMLN/RCTMLNEventTypes.m rename to ios/MLRN/MLRNEventTypes.m index b416d0c03..53ff816b4 100644 --- a/ios/RCTMLN/RCTMLNEventTypes.m +++ b/ios/MLRN/MLRNEventTypes.m @@ -1,14 +1,14 @@ // -// RCTMLNEventTypes.m -// RCTMLN +// MLRNEventTypes.m +// MLRN // // Created by Nick Italiano on 8/27/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNEventTypes.h" +#import "MLRNEventTypes.h" -@implementation RCTMLNEventTypes +@implementation MLRNEventTypes NSString *const RCT_MAPBOX_EVENT_TAP = @"press"; NSString *const RCT_MAPBOX_EVENT_LONGPRESS = @"longpress"; diff --git a/ios/RCTMLN/RCTMLNFillExtrusionLayer.h b/ios/MLRN/MLRNFillExtrusionLayer.h similarity index 50% rename from ios/RCTMLN/RCTMLNFillExtrusionLayer.h rename to ios/MLRN/MLRNFillExtrusionLayer.h index a8a19e9ce..9de713a60 100644 --- a/ios/RCTMLN/RCTMLNFillExtrusionLayer.h +++ b/ios/MLRN/MLRNFillExtrusionLayer.h @@ -1,14 +1,14 @@ // -// RCTMLNFillExtrusionLayer.h -// RCTMLN +// MLRNFillExtrusionLayer.h +// MLRN // // Created by Nick Italiano on 9/15/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNVectorLayer.h" +#import "MLRNVectorLayer.h" @import MapLibre; -@interface RCTMLNFillExtrusionLayer : RCTMLNVectorLayer +@interface MLRNFillExtrusionLayer : MLRNVectorLayer @end diff --git a/ios/RCTMLN/RCTMLNFillExtrusionLayer.m b/ios/MLRN/MLRNFillExtrusionLayer.m similarity index 76% rename from ios/RCTMLN/RCTMLNFillExtrusionLayer.m rename to ios/MLRN/MLRNFillExtrusionLayer.m index 696bc3308..3924d9a4b 100644 --- a/ios/RCTMLN/RCTMLNFillExtrusionLayer.m +++ b/ios/MLRN/MLRNFillExtrusionLayer.m @@ -1,16 +1,16 @@ // -// RCTMLNFillExtrusionLayer.m -// RCTMLN +// MLRNFillExtrusionLayer.m +// MLRN // // Created by Nick Italiano on 9/15/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNFillExtrusionLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNFillExtrusionLayer.h" +#import "MLRNStyle.h" #import -@implementation RCTMLNFillExtrusionLayer +@implementation MLRNFillExtrusionLayer - (MLNFillExtrusionStyleLayer*)makeLayer:(MLNStyle*)style { @@ -23,7 +23,7 @@ - (MLNFillExtrusionStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style fillExtrusionLayer:(MLNFillExtrusionStyleLayer*)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; }]; diff --git a/ios/RCTMLN/RCTMLNFillExtrusionLayerManager.h b/ios/MLRN/MLRNFillExtrusionLayerManager.h similarity index 56% rename from ios/RCTMLN/RCTMLNFillExtrusionLayerManager.h rename to ios/MLRN/MLRNFillExtrusionLayerManager.h index e7d5b7bb3..261e81657 100644 --- a/ios/RCTMLN/RCTMLNFillExtrusionLayerManager.h +++ b/ios/MLRN/MLRNFillExtrusionLayerManager.h @@ -1,6 +1,6 @@ // -// RCTMLNFillExtrusionLayerManager.h -// RCTMLN +// MLRNFillExtrusionLayerManager.h +// MLRN // // Created by Nick Italiano on 9/15/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNFillExtrusionLayerManager : ViewManager +@interface MLRNFillExtrusionLayerManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNFillExtrusionLayerManager.m b/ios/MLRN/MLRNFillExtrusionLayerManager.m similarity index 74% rename from ios/RCTMLN/RCTMLNFillExtrusionLayerManager.m rename to ios/MLRN/MLRNFillExtrusionLayerManager.m index a35eee1c4..dccc9e480 100644 --- a/ios/RCTMLN/RCTMLNFillExtrusionLayerManager.m +++ b/ios/MLRN/MLRNFillExtrusionLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNFillExtrusionLayerManager.m -// RCTMLN +// MLRNFillExtrusionLayerManager.m +// MLRN // // Created by Nick Italiano on 9/15/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNFillExtrusionLayerManager.h" -#import "RCTMLNFillExtrusionLayer.h" +#import "MLRNFillExtrusionLayerManager.h" +#import "MLRNFillExtrusionLayer.h" -@implementation RCTMLNFillExtrusionLayerManager +@implementation MLRNFillExtrusionLayerManager RCT_EXPORT_MODULE() @@ -31,7 +31,7 @@ @implementation RCTMLNFillExtrusionLayerManager - (UIView*)view { - RCTMLNFillExtrusionLayer *layer = [RCTMLNFillExtrusionLayer new]; + MLRNFillExtrusionLayer *layer = [MLRNFillExtrusionLayer new]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNFillLayer.h b/ios/MLRN/MLRNFillLayer.h similarity index 54% rename from ios/RCTMLN/RCTMLNFillLayer.h rename to ios/MLRN/MLRNFillLayer.h index d33915b83..cf22af3eb 100644 --- a/ios/RCTMLN/RCTMLNFillLayer.h +++ b/ios/MLRN/MLRNFillLayer.h @@ -1,14 +1,14 @@ // -// RCTMLNFillLayer.h -// RCTMLN +// MLRNFillLayer.h +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNVectorLayer.h" +#import "MLRNVectorLayer.h" @import MapLibre; -@interface RCTMLNFillLayer : RCTMLNVectorLayer +@interface MLRNFillLayer : MLRNVectorLayer @end diff --git a/ios/RCTMLN/RCTMLNFillLayer.m b/ios/MLRN/MLRNFillLayer.m similarity index 77% rename from ios/RCTMLN/RCTMLNFillLayer.m rename to ios/MLRN/MLRNFillLayer.m index 8561007da..0190c25c7 100644 --- a/ios/RCTMLN/RCTMLNFillLayer.m +++ b/ios/MLRN/MLRNFillLayer.m @@ -1,16 +1,16 @@ // -// RCTMLNFillLayer.m -// RCTMLN +// MLRNFillLayer.m +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNFillLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNFillLayer.h" +#import "MLRNStyle.h" #import -@implementation RCTMLNFillLayer +@implementation MLRNFillLayer - (MLNStyleLayer*)makeLayer:(MLNStyle*)style { @@ -23,7 +23,7 @@ - (MLNStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style fillLayer:(MLNFillStyleLayer*)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; diff --git a/ios/RCTMLN/RCTMLNFillLayerManager.h b/ios/MLRN/MLRNFillLayerManager.h similarity index 60% rename from ios/RCTMLN/RCTMLNFillLayerManager.h rename to ios/MLRN/MLRNFillLayerManager.h index 68d4a34b5..56997a7e2 100644 --- a/ios/RCTMLN/RCTMLNFillLayerManager.h +++ b/ios/MLRN/MLRNFillLayerManager.h @@ -1,6 +1,6 @@ // -// RCTMLNFillLayerManager.h -// RCTMLN +// MLRNFillLayerManager.h +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNFillLayerManager : ViewManager +@interface MLRNFillLayerManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNFillLayerManager.m b/ios/MLRN/MLRNFillLayerManager.m similarity index 78% rename from ios/RCTMLN/RCTMLNFillLayerManager.m rename to ios/MLRN/MLRNFillLayerManager.m index 268f80312..6c9db6972 100644 --- a/ios/RCTMLN/RCTMLNFillLayerManager.m +++ b/ios/MLRN/MLRNFillLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNFillLayerManager.m -// RCTMLN +// MLRNFillLayerManager.m +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNFillLayerManager.h" -#import "RCTMLNFillLayer.h" +#import "MLRNFillLayerManager.h" +#import "MLRNFillLayer.h" -@implementation RCTMLNFillLayerManager +@implementation MLRNFillLayerManager RCT_EXPORT_MODULE(); @@ -29,7 +29,7 @@ @implementation RCTMLNFillLayerManager - (UIView*)view { - RCTMLNFillLayer *layer = [RCTMLNFillLayer new]; + MLRNFillLayer *layer = [MLRNFillLayer new]; layer.bridge = self.bridge; return layer; } diff --git a/ios/MLRN/MLRNHeatmapLayer.h b/ios/MLRN/MLRNHeatmapLayer.h new file mode 100644 index 000000000..e7e3a4a66 --- /dev/null +++ b/ios/MLRN/MLRNHeatmapLayer.h @@ -0,0 +1,12 @@ +// +// MLRNHeatmapLayer.h +// MLRN +// +// Created by Dheeraj Yalamanchili on 6/8/19. +// + +#import "MLRNVectorLayer.h" + +@interface MLRNHeatmapLayer : MLRNVectorLayer + +@end diff --git a/ios/RCTMLN/RCTMLNHeatmapLayer.m b/ios/MLRN/MLRNHeatmapLayer.m similarity index 74% rename from ios/RCTMLN/RCTMLNHeatmapLayer.m rename to ios/MLRN/MLRNHeatmapLayer.m index 1b142c674..0d19d8969 100644 --- a/ios/RCTMLN/RCTMLNHeatmapLayer.m +++ b/ios/MLRN/MLRNHeatmapLayer.m @@ -1,13 +1,13 @@ // -// RCTMLNHeatmapLayer.m -// RCTMLN +// MLRNHeatmapLayer.m +// MLRN // // Created by Dheeraj Yalamanchili on 6/8/2019 -#import "RCTMLNHeatmapLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNHeatmapLayer.h" +#import "MLRNStyle.h" -@implementation RCTMLNHeatmapLayer +@implementation MLRNHeatmapLayer - (MLNHeatmapStyleLayer*)makeLayer:(MLNStyle*)style { @@ -20,7 +20,7 @@ - (MLNHeatmapStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style heatmapLayer:(MLNHeatmapStyleLayer *)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; diff --git a/ios/MLRN/MLRNHeatmapLayerManager.h b/ios/MLRN/MLRNHeatmapLayerManager.h new file mode 100644 index 000000000..1d77664cf --- /dev/null +++ b/ios/MLRN/MLRNHeatmapLayerManager.h @@ -0,0 +1,12 @@ +// +// MLRNHeatmapLayerManager.h +// MLRN +// +// Created by Dheeraj Yalamanchili on 6/8/19. +// + +#import "ViewManager.h" + +@interface MLRNHeatmapLayerManager : ViewManager + +@end diff --git a/ios/RCTMLN/RCTMLNHeatmapLayerManager.m b/ios/MLRN/MLRNHeatmapLayerManager.m similarity index 76% rename from ios/RCTMLN/RCTMLNHeatmapLayerManager.m rename to ios/MLRN/MLRNHeatmapLayerManager.m index 974eb5a64..a3d099409 100644 --- a/ios/RCTMLN/RCTMLNHeatmapLayerManager.m +++ b/ios/MLRN/MLRNHeatmapLayerManager.m @@ -1,14 +1,14 @@ // -// RCTMLNHeatmapLayerManager.m -// RCTMLN +// MLRNHeatmapLayerManager.m +// MLRN // // Created by Dheeraj Yalamanchili on 6/8/19. // -#import "RCTMLNHeatmapLayerManager.h" -#import "RCTMLNHeatmapLayer.h" +#import "MLRNHeatmapLayerManager.h" +#import "MLRNHeatmapLayer.h" -@implementation RCTMLNHeatmapLayerManager +@implementation MLRNHeatmapLayerManager RCT_EXPORT_MODULE() @@ -30,7 +30,7 @@ @implementation RCTMLNHeatmapLayerManager - (UIView*)view { - RCTMLNHeatmapLayer *layer = [RCTMLNHeatmapLayer new]; + MLRNHeatmapLayer *layer = [MLRNHeatmapLayer new]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNImageQueue.h b/ios/MLRN/MLRNImageQueue.h similarity index 84% rename from ios/RCTMLN/RCTMLNImageQueue.h rename to ios/MLRN/MLRNImageQueue.h index 85526bc84..cf4430313 100644 --- a/ios/RCTMLN/RCTMLNImageQueue.h +++ b/ios/MLRN/MLRNImageQueue.h @@ -1,6 +1,6 @@ // -// RCTMLNImageQueue.h -// RCTMLN +// MLRNImageQueue.h +// MLRN // // Created by Nick Italiano on 10/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,7 +9,7 @@ #import #import -@interface RCTMLNImageQueue : NSObject +@interface MLRNImageQueue : NSObject + (instancetype)sharedInstance; diff --git a/ios/RCTMLN/RCTMLNImageQueue.m b/ios/MLRN/MLRNImageQueue.m similarity index 68% rename from ios/RCTMLN/RCTMLNImageQueue.m rename to ios/MLRN/MLRNImageQueue.m index 503c6b9c0..12238e87d 100644 --- a/ios/RCTMLN/RCTMLNImageQueue.m +++ b/ios/MLRN/MLRNImageQueue.m @@ -1,16 +1,16 @@ // -// RCTMLNImageQueue.m -// RCTMLN +// MLRNImageQueue.m +// MLRN // // Created by Nick Italiano on 10/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNImageQueue.h" -#import "RCTMLNImageQueueOperation.h" -#import "RCTMLNUtils.h" +#import "MLRNImageQueue.h" +#import "MLRNImageQueueOperation.h" +#import "MLRNUtils.h" -@implementation RCTMLNImageQueue +@implementation MLRNImageQueue { NSOperationQueue *imageQueue; } @@ -19,7 +19,7 @@ - (id)init { if (self = [super init]) { imageQueue = [[NSOperationQueue alloc] init]; - imageQueue.name = @"org.maplibre.rctmln.DownloadImageQueue"; + imageQueue.name = @"org.maplibre.mlrn.DownloadImageQueue"; } return self; } @@ -31,10 +31,10 @@ - (void)dealloc + (instancetype)sharedInstance { - static RCTMLNImageQueue *sharedInstance = nil; + static MLRNImageQueue *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - sharedInstance = [[RCTMLNImageQueue alloc] init]; + sharedInstance = [[MLRNImageQueue alloc] init]; }); return sharedInstance; } @@ -46,7 +46,7 @@ - (void)cancelAllOperations - (void)addImage:(NSString *)imageURL scale:(double)scale bridge:(RCTBridge *)bridge completionHandler:(RCTImageLoaderCompletionBlock)handler { - RCTMLNImageQueueOperation *operation = [[RCTMLNImageQueueOperation alloc] init]; + MLRNImageQueueOperation *operation = [[MLRNImageQueueOperation alloc] init]; operation.bridge = bridge; operation.urlRequest = [RCTConvert NSURLRequest:imageURL]; operation.completionHandler = handler; diff --git a/ios/RCTMLN/RCTMLNImageQueueOperation.h b/ios/MLRN/MLRNImageQueueOperation.h similarity index 78% rename from ios/RCTMLN/RCTMLNImageQueueOperation.h rename to ios/MLRN/MLRNImageQueueOperation.h index 42334ac70..1dbcbead4 100644 --- a/ios/RCTMLN/RCTMLNImageQueueOperation.h +++ b/ios/MLRN/MLRNImageQueueOperation.h @@ -1,13 +1,13 @@ // -// RCTMLNImageQueueOperation.h -// RCTMLN +// MLRNImageQueueOperation.h +// MLRN // // Created by Nick Italiano on 2/28/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // #import -@interface RCTMLNImageQueueOperation : NSBlockOperation +@interface MLRNImageQueueOperation : NSBlockOperation @property (nonatomic, weak) RCTBridge *bridge; @property (nonatomic, copy) RCTImageLoaderCompletionBlock completionHandler; diff --git a/ios/RCTMLN/RCTMLNImageQueueOperation.m b/ios/MLRN/MLRNImageQueueOperation.m similarity index 79% rename from ios/RCTMLN/RCTMLNImageQueueOperation.m rename to ios/MLRN/MLRNImageQueueOperation.m index c576f657d..90f505b50 100644 --- a/ios/RCTMLN/RCTMLNImageQueueOperation.m +++ b/ios/MLRN/MLRNImageQueueOperation.m @@ -1,15 +1,15 @@ // -// RCTMLNImageQueueOperation.m -// RCTMLN +// MLRNImageQueueOperation.m +// MLRN // // Created by Nick Italiano on 2/28/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // -#import "RCTMLNImageQueueOperation.h" +#import "MLRNImageQueueOperation.h" -typedef NS_ENUM(NSInteger, RCTMLNImageQueueOperationState) { +typedef NS_ENUM(NSInteger, MLRNImageQueueOperationState) { IOState_Initial, IOState_CancelledDoNotExecute, IOState_Executing, // cancellationBlock is set @@ -20,11 +20,11 @@ typedef NS_ENUM(NSInteger, RCTMLNImageQueueOperationState) { IOState_Filter_All, }; -@interface RCTMLNImageQueueOperation() -@property (nonatomic) RCTMLNImageQueueOperationState state; +@interface MLRNImageQueueOperation() +@property (nonatomic) MLRNImageQueueOperationState state; @end -@implementation RCTMLNImageQueueOperation +@implementation MLRNImageQueueOperation { RCTImageLoaderCancellationBlock _cancellationBlock; BOOL _cancelled; @@ -67,9 +67,9 @@ -(void)callCancellationBlock { } } -- (RCTMLNImageQueueOperationState)setState:(RCTMLNImageQueueOperationState)newState only:(RCTMLNImageQueueOperationState)only except:(RCTMLNImageQueueOperationState) except +- (MLRNImageQueueOperationState)setState:(MLRNImageQueueOperationState)newState only:(MLRNImageQueueOperationState)only except:(MLRNImageQueueOperationState) except { - RCTMLNImageQueueOperationState prevState = IOState_Filter_None; + MLRNImageQueueOperationState prevState = IOState_Filter_None; [self willChangeValueForKey:@"isExecuting"]; [self willChangeValueForKey:@"isFinished"]; [self willChangeValueForKey:@"isCancelled"]; @@ -93,12 +93,12 @@ - (RCTMLNImageQueueOperationState)setState:(RCTMLNImageQueueOperationState)newSt return prevState; } -- (RCTMLNImageQueueOperationState)setState:(RCTMLNImageQueueOperationState)newState only:(RCTMLNImageQueueOperationState)only +- (MLRNImageQueueOperationState)setState:(MLRNImageQueueOperationState)newState only:(MLRNImageQueueOperationState)only { return [self setState: newState only:only except:IOState_Filter_None]; } -- (RCTMLNImageQueueOperationState)setState:(RCTMLNImageQueueOperationState)newState except:(RCTMLNImageQueueOperationState)except +- (MLRNImageQueueOperationState)setState:(MLRNImageQueueOperationState)newState except:(MLRNImageQueueOperationState)except { return [self setState: newState only:IOState_Filter_All except:except]; } @@ -108,7 +108,7 @@ - (void)start if (self.state == IOState_CancelledDoNotExecute) { return; } - __weak RCTMLNImageQueueOperation *weakSelf = self; + __weak MLRNImageQueueOperation *weakSelf = self; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [weakSelf setCancellationBlock: [[weakSelf.bridge moduleForName:@"ImageLoader" lazilyLoadIfNecessary:YES] loadImageWithURLRequest:weakSelf.urlRequest diff --git a/ios/RCTMLN/RCTMLNImageSource.h b/ios/MLRN/MLRNImageSource.h similarity index 68% rename from ios/RCTMLN/RCTMLNImageSource.h rename to ios/MLRN/MLRNImageSource.h index dbf19e8cf..6173b0c69 100644 --- a/ios/RCTMLN/RCTMLNImageSource.h +++ b/ios/MLRN/MLRNImageSource.h @@ -1,14 +1,14 @@ // -// RCTMLNImageSource.h -// RCTMLN +// MLRNImageSource.h +// MLRN // // Created by Nick Italiano on 11/29/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNSource.h" +#import "MLRNSource.h" -@interface RCTMLNImageSource : RCTMLNSource +@interface MLRNImageSource : MLRNSource @property (nonatomic, copy) NSString *url; @property (nonatomic, copy) NSArray *> *coordinates; diff --git a/ios/RCTMLN/RCTMLNImageSource.m b/ios/MLRN/MLRNImageSource.m similarity index 94% rename from ios/RCTMLN/RCTMLNImageSource.m rename to ios/MLRN/MLRNImageSource.m index db0093049..064681af2 100644 --- a/ios/RCTMLN/RCTMLNImageSource.m +++ b/ios/MLRN/MLRNImageSource.m @@ -1,15 +1,15 @@ // -// RCTMLNImageSource.m -// RCTMLN +// MLRNImageSource.m +// MLRN // // Created by Nick Italiano on 11/29/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNImageSource.h" +#import "MLRNImageSource.h" @import MapLibre; -@implementation RCTMLNImageSource +@implementation MLRNImageSource - (void)setUrl:(NSString *)url { diff --git a/ios/RCTMLN/RCTMLNImageSourceManager.h b/ios/MLRN/MLRNImageSourceManager.h similarity index 60% rename from ios/RCTMLN/RCTMLNImageSourceManager.h rename to ios/MLRN/MLRNImageSourceManager.h index 1f2ee9ed9..dbd42675d 100644 --- a/ios/RCTMLN/RCTMLNImageSourceManager.h +++ b/ios/MLRN/MLRNImageSourceManager.h @@ -1,6 +1,6 @@ // -// RCTMLNImageSourceManager.h -// RCTMLN +// MLRNImageSourceManager.h +// MLRN // // Created by Nick Italiano on 11/29/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNImageSourceManager : ViewManager +@interface MLRNImageSourceManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNImageSourceManager.m b/ios/MLRN/MLRNImageSourceManager.m similarity index 60% rename from ios/RCTMLN/RCTMLNImageSourceManager.m rename to ios/MLRN/MLRNImageSourceManager.m index 330981071..f76c8744a 100644 --- a/ios/RCTMLN/RCTMLNImageSourceManager.m +++ b/ios/MLRN/MLRNImageSourceManager.m @@ -1,15 +1,15 @@ // -// RCTMLNImageSourceManager.m -// RCTMLN +// MLRNImageSourceManager.m +// MLRN // // Created by Nick Italiano on 11/29/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNImageSourceManager.h" -#import "RCTMLNImageSource.h" +#import "MLRNImageSourceManager.h" +#import "MLRNImageSource.h" -@implementation RCTMLNImageSourceManager +@implementation MLRNImageSourceManager RCT_EXPORT_MODULE() @@ -19,7 +19,7 @@ @implementation RCTMLNImageSourceManager - (UIView*)view { - return [RCTMLNImageSource new]; + return [MLRNImageSource new]; } @end diff --git a/ios/RCTMLN/RCTMLNImages.h b/ios/MLRN/MLRNImages.h similarity index 83% rename from ios/RCTMLN/RCTMLNImages.h rename to ios/MLRN/MLRNImages.h index c4af10837..afc221335 100644 --- a/ios/RCTMLN/RCTMLNImages.h +++ b/ios/MLRN/MLRNImages.h @@ -4,13 +4,13 @@ @import MapLibre; -@class RCTMLNMapView; +@class MLRNMapView; -@interface RCTMLNImages : UIView +@interface MLRNImages : UIView @property (nonatomic, weak) RCTBridge *bridge; -@property (nonatomic, strong) RCTMLNMapView *map; +@property (nonatomic, strong) MLRNMapView *map; @property (nonatomic, strong) NSDictionary *images; @property (nonatomic, strong) NSArray *nativeImages; diff --git a/ios/RCTMLN/RCTMLNImages.m b/ios/MLRN/MLRNImages.m similarity index 86% rename from ios/RCTMLN/RCTMLNImages.m rename to ios/MLRN/MLRNImages.m index 466d159cf..bebcedb7c 100644 --- a/ios/RCTMLN/RCTMLNImages.m +++ b/ios/MLRN/MLRNImages.m @@ -1,12 +1,12 @@ -#import "RCTMLNImages.h" +#import "MLRNImages.h" #import -#import "RCTMLNMapView.h" -#import "RCTMLNUtils.h" -#import "RCTMLNEvent.h" -#import "RCTMLNEventTypes.h" +#import "MLRNMapView.h" +#import "MLRNUtils.h" +#import "MLRNEvent.h" +#import "MLRNEventTypes.h" -@implementation RCTMLNImages : UIView +@implementation MLRNImages : UIView static UIImage * _placeHolderImage; @@ -61,7 +61,7 @@ -(BOOL)addMissingImageToStyle:(NSString *)imageName { - (void) sendImageMissingEvent:(NSString *)imageName { NSDictionary *payload = @{ @"imageKey": imageName }; - RCTMLNEvent *event = [RCTMLNEvent makeEvent:RCT_MAPBOX_IMAGES_MISSING_IMAGE withPayload:payload]; + MLRNEvent *event = [MLRNEvent makeEvent:RCT_MAPBOX_IMAGES_MISSING_IMAGE withPayload:payload]; if (_onImageMissing) { _onImageMissing([event toJSON]); } @@ -72,7 +72,7 @@ - (void)_addNativeImages:(NSArray*)nativeImages if (!nativeImages) return; for (NSString *imageName in nativeImages) { - // only add native images if they are not in the style yet (similar to [RCTMLNUtils fetchImages: style:]) + // only add native images if they are not in the style yet (similar to [MLRNUtils fetchImages: style:]) if (![self.map.style imageForName:imageName]) { UIImage *image = [UIImage imageNamed:imageName]; [self.map.style setImage:image forName:imageName]; @@ -94,14 +94,14 @@ - (void)_addRemoteImages:(NSDictionary*)remoteImages // See also: https://github.com/mapbox/mapbox-gl-native/pull/14253#issuecomment-478827792 for (NSString *imageName in remoteImages.allKeys) { if (![self.map.style imageForName:imageName]) { - [self.map.style setImage:[RCTMLNImages placeholderImage] forName:imageName]; + [self.map.style setImage:[MLRNImages placeholderImage] forName:imageName]; [missingImages setValue:_images[imageName] forKey:imageName]; } } if (missingImages.count > 0) { // forceUpdate to ensure the placeholder images are updated - [RCTMLNUtils fetchImages:_bridge style:self.map.style objects:_images forceUpdate:true callback:^{ }]; + [MLRNUtils fetchImages:_bridge style:self.map.style objects:_images forceUpdate:true callback:^{ }]; } } diff --git a/ios/MLRN/MLRNImagesManager.h b/ios/MLRN/MLRNImagesManager.h new file mode 100644 index 000000000..58082e325 --- /dev/null +++ b/ios/MLRN/MLRNImagesManager.h @@ -0,0 +1,5 @@ +#import "ViewManager.h" + +@interface MLRNImagesManager : ViewManager + +@end diff --git a/ios/RCTMLN/RCTMLNImagesManager.m b/ios/MLRN/MLRNImagesManager.m similarity index 69% rename from ios/RCTMLN/RCTMLNImagesManager.m rename to ios/MLRN/MLRNImagesManager.m index 3bcd37b58..ca85b6c26 100644 --- a/ios/RCTMLN/RCTMLNImagesManager.m +++ b/ios/MLRN/MLRNImagesManager.m @@ -1,7 +1,7 @@ -#import "RCTMLNImagesManager.h" -#import "RCTMLNImages.h" +#import "MLRNImagesManager.h" +#import "MLRNImages.h" -@implementation RCTMLNImagesManager +@implementation MLRNImagesManager RCT_EXPORT_MODULE() @@ -13,7 +13,7 @@ @implementation RCTMLNImagesManager - (UIView*)view { - RCTMLNImages *images = [RCTMLNImages new]; + MLRNImages *images = [MLRNImages new]; images.bridge = self.bridge; return images; } diff --git a/ios/RCTMLN/RCTMLNLayer.h b/ios/MLRN/MLRNLayer.h similarity index 86% rename from ios/RCTMLN/RCTMLNLayer.h rename to ios/MLRN/MLRNLayer.h index 14f7ac2ac..e78619e5a 100644 --- a/ios/RCTMLN/RCTMLNLayer.h +++ b/ios/MLRN/MLRNLayer.h @@ -1,6 +1,6 @@ // // BaseLayer.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -10,17 +10,17 @@ #import -@class RCTMLNMapView; +@class MLRNMapView; @import MapLibre; -@interface RCTMLNLayer : UIView +@interface MLRNLayer : UIView @property (nonatomic, weak, nullable) RCTBridge* bridge; @property (nonatomic, strong, nullable) MLNStyleLayer *styleLayer; @property (nonatomic, strong, nullable) MLNStyle *style; -@property (nonatomic, weak, nullable) RCTMLNMapView* map; +@property (nonatomic, weak, nullable) MLRNMapView* map; @property (nonatomic, strong, nullable) NSDictionary *reactStyle; @property (nonatomic, strong, nullable) NSArray *filter; @@ -34,7 +34,7 @@ @property (nonatomic, copy, nullable) NSNumber *maxZoomLevel; @property (nonatomic, copy, nullable) NSNumber *minZoomLevel; -- (void)addToMap:(nonnull RCTMLNMapView*)map style:(nonnull MLNStyle*)style; +- (void)addToMap:(nonnull MLRNMapView*)map style:(nonnull MLNStyle*)style; - (void)addedToMap; - (void)removeFromMap:(nonnull MLNStyle*)style; - (nullable T)makeLayer:(nonnull MLNStyle*)style; diff --git a/ios/RCTMLN/RCTMLNLayer.m b/ios/MLRN/MLRNLayer.m similarity index 94% rename from ios/RCTMLN/RCTMLNLayer.m rename to ios/MLRN/MLRNLayer.m index f41369bf9..882388e8c 100644 --- a/ios/RCTMLN/RCTMLNLayer.m +++ b/ios/MLRN/MLRNLayer.m @@ -1,18 +1,18 @@ // // BaseLayer.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLayer.h" -#import "RCTMLNSource.h" -#import "RCTMLNStyleValue.h" -#import "RCTMLNUtils.h" -#import "RCTMLNMapView.h" +#import "MLRNLayer.h" +#import "MLRNSource.h" +#import "MLRNStyleValue.h" +#import "MLRNUtils.h" +#import "MLRNMapView.h" -@implementation RCTMLNLayer +@implementation MLRNLayer - (void)setMinZoomLevel:(NSNumber*)minZoomLevel { @@ -71,7 +71,7 @@ - (void)setLayerIndex:(NSNumber *)layerIndex } } -- (void)setMap:(RCTMLNMapView *)map { +- (void)setMap:(MLRNMapView *)map { if (map == nil) { [self removeFromMap:_map.style]; _map = nil; @@ -92,7 +92,7 @@ -(void)setReactStyle:(NSDictionary *)reactStyle } } -- (void)addToMap:(RCTMLNMapView*) map style:(MLNStyle *)style +- (void)addToMap:(MLRNMapView*) map style:(MLNStyle *)style { if (style == nil) { return; @@ -160,7 +160,7 @@ - (void)addedToMap // override if you want } -- (void)insertLayer: (RCTMLNMapView*) map +- (void)insertLayer: (MLRNMapView*) map { if ([_style layerWithIdentifier:_id] != nil) { return; // prevent layer from being added twice diff --git a/ios/RCTMLN/RCTMLNLight.h b/ios/MLRN/MLRNLight.h similarity index 80% rename from ios/RCTMLN/RCTMLNLight.h rename to ios/MLRN/MLRNLight.h index 809d174b1..51c4c43da 100644 --- a/ios/RCTMLN/RCTMLNLight.h +++ b/ios/MLRN/MLRNLight.h @@ -1,6 +1,6 @@ // -// RCTMLNLight.h -// RCTMLN +// MLRNLight.h +// MLRN // // Created by Nick Italiano on 9/26/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,7 +9,7 @@ #import @import MapLibre; -@interface RCTMLNLight : UIView +@interface MLRNLight : UIView @property (nonatomic, strong) MLNMapView *map; @property (nonatomic, strong) NSDictionary *reactStyle; diff --git a/ios/RCTMLN/RCTMLNLight.m b/ios/MLRN/MLRNLight.m similarity index 79% rename from ios/RCTMLN/RCTMLNLight.m rename to ios/MLRN/MLRNLight.m index 1cd78d2c4..23791a9d1 100644 --- a/ios/RCTMLN/RCTMLNLight.m +++ b/ios/MLRN/MLRNLight.m @@ -1,15 +1,15 @@ // -// RCTMLNLight.m -// RCTMLN +// MLRNLight.m +// MLRN // // Created by Nick Italiano on 9/26/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLight.h" -#import "RCTMLNStyle.h" +#import "MLRNLight.h" +#import "MLRNStyle.h" -@implementation RCTMLNLight +@implementation MLRNLight { MLNLight *internalLight; } @@ -36,7 +36,7 @@ - (BOOL)isAddedToMap { - (void)addStyles { MLNLight *light = [[MLNLight alloc] init]; - RCTMLNStyle *style = [[RCTMLNStyle alloc] init]; + MLRNStyle *style = [[MLRNStyle alloc] init]; [style lightLayer:light withReactStyle:_reactStyle isValid:^{ return [self isAddedToMap]; }]; diff --git a/ios/RCTMLN/RCTMLNLightManager.h b/ios/MLRN/MLRNLightManager.h similarity index 63% rename from ios/RCTMLN/RCTMLNLightManager.h rename to ios/MLRN/MLRNLightManager.h index 6f0c3d092..05ae2b1e8 100644 --- a/ios/RCTMLN/RCTMLNLightManager.h +++ b/ios/MLRN/MLRNLightManager.h @@ -1,6 +1,6 @@ // -// RCTMLNLightManager.h -// RCTMLN +// MLRNLightManager.h +// MLRN // // Created by Nick Italiano on 9/26/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNLightManager : ViewManager +@interface MLRNLightManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNLightManager.m b/ios/MLRN/MLRNLightManager.m similarity index 57% rename from ios/RCTMLN/RCTMLNLightManager.m rename to ios/MLRN/MLRNLightManager.m index fcab1c816..5ee194cc4 100644 --- a/ios/RCTMLN/RCTMLNLightManager.m +++ b/ios/MLRN/MLRNLightManager.m @@ -1,15 +1,15 @@ // -// RCTMLNLightManager.m -// RCTMLN +// MLRNLightManager.m +// MLRN // // Created by Nick Italiano on 9/26/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLightManager.h" -#import "RCTMLNLight.h" +#import "MLRNLightManager.h" +#import "MLRNLight.h" -@implementation RCTMLNLightManager +@implementation MLRNLightManager RCT_EXPORT_MODULE() @@ -17,7 +17,7 @@ @implementation RCTMLNLightManager - (UIView*)view { - return [RCTMLNLight new]; + return [MLRNLight new]; } @end diff --git a/ios/RCTMLN/RCTMLNLineLayer.h b/ios/MLRN/MLRNLineLayer.h similarity index 54% rename from ios/RCTMLN/RCTMLNLineLayer.h rename to ios/MLRN/MLRNLineLayer.h index 2ae9f04a4..489c1e4c7 100644 --- a/ios/RCTMLN/RCTMLNLineLayer.h +++ b/ios/MLRN/MLRNLineLayer.h @@ -1,14 +1,14 @@ // -// RCTMLNLineLayer.h -// RCTMLN +// MLRNLineLayer.h +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNVectorLayer.h" +#import "MLRNVectorLayer.h" @import MapLibre; -@interface RCTMLNLineLayer : RCTMLNVectorLayer +@interface MLRNLineLayer : MLRNVectorLayer @end diff --git a/ios/RCTMLN/RCTMLNLineLayer.m b/ios/MLRN/MLRNLineLayer.m similarity index 77% rename from ios/RCTMLN/RCTMLNLineLayer.m rename to ios/MLRN/MLRNLineLayer.m index 75922c12a..004a6b9b2 100644 --- a/ios/RCTMLN/RCTMLNLineLayer.m +++ b/ios/MLRN/MLRNLineLayer.m @@ -1,16 +1,16 @@ // -// RCTMLNLineLayer.m -// RCTMLN +// MLRNLineLayer.m +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLineLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNLineLayer.h" +#import "MLRNStyle.h" #import -@implementation RCTMLNLineLayer +@implementation MLRNLineLayer - (MLNLineStyleLayer*)makeLayer:(MLNStyle*)style { @@ -23,7 +23,7 @@ - (MLNLineStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style lineLayer:(MLNLineStyleLayer *)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; diff --git a/ios/RCTMLN/RCTMLNSymbolLayerManager.h b/ios/MLRN/MLRNLineLayerManager.h similarity index 59% rename from ios/RCTMLN/RCTMLNSymbolLayerManager.h rename to ios/MLRN/MLRNLineLayerManager.h index 962a05c7a..5d3bd8df4 100644 --- a/ios/RCTMLN/RCTMLNSymbolLayerManager.h +++ b/ios/MLRN/MLRNLineLayerManager.h @@ -1,13 +1,13 @@ // -// RCTMLNSymbolLayerManager.h -// RCTMLN +// MLRNLineLayerManager.h +// MLRN // -// Created by Nick Italiano on 9/19/17. +// Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import "ViewManager.h" -@interface RCTMLNSymbolLayerManager : ViewManager +@interface MLRNLineLayerManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNLineLayerManager.m b/ios/MLRN/MLRNLineLayerManager.m similarity index 79% rename from ios/RCTMLN/RCTMLNLineLayerManager.m rename to ios/MLRN/MLRNLineLayerManager.m index 58e2d4e3c..9f4b84bdf 100644 --- a/ios/RCTMLN/RCTMLNLineLayerManager.m +++ b/ios/MLRN/MLRNLineLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNLineLayerManager.m -// RCTMLN +// MLRNLineLayerManager.m +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLineLayerManager.h" -#import "RCTMLNLineLayer.h" +#import "MLRNLineLayerManager.h" +#import "MLRNLineLayer.h" -@implementation RCTMLNLineLayerManager +@implementation MLRNLineLayerManager RCT_EXPORT_MODULE() @@ -31,7 +31,7 @@ @implementation RCTMLNLineLayerManager - (UIView*)view { - RCTMLNLineLayer *layer = [RCTMLNLineLayer new]; + MLRNLineLayer *layer = [MLRNLineLayer new]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNLocation.h b/ios/MLRN/MLRNLocation.h similarity index 82% rename from ios/RCTMLN/RCTMLNLocation.h rename to ios/MLRN/MLRNLocation.h index ad688194e..d77697d82 100644 --- a/ios/RCTMLN/RCTMLNLocation.h +++ b/ios/MLRN/MLRNLocation.h @@ -1,6 +1,6 @@ // -// RCTMLNLocation.h -// RCTMLN +// MLRNLocation.h +// MLRN // // Created by Nick Italiano on 6/21/18. // Copyright © 2018 Mapbox Inc. All rights reserved. @@ -9,7 +9,7 @@ #import #import -@interface RCTMLNLocation : NSObject +@interface MLRNLocation : NSObject @property (nonatomic, strong) CLLocation *location; @property (nonatomic, strong) CLHeading *heading; diff --git a/ios/RCTMLN/RCTMLNLocation.m b/ios/MLRN/MLRNLocation.m similarity index 90% rename from ios/RCTMLN/RCTMLNLocation.m rename to ios/MLRN/MLRNLocation.m index 00ef70eb1..80a7936ac 100644 --- a/ios/RCTMLN/RCTMLNLocation.m +++ b/ios/MLRN/MLRNLocation.m @@ -1,14 +1,14 @@ // -// RCTMLNLocation.m -// RCTMLN +// MLRNLocation.m +// MLRN // // Created by Nick Italiano on 6/21/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // -#import "RCTMLNLocation.h" +#import "MLRNLocation.h" -@implementation RCTMLNLocation +@implementation MLRNLocation - (NSDictionary *)toJSON { diff --git a/ios/MLRN/MLRNLocationManager.h b/ios/MLRN/MLRNLocationManager.h new file mode 100644 index 000000000..40546f9c4 --- /dev/null +++ b/ios/MLRN/MLRNLocationManager.h @@ -0,0 +1,30 @@ +// +// MLRNLocationManager.h +// MLRN +// +// Created by Nick Italiano on 6/21/18. +// Copyright © 2018 Mapbox Inc. All rights reserved. +// + +#import + +#import "MLRNLocation.h" +#import "MLRNLocationManagerDelegate.h" + +typedef void (^MLRNLocationBlock)(MLRNLocation *location); + +@interface MLRNLocationManager : NSObject + +@property (nonatomic, strong) id delegate; + ++ (id)sharedInstance; + +- (void)start:(CLLocationDistance)minDisplacement; +- (void)stop; +- (void)setMinDisplacement:(CLLocationDistance)minDisplacement; +- (BOOL)isEnabled; +- (MLRNLocation *)getLastKnownLocation; +- (void)addListener:(MLRNLocationBlock)listener; +- (void)removeListener:(MLRNLocationBlock)listener; + +@end diff --git a/ios/RCTMLN/RCTMLNLocationManager.m b/ios/MLRN/MLRNLocationManager.m similarity index 79% rename from ios/RCTMLN/RCTMLNLocationManager.m rename to ios/MLRN/MLRNLocationManager.m index 12a2f331a..1b058fddf 100644 --- a/ios/RCTMLN/RCTMLNLocationManager.m +++ b/ios/MLRN/MLRNLocationManager.m @@ -1,30 +1,30 @@ // -// RCTMLNLocationManager.m -// RCTMLN +// MLRNLocationManager.m +// MLRN // // Created by Nick Italiano on 6/21/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNLocationManager.h" +#import "MLRNLocationManager.h" -@interface RCTMLNLocationManager() +@interface MLRNLocationManager() @end -@implementation RCTMLNLocationManager +@implementation MLRNLocationManager { CLLocationManager *locationManager; CLLocation *lastKnownLocation; CLHeading *lastKnownHeading; CLLocationDistance displacement; - NSMutableArray *listeners; + NSMutableArray *listeners; BOOL isListening; } + (id)sharedInstance { - static RCTMLNLocationManager *manager = nil; + static MLRNLocationManager *manager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ manager = [[self alloc] init]; }); return manager; @@ -92,24 +92,24 @@ - (BOOL)isEnabled return isListening; } -- (RCTMLNLocation *)getLastKnownLocation +- (MLRNLocation *)getLastKnownLocation { CLLocation* newLastLocation = locationManager.location; if (newLastLocation) { lastKnownLocation = newLastLocation; } - RCTMLNLocation *location = [self _convertToMapboxLocation:lastKnownLocation]; + MLRNLocation *location = [self _convertToMapboxLocation:lastKnownLocation]; return location; } -- (void)addListener:(RCTMLNLocationBlock)listener +- (void)addListener:(MLRNLocationBlock)listener { if (![listeners containsObject:listener]) { [listeners addObject:listener]; } } -- (void)removeListener:(RCTMLNLocationBlock)listener +- (void)removeListener:(MLRNLocationBlock)listener { NSUInteger indexOf = [listeners indexOfObject:listener]; @@ -139,7 +139,7 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray - (void)_setupLocationManager { - __weak RCTMLNLocationManager *weakSelf = self; + __weak MLRNLocationManager *weakSelf = self; dispatch_async(dispatch_get_main_queue(), ^{ self->locationManager = [[CLLocationManager alloc] init]; @@ -153,11 +153,11 @@ - (void)_updateDelegate return; } - RCTMLNLocation *userLocation = [self _convertToMapboxLocation:lastKnownLocation]; + MLRNLocation *userLocation = [self _convertToMapboxLocation:lastKnownLocation]; if (listeners.count > 0) { for (int i = 0; i < listeners.count; i++) { - RCTMLNLocationBlock listener = listeners[i]; + MLRNLocationBlock listener = listeners[i]; listener(userLocation); } } @@ -165,13 +165,13 @@ - (void)_updateDelegate [_delegate locationManager:self didUpdateLocation:userLocation]; } -- (RCTMLNLocation *)_convertToMapboxLocation:(CLLocation *)location +- (MLRNLocation *)_convertToMapboxLocation:(CLLocation *)location { if (location == nil) { return nil; } - RCTMLNLocation *userLocation = [[RCTMLNLocation alloc] init]; + MLRNLocation *userLocation = [[MLRNLocation alloc] init]; userLocation.location = location; userLocation.heading = lastKnownHeading; return userLocation; diff --git a/ios/MLRN/MLRNLocationManagerDelegate.h b/ios/MLRN/MLRNLocationManagerDelegate.h new file mode 100644 index 000000000..f0f3bcd23 --- /dev/null +++ b/ios/MLRN/MLRNLocationManagerDelegate.h @@ -0,0 +1,20 @@ +// +// MLRNLocationManagerDelegate.h +// MLRN +// +// Created by Nick Italiano on 6/21/18. +// Copyright © 2018 Mapbox Inc. All rights reserved. +// + +#import + +#import "MLRNLocation.h" + +@class MLRNLocationManager; + +@protocol MLRNLocationManagerDelegate + +- (void)locationManager:(MLRNLocationManager *)locationManager didUpdateLocation:(MLRNLocation *)location; + +@end + diff --git a/ios/RCTMLN/RCTMLNLocationModule.h b/ios/MLRN/MLRNLocationModule.h similarity index 66% rename from ios/RCTMLN/RCTMLNLocationModule.h rename to ios/MLRN/MLRNLocationModule.h index 80a6f2130..ba3e7bfbf 100644 --- a/ios/RCTMLN/RCTMLNLocationModule.h +++ b/ios/MLRN/MLRNLocationModule.h @@ -1,6 +1,6 @@ // -// RCTMLNLocationManager.h -// RCTMLN +// MLRNLocationManager.h +// MLRN // // Created by Nick Italiano on 6/21/18. // Copyright © 2018 Mapbox Inc. All rights reserved. @@ -10,6 +10,6 @@ #import #import -@interface RCTMLNLocationModule : RCTEventEmitter +@interface MLRNLocationModule : RCTEventEmitter @end diff --git a/ios/RCTMLN/RCTMLNLocationModule.m b/ios/MLRN/MLRNLocationModule.m similarity index 68% rename from ios/RCTMLN/RCTMLNLocationModule.m rename to ios/MLRN/MLRNLocationModule.m index 0b83a19cc..89248ec87 100644 --- a/ios/RCTMLN/RCTMLNLocationModule.m +++ b/ios/MLRN/MLRNLocationModule.m @@ -1,6 +1,6 @@ // -// RCTMLNLocationManager.m -// RCTMLN +// MLRNLocationManager.m +// MLRN // // Created by Nick Italiano on 6/21/18. // Copyright © 2018 Mapbox Inc. All rights reserved. @@ -8,18 +8,18 @@ #import -#import "RCTMLNLocation.h" -#import "RCTMLNLocationModule.h" -#import "RCTMLNLocationManager.h" -#import "RCTMLNLocationManagerDelegate.h" -#import "RCTMLNEventTypes.h" +#import "MLRNLocation.h" +#import "MLRNLocationModule.h" +#import "MLRNLocationManager.h" +#import "MLRNLocationManagerDelegate.h" +#import "MLRNEventTypes.h" -@interface RCTMLNLocationModule() +@interface MLRNLocationModule() @end -@implementation RCTMLNLocationModule +@implementation MLRNLocationModule { - RCTMLNLocationManager *locationManager; + MLRNLocationManager *locationManager; BOOL hasListeners; } @@ -33,7 +33,7 @@ + (BOOL)requiresMainQueueSetup - (instancetype)init { if (self = [super init]) { - locationManager = [[RCTMLNLocationManager alloc] init]; + locationManager = [[MLRNLocationManager alloc] init]; locationManager.delegate = self; } return self; @@ -78,11 +78,11 @@ - (void)stopObserving RCT_EXPORT_METHOD(getLastKnownLocation:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { - RCTMLNLocation *lastKnownLocation = [locationManager getLastKnownLocation]; + MLRNLocation *lastKnownLocation = [locationManager getLastKnownLocation]; resolve(lastKnownLocation); } -- (void)locationManager:(RCTMLNLocationManager *)locationManager didUpdateLocation:(RCTMLNLocation *)location +- (void)locationManager:(MLRNLocationManager *)locationManager didUpdateLocation:(MLRNLocation *)location { if (!hasListeners) { return; diff --git a/ios/RCTMLN/RCTMLNLogging.h b/ios/MLRN/MLRNLogging.h similarity index 64% rename from ios/RCTMLN/RCTMLNLogging.h rename to ios/MLRN/MLRNLogging.h index 29c483a4a..142854061 100644 --- a/ios/RCTMLN/RCTMLNLogging.h +++ b/ios/MLRN/MLRNLogging.h @@ -1,5 +1,5 @@ -#ifndef RCTMLNLogging_h -#define RCTMLNLogging_h +#ifndef MLRNLogging_h +#define MLRNLogging_h #import #import @@ -7,7 +7,7 @@ @class MLNLoggingConfiguration; -@interface RCTMLNLogging : RCTEventEmitter +@interface MLRNLogging : RCTEventEmitter @property (nonatomic, nonnull) MLNLoggingConfiguration* loggingConfiguration; @@ -15,4 +15,4 @@ @end -#endif /* RCTMLNLogging_h */ +#endif /* MLRNLogging_h */ diff --git a/ios/RCTMLN/RCTMLNLogging.m b/ios/MLRN/MLRNLogging.m similarity index 96% rename from ios/RCTMLN/RCTMLNLogging.m rename to ios/MLRN/MLRNLogging.m index 6e49b9d9e..d98e4790a 100644 --- a/ios/RCTMLN/RCTMLNLogging.m +++ b/ios/MLRN/MLRNLogging.m @@ -1,15 +1,15 @@ -#import "RCTMLNLogging.h" +#import "MLRNLogging.h" @import MapLibre; -@interface RCTMLNLogging() +@interface MLRNLogging() @property (nonatomic) BOOL hasListeners; @end -@implementation RCTMLNLogging +@implementation MLRNLogging + (id)allocWithZone:(NSZone *)zone { - static RCTMLNLogging *sharedInstance = nil; + static MLRNLogging *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedInstance = [super allocWithZone:zone]; diff --git a/ios/MLRN/MLRNMapTouchEvent.h b/ios/MLRN/MLRNMapTouchEvent.h new file mode 100644 index 000000000..8da3b1f88 --- /dev/null +++ b/ios/MLRN/MLRNMapTouchEvent.h @@ -0,0 +1,25 @@ +// +// MLRNTouchEvent.h +// MLRN +// +// Created by Nick Italiano on 8/25/17. +// Copyright © 2017 Mapbox Inc. All rights reserved. +// + +#import +#import "MLRNEvent.h" +#import "MLRNPointAnnotation.h" +@import MapLibre; + +@interface MLRNMapTouchEvent : MLRNEvent + +@property (nonatomic, copy) NSString *id; +@property (nonatomic, assign) CLLocationCoordinate2D coordinate; +@property (nonatomic, assign) CGPoint screenPoint; + ++ (MLRNMapTouchEvent*)makeTapEvent:(MLNMapView*)mapView withPoint:(CGPoint)point; ++ (MLRNMapTouchEvent*)makeLongPressEvent:(MLNMapView*)mapView withPoint:(CGPoint)point; ++ (MLRNMapTouchEvent *)makeAnnotationTapEvent:(MLRNPointAnnotation *)pointAnnotation; ++ (MLRNMapTouchEvent *)makeAnnotationTapEventOnDrag:(MLRNPointAnnotation *)pointAnnotation; + +@end diff --git a/ios/RCTMLN/RCTMLNMapTouchEvent.m b/ios/MLRN/MLRNMapTouchEvent.m similarity index 62% rename from ios/RCTMLN/RCTMLNMapTouchEvent.m rename to ios/MLRN/MLRNMapTouchEvent.m index e3c57b676..5dc59c386 100644 --- a/ios/RCTMLN/RCTMLNMapTouchEvent.m +++ b/ios/MLRN/MLRNMapTouchEvent.m @@ -1,17 +1,17 @@ // -// RCTMLNTouchEvent.m -// RCTMLN +// MLRNTouchEvent.m +// MLRN // // Created by Nick Italiano on 8/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNMapTouchEvent.h" -#import "RCTMLNEventTypes.h" -#import "RCTMLNPointAnnotation.h" +#import "MLRNMapTouchEvent.h" +#import "MLRNEventTypes.h" +#import "MLRNPointAnnotation.h" @import MapLibre; -@implementation RCTMLNMapTouchEvent +@implementation MLRNMapTouchEvent - (NSDictionary*)payload { @@ -32,19 +32,19 @@ - (NSDictionary*)payload return [feature geoJSONDictionary]; } -+ (RCTMLNMapTouchEvent*)makeTapEvent:(MLNMapView*)mapView withPoint:(CGPoint)point ++ (MLRNMapTouchEvent*)makeTapEvent:(MLNMapView*)mapView withPoint:(CGPoint)point { - return [RCTMLNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_TAP]; + return [MLRNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_TAP]; } -+ (RCTMLNMapTouchEvent*)makeLongPressEvent:(MLNMapView*)mapView withPoint:(CGPoint)point ++ (MLRNMapTouchEvent*)makeLongPressEvent:(MLNMapView*)mapView withPoint:(CGPoint)point { - return [RCTMLNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_LONGPRESS]; + return [MLRNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_LONGPRESS]; } -+ (RCTMLNMapTouchEvent *)makeAnnotationTapEvent:(RCTMLNPointAnnotation *)pointAnnotation ++ (MLRNMapTouchEvent *)makeAnnotationTapEvent:(MLRNPointAnnotation *)pointAnnotation { - RCTMLNMapTouchEvent *event = [[RCTMLNMapTouchEvent alloc] init]; + MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init]; event.type = RCT_MAPBOX_ANNOTATION_TAP; event.id = pointAnnotation.id; event.coordinate = pointAnnotation.coordinate; @@ -52,9 +52,9 @@ + (RCTMLNMapTouchEvent *)makeAnnotationTapEvent:(RCTMLNPointAnnotation *)pointAn return event; } -+ (RCTMLNMapTouchEvent *)makeAnnotationTapEventOnDrag:(RCTMLNPointAnnotation *)pointAnnotation ++ (MLRNMapTouchEvent *)makeAnnotationTapEventOnDrag:(MLRNPointAnnotation *)pointAnnotation { - RCTMLNMapTouchEvent *event = [[RCTMLNMapTouchEvent alloc] init]; + MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init]; event.type = RCT_MAPBOX_ANNOTATION_TAP; event.id = pointAnnotation.id; CGPoint screenPoint = [pointAnnotation.superview convertPoint:pointAnnotation.layer.position toView:nil]; @@ -65,9 +65,9 @@ + (RCTMLNMapTouchEvent *)makeAnnotationTapEventOnDrag:(RCTMLNPointAnnotation *)p return event; } -+ (RCTMLNMapTouchEvent*)_fromPoint:(CGPoint)point withMapView:(MLNMapView *)mapView andEventType:(NSString*)eventType ++ (MLRNMapTouchEvent*)_fromPoint:(CGPoint)point withMapView:(MLNMapView *)mapView andEventType:(NSString*)eventType { - RCTMLNMapTouchEvent *event = [[RCTMLNMapTouchEvent alloc] init]; + MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init]; event.type = eventType; event.coordinate = [mapView convertPoint:point toCoordinateFromView:mapView]; event.screenPoint = point; diff --git a/ios/RCTMLN/RCTMLNMapView.h b/ios/MLRN/MLRNMapView.h similarity index 72% rename from ios/RCTMLN/RCTMLNMapView.h rename to ios/MLRN/MLRNMapView.h index b7f177e39..da233a6e4 100644 --- a/ios/RCTMLN/RCTMLNMapView.h +++ b/ios/MLRN/MLRNMapView.h @@ -1,24 +1,24 @@ // -// RCTMLNMapView.h -// RCTMLN +// MLRNMapView.h +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNSource.h" -#import "RCTMLNShapeSource.h" -#import "RCTMLNPointAnnotation.h" -#import "RCTMLNLight.h" +#import "MLRNSource.h" +#import "MLRNShapeSource.h" +#import "MLRNPointAnnotation.h" +#import "MLRNLight.h" @import MapLibre; @class CameraUpdateQueue; -@class RCTMLNImages; -@class RCTMLNLogging; +@class MLRNImages; +@class MLRNLogging; -@protocol RCTMLNMapViewCamera +@protocol MLRNMapViewCamera - (void)initialLayout; - (void)didChangeUserTrackingMode:(MLNUserTrackingMode)mode animated:(BOOL)animated; @end @@ -26,17 +26,17 @@ typedef void (^FoundLayerBlock) (MLNStyleLayer* __nonnull layer); typedef void (^StyleLoadedBlock) (MLNStyle* __nonnull style); -@interface RCTMLNMapView : MLNMapView +@interface MLRNMapView : MLNMapView -@property (nonatomic, strong, nonnull) RCTMLNLogging* logging; +@property (nonatomic, strong, nonnull) MLRNLogging* logging; @property (nonatomic, strong) CameraUpdateQueue *cameraUpdateQueue; -@property (nonatomic, weak) id reactCamera; +@property (nonatomic, weak) id reactCamera; @property (nonatomic, strong) NSMutableArray> *reactSubviews; -@property (nonatomic, strong) NSMutableArray *sources; -@property (nonatomic, strong) NSMutableArray *images; -@property (nonatomic, strong) NSMutableArray *layers; -@property (nonatomic, strong) NSMutableArray *pointAnnotations; -@property (nonatomic, strong) RCTMLNLight *light; +@property (nonatomic, strong) NSMutableArray *sources; +@property (nonatomic, strong) NSMutableArray *images; +@property (nonatomic, strong) NSMutableArray *layers; +@property (nonatomic, strong) NSMutableArray *pointAnnotations; +@property (nonatomic, strong) MLRNLight *light; @property (nonatomic, copy) NSArray *reactContentInset; @property (nonatomic, strong) NSMutableDictionary*> *layerWaiters; @@ -74,11 +74,11 @@ typedef void (^StyleLoadedBlock) (MLNStyle* __nonnull style); - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel; - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel atLatitude:(CLLocationDegrees)latitude; - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel atLatitude:(CLLocationDegrees)latitude atPitch:(CGFloat)pitch; -- (RCTMLNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation*)mlnAnnotation; -- (NSArray *)getAllTouchableSources; -- (NSArray *)getAllShapeSources; -- (NSArray *)getAllImages; -- (RCTMLNSource *)getTouchableSourceWithHighestZIndex:(NSArray *)touchableSources; +- (MLRNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation*)mlnAnnotation; +- (NSArray *)getAllTouchableSources; +- (NSArray *)getAllShapeSources; +- (NSArray *)getAllImages; +- (MLRNSource *)getTouchableSourceWithHighestZIndex:(NSArray *)touchableSources; - (NSString *)takeSnap:(BOOL)writeToDisk; - (void)didChangeUserTrackingMode:(MLNUserTrackingMode)mode animated:(BOOL)animated; diff --git a/ios/RCTMLN/RCTMLNMapView.m b/ios/MLRN/MLRNMapView.m similarity index 82% rename from ios/RCTMLN/RCTMLNMapView.m rename to ios/MLRN/MLRNMapView.m index 2706fafe6..3bdb29680 100644 --- a/ios/RCTMLN/RCTMLNMapView.m +++ b/ios/MLRN/MLRNMapView.m @@ -1,21 +1,21 @@ // -// RCTMLNMapView.m -// RCTMLN +// MLRNMapView.m +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNMapView.h" +#import "MLRNMapView.h" #import "CameraUpdateQueue.h" -#import "RCTMLNUtils.h" +#import "MLRNUtils.h" #import "RNMBImageUtils.h" -#import "RCTMLNImages.h" +#import "MLRNImages.h" #import -#import "RCTMLNNativeUserLocation.h" -#import "RCTMLNLogging.h" +#import "MLRNNativeUserLocation.h" +#import "MLRNLogging.h" -@implementation RCTMLNMapView +@implementation MLRNMapView { BOOL _pendingInitialLayout; } @@ -38,7 +38,7 @@ - (instancetype)initWithFrame:(CGRect)frame _reactSubviews = [[NSMutableArray alloc] init]; _layerWaiters = [[NSMutableDictionary alloc] init]; _styleWaiters = [[NSMutableArray alloc] init]; - _logging = [[RCTMLNLogging alloc] init]; + _logging = [[MLRNLogging alloc] init]; } return self; } @@ -116,30 +116,30 @@ - (void)notifyStyleLoaded { - (void) addToMap:(id)subview { - if ([subview isKindOfClass:[RCTMLNSource class]]) { - RCTMLNSource *source = (RCTMLNSource*)subview; + if ([subview isKindOfClass:[MLRNSource class]]) { + MLRNSource *source = (MLRNSource*)subview; source.map = self; - [_sources addObject:(RCTMLNSource*)subview]; - } else if ([subview isKindOfClass:[RCTMLNLight class]]) { - RCTMLNLight *light = (RCTMLNLight*)subview; + [_sources addObject:(MLRNSource*)subview]; + } else if ([subview isKindOfClass:[MLRNLight class]]) { + MLRNLight *light = (MLRNLight*)subview; _light = light; _light.map = self; - } else if ([subview isKindOfClass:[RCTMLNNativeUserLocation class]]) { - RCTMLNNativeUserLocation *nativeUserLocation = (RCTMLNNativeUserLocation*)subview; + } else if ([subview isKindOfClass:[MLRNNativeUserLocation class]]) { + MLRNNativeUserLocation *nativeUserLocation = (MLRNNativeUserLocation*)subview; nativeUserLocation.map = self; - } else if ([subview isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *pointAnnotation = (RCTMLNPointAnnotation *)subview; + } else if ([subview isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *pointAnnotation = (MLRNPointAnnotation *)subview; pointAnnotation.map = self; [_pointAnnotations addObject:pointAnnotation]; - } else if ([subview isKindOfClass:[RCTMLNCamera class]]) { - RCTMLNCamera *camera = (RCTMLNCamera *)subview; + } else if ([subview isKindOfClass:[MLRNCamera class]]) { + MLRNCamera *camera = (MLRNCamera *)subview; camera.map = self; - } else if ([subview isKindOfClass:[RCTMLNImages class]]) { - RCTMLNImages *images = (RCTMLNImages*)subview; + } else if ([subview isKindOfClass:[MLRNImages class]]) { + MLRNImages *images = (MLRNImages*)subview; images.map = self; [_images addObject:images]; - } else if ([subview isKindOfClass:[RCTMLNLayer class]]) { - RCTMLNLayer *layer = (RCTMLNLayer*)subview; + } else if ([subview isKindOfClass:[MLRNLayer class]]) { + MLRNLayer *layer = (MLRNLayer*)subview; layer.map = self; [_layers addObject:layer]; } else { @@ -153,30 +153,30 @@ - (void) addToMap:(id)subview - (void) removeFromMap:(id)subview { - if ([subview isKindOfClass:[RCTMLNSource class]]) { - RCTMLNSource *source = (RCTMLNSource*)subview; + if ([subview isKindOfClass:[MLRNSource class]]) { + MLRNSource *source = (MLRNSource*)subview; source.map = nil; [_sources removeObject:source]; - } else if ([subview isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *pointAnnotation = (RCTMLNPointAnnotation *)subview; + } else if ([subview isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *pointAnnotation = (MLRNPointAnnotation *)subview; pointAnnotation.map = nil; [_pointAnnotations removeObject:pointAnnotation]; - } else if ([subview isKindOfClass:[RCTMLNCamera class]]) { - RCTMLNCamera *camera = (RCTMLNCamera *)subview; + } else if ([subview isKindOfClass:[MLRNCamera class]]) { + MLRNCamera *camera = (MLRNCamera *)subview; camera.map = nil; - } else if ([subview isKindOfClass:[RCTMLNImages class]]) { - RCTMLNImages *images = (RCTMLNImages*)subview; + } else if ([subview isKindOfClass:[MLRNImages class]]) { + MLRNImages *images = (MLRNImages*)subview; images.map = nil; [_images removeObject:images]; - } else if ([subview isKindOfClass:[RCTMLNLayer class]]) { - RCTMLNLayer *layer = (RCTMLNLayer*)subview; + } else if ([subview isKindOfClass:[MLRNLayer class]]) { + MLRNLayer *layer = (MLRNLayer*)subview; layer.map = nil; [_layers removeObject:layer]; - } else if ([subview isKindOfClass:[RCTMLNNativeUserLocation class]]) { - RCTMLNNativeUserLocation *nativeUserLocation = (RCTMLNNativeUserLocation *)subview; + } else if ([subview isKindOfClass:[MLRNNativeUserLocation class]]) { + MLRNNativeUserLocation *nativeUserLocation = (MLRNNativeUserLocation *)subview; nativeUserLocation.map = nil; - } else if ([subview isKindOfClass:[RCTMLNLight class]]) { - RCTMLNLight *light = (RCTMLNLight*)subview; + } else if ([subview isKindOfClass:[MLRNLight class]]) { + MLRNLight *light = (MLRNLight*)subview; light.map = nil; } else { NSArray> *childSubViews = [subview reactSubviews]; @@ -408,11 +408,11 @@ - (NSString *)takeSnap:(BOOL)writeToDisk - (CLLocationDistance)getMetersPerPixelAtLatitude:(double)latitude withZoom:(double)zoomLevel { - double constrainedZoom = [[RCTMLNUtils clamp:[NSNumber numberWithDouble:zoomLevel] + double constrainedZoom = [[MLRNUtils clamp:[NSNumber numberWithDouble:zoomLevel] min:[NSNumber numberWithDouble:self.minimumZoomLevel] max:[NSNumber numberWithDouble:self.maximumZoomLevel]] doubleValue]; - double constrainedLatitude = [[RCTMLNUtils clamp:[NSNumber numberWithDouble:latitude] + double constrainedLatitude = [[MLRNUtils clamp:[NSNumber numberWithDouble:latitude] min:[NSNumber numberWithDouble:-LAT_MAX] max:[NSNumber numberWithDouble:LAT_MAX]] doubleValue]; @@ -435,10 +435,10 @@ - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel atLatitude:(CLLocationD return MLNAltitudeForZoomLevel(zoomLevel, pitch, latitude, self.frame.size); } -- (RCTMLNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation *)mlnAnnotation +- (MLRNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation *)mlnAnnotation { for (int i = 0; i < _pointAnnotations.count; i++) { - RCTMLNPointAnnotation *rctAnnotation = _pointAnnotations[i]; + MLRNPointAnnotation *rctAnnotation = _pointAnnotations[i]; if (rctAnnotation.annotation == mlnAnnotation) { return rctAnnotation; } @@ -446,11 +446,11 @@ - (RCTMLNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation *)mlnAnnotat return nil; } -- (NSArray *)getAllTouchableSources +- (NSArray *)getAllTouchableSources { - NSMutableArray *touchableSources = [[NSMutableArray alloc] init]; + NSMutableArray *touchableSources = [[NSMutableArray alloc] init]; - for (RCTMLNSource *source in _sources) { + for (MLRNSource *source in _sources) { if (source.hasPressListener) { [touchableSources addObject:source]; } @@ -459,24 +459,24 @@ - (RCTMLNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation *)mlnAnnotat return touchableSources; } -- (NSArray*)getAllImages +- (NSArray*)getAllImages { return [_images copy]; } -- (NSArray *)getAllShapeSources +- (NSArray *)getAllShapeSources { - NSMutableArray *shapeSources = [[NSMutableArray alloc] init]; + NSMutableArray *shapeSources = [[NSMutableArray alloc] init]; - for (RCTMLNSource *source in _sources) { - if ([source isKindOfClass:[RCTMLNShapeSource class]]) { + for (MLRNSource *source in _sources) { + if ([source isKindOfClass:[MLRNShapeSource class]]) { [shapeSources addObject:source]; } } return shapeSources; } -- (RCTMLNSource *)getTouchableSourceWithHighestZIndex:(NSArray *)touchableSources +- (MLRNSource *)getTouchableSourceWithHighestZIndex:(NSArray *)touchableSources { if (touchableSources == nil || touchableSources.count == 0) { return nil; @@ -486,8 +486,8 @@ - (RCTMLNSource *)getTouchableSourceWithHighestZIndex:(NSArray * return touchableSources[0]; } - NSMutableDictionary *layerToSoureDict = [[NSMutableDictionary alloc] init]; - for (RCTMLNSource *touchableSource in touchableSources) { + NSMutableDictionary *layerToSoureDict = [[NSMutableDictionary alloc] init]; + for (MLRNSource *touchableSource in touchableSources) { NSArray *layerIDs = [touchableSource getLayerIDs]; for (NSString *layerID in layerIDs) { @@ -499,7 +499,7 @@ - (RCTMLNSource *)getTouchableSourceWithHighestZIndex:(NSArray * for (int i = (int)layers.count - 1; i >= 0; i--) { MLNStyleLayer *layer = layers[i]; - RCTMLNSource *source = layerToSoureDict[layer.identifier]; + MLRNSource *source = layerToSoureDict[layer.identifier]; if (source != nil) { return source; } @@ -514,7 +514,7 @@ - (NSURL*)_getStyleURLFromKey:(NSString *)styleURL if (url) { return url; } else if (RCTJSONParse(styleURL, nil)) { - return [RCTMLNUtils styleURLFromStyleJSON:styleURL]; + return [MLRNUtils styleURLFromStyleJSON:styleURL]; } return url; } @@ -524,7 +524,7 @@ - (void)_removeAllSourcesFromMap if (self.style == nil || _sources.count == 0) { return; } - for (RCTMLNSource *source in _sources) { + for (MLRNSource *source in _sources) { source.map = nil; } } diff --git a/ios/RCTMLN/RCTMLNMapViewManager.h b/ios/MLRN/MLRNMapViewManager.h similarity index 76% rename from ios/RCTMLN/RCTMLNMapViewManager.h rename to ios/MLRN/MLRNMapViewManager.h index d59999ea6..b35063006 100644 --- a/ios/RCTMLN/RCTMLNMapViewManager.h +++ b/ios/MLRN/MLRNMapViewManager.h @@ -1,6 +1,6 @@ // -// RCTMLNMapViewManager.h -// RCTMLN +// MLRNMapViewManager.h +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,7 +9,7 @@ #import "ViewManager.h" @import MapLibre; -@interface RCTMLNMapViewManager : ViewManager +@interface MLRNMapViewManager : ViewManager - (void)didTapMap:(UITapGestureRecognizer *)recognizer; - (void)didLongPressMap:(UILongPressGestureRecognizer *)recognizer; diff --git a/ios/RCTMLN/RCTMLNMapViewManager.m b/ios/MLRN/MLRNMapViewManager.m similarity index 78% rename from ios/RCTMLN/RCTMLNMapViewManager.m rename to ios/MLRN/MLRNMapViewManager.m index d0f13bcae..6cf5bec7e 100644 --- a/ios/RCTMLN/RCTMLNMapViewManager.m +++ b/ios/MLRN/MLRNMapViewManager.m @@ -1,6 +1,6 @@ // -// RCTMLNMapViewManager.m -// RCTMLN +// MLRNMapViewManager.m +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,25 +8,25 @@ #import -#import "RCTMLNMapViewManager.h" -#import "RCTMLNMapView.h" -#import "RCTMLNEventTypes.h" -#import "RCTMLNEvent.h" -#import "RCTMLNMapTouchEvent.h" -#import "RCTMLNUtils.h" +#import "MLRNMapViewManager.h" +#import "MLRNMapView.h" +#import "MLRNEventTypes.h" +#import "MLRNEvent.h" +#import "MLRNMapTouchEvent.h" +#import "MLRNUtils.h" #import "CameraStop.h" #import "CameraUpdateQueue.h" -#import "RCTMLNUserLocation.h" +#import "MLRNUserLocation.h" #import "FilterParser.h" -#import "RCTMLNImages.h" +#import "MLRNImages.h" -@interface RCTMLNMapViewManager() +@interface MLRNMapViewManager() @end -@implementation RCTMLNMapViewManager +@implementation MLRNMapViewManager -RCT_EXPORT_MODULE(RCTMLNMapView) +RCT_EXPORT_MODULE(MLRNMapView) - (BOOL)requiresMainQueueSetup { @@ -42,7 +42,7 @@ - (CGRect)defaultFrame - (UIView *)view { - RCTMLNMapView *mapView = [[RCTMLNMapView alloc] initWithFrame:[self defaultFrame]]; + MLRNMapView *mapView = [[MLRNMapView alloc] initWithFrame:[self defaultFrame]]; mapView.delegate = self; @@ -107,12 +107,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; CGPoint pointInView = [reactMapView convertCoordinate:CLLocationCoordinate2DMake([coordinate[1] doubleValue], [coordinate[0] doubleValue]) toPointToView:reactMapView]; @@ -129,12 +129,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; CLLocationCoordinate2D coordinate = [reactMapView convertPoint:point toCoordinateFromView:reactMapView]; @@ -152,12 +152,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; NSString *uri = [reactMapView takeSnap:writeToDisk]; resolve(@{ @"uri": uri }); }]; @@ -170,13 +170,13 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; - resolve(@{ @"visibleBounds": [RCTMLNUtils fromCoordinateBounds:reactMapView.visibleCoordinateBounds] }); + MLRNMapView *reactMapView = (MLRNMapView*)view; + resolve(@{ @"visibleBounds": [MLRNUtils fromCoordinateBounds:reactMapView.visibleCoordinateBounds] }); }]; } @@ -187,12 +187,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; resolve(@{ @"zoom": @(reactMapView.zoomLevel) }); }]; } @@ -204,12 +204,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; resolve(@{ @"center": @[@(reactMapView.centerCoordinate.longitude), @(reactMapView.centerCoordinate.latitude)]}); }]; } @@ -224,8 +224,8 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } @@ -234,7 +234,7 @@ - (UIView *)view layerIDSet = [NSSet setWithArray:layerIDs]; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; NSPredicate* predicate = [FilterParser parse:filter]; NSArray> *shapes = [reactMapView visibleFeaturesAtPoint:CGPointMake([point[0] floatValue], [point[1] floatValue]) inStyleLayersWithIdentifiers:layerIDSet @@ -261,12 +261,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + MLRNMapView *reactMapView = (MLRNMapView*)view; // bbox[top, right, bottom, left] CGFloat width = [bbox[1] floatValue] - [bbox[3] floatValue]; @@ -296,12 +296,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - __weak RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + __weak MLRNMapView *reactMapView = (MLRNMapView*)view; [reactMapView showAttribution:reactMapView]; resolve(nil); }]; @@ -317,12 +317,12 @@ - (UIView *)view [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { id view = viewRegistry[reactTag]; - if (![view isKindOfClass:[RCTMLNMapView class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![view isKindOfClass:[MLRNMapView class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } - __weak RCTMLNMapView *reactMapView = (RCTMLNMapView*)view; + __weak MLRNMapView *reactMapView = (MLRNMapView*)view; [reactMapView setSourceVisibility:visible sourceId:sourceId sourceLayerId:sourceLayerId]; resolve(nil); }]; @@ -332,13 +332,13 @@ - (UIView *)view - (void)didTapMap:(UITapGestureRecognizer *)recognizer { - RCTMLNMapView *mapView = (RCTMLNMapView*)recognizer.view; + MLRNMapView *mapView = (MLRNMapView*)recognizer.view; CGPoint screenPoint = [recognizer locationInView:mapView]; - NSArray *touchableSources = [mapView getAllTouchableSources]; + NSArray *touchableSources = [mapView getAllTouchableSources]; NSMutableDictionary>* > *hits = [[NSMutableDictionary alloc] init]; - NSMutableArray *hitTouchableSources = [[NSMutableArray alloc] init]; - for (RCTMLNSource *touchableSource in touchableSources) { + NSMutableArray *hitTouchableSources = [[NSMutableArray alloc] init]; + for (MLRNSource *touchableSource in touchableSources) { NSDictionary *hitbox = touchableSource.hitbox; float halfWidth = [hitbox[@"width"] floatValue] / 2.f; float halfHeight = [hitbox[@"height"] floatValue] / 2.f; @@ -358,19 +358,19 @@ - (void)didTapMap:(UITapGestureRecognizer *)recognizer } if (hits.count > 0) { - RCTMLNSource *source = [mapView getTouchableSourceWithHighestZIndex:hitTouchableSources]; + MLRNSource *source = [mapView getTouchableSourceWithHighestZIndex:hitTouchableSources]; if (source != nil && source.hasPressListener) { NSArray* geoJSONDicts = [self featuresToJSON: hits[source.id]]; NSString *eventType = RCT_MAPBOX_VECTOR_SOURCE_LAYER_PRESS; - if ([source isKindOfClass:[RCTMLNShapeSource class]]) { + if ([source isKindOfClass:[MLRNShapeSource class]]) { eventType = RCT_MAPBOX_SHAPE_SOURCE_LAYER_PRESS; } CLLocationCoordinate2D coordinate = [mapView convertPoint:screenPoint toCoordinateFromView:mapView]; - RCTMLNEvent *event = [RCTMLNEvent makeEvent:eventType withPayload: @{ + MLRNEvent *event = [MLRNEvent makeEvent:eventType withPayload: @{ @"features": geoJSONDicts, @"point": @{ @"x": [NSNumber numberWithDouble: screenPoint.x], @@ -390,19 +390,19 @@ - (void)didTapMap:(UITapGestureRecognizer *)recognizer return; } - RCTMLNMapTouchEvent *event = [RCTMLNMapTouchEvent makeTapEvent:mapView withPoint:screenPoint]; + MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeTapEvent:mapView withPoint:screenPoint]; [self fireEvent:event withCallback:mapView.onPress]; } - (void)didLongPressMap:(UILongPressGestureRecognizer *)recognizer { - RCTMLNMapView *mapView = (RCTMLNMapView*)recognizer.view; + MLRNMapView *mapView = (MLRNMapView*)recognizer.view; if (mapView == nil || mapView.onPress == nil || recognizer.state != UIGestureRecognizerStateBegan) { return; } - RCTMLNMapTouchEvent *event = [RCTMLNMapTouchEvent makeLongPressEvent:mapView withPoint:[recognizer locationInView:mapView]]; + MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeLongPressEvent:mapView withPoint:[recognizer locationInView:mapView]]; [self fireEvent:event withCallback:mapView.onLongPress]; } @@ -411,14 +411,14 @@ - (void)didLongPressMap:(UILongPressGestureRecognizer *)recognizer - (MLNAnnotationView *)mapView:(MLNMapView *)mapView viewForAnnotation:(id)annotation { if ([annotation isKindOfClass:[MLNUserLocation class]] && mapView.userLocation != nil) { - RCTMLNMapView* reactMapView = ((RCTMLNMapView *) mapView); + MLRNMapView* reactMapView = ((MLRNMapView *) mapView); if (reactMapView.useNativeUserLocationAnnotationView) { return nil; } - return [[RCTMLNUserLocation sharedInstance] hiddenUserAnnotation]; + return [[MLRNUserLocation sharedInstance] hiddenUserAnnotation]; } - else if ([annotation isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *rctAnnotation = (RCTMLNPointAnnotation *)annotation; + else if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation; return [rctAnnotation getAnnotationView]; } return nil; @@ -426,17 +426,17 @@ - (MLNAnnotationView *)mapView:(MLNMapView *)mapView viewForAnnotation:(id)annotation { - if ([annotation isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *rctAnnotation = (RCTMLNPointAnnotation *)annotation; + if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation; if (rctAnnotation.onSelected != nil) { - RCTMLNMapTouchEvent *event = [RCTMLNMapTouchEvent makeAnnotationTapEvent:rctAnnotation]; + MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeAnnotationTapEvent:rctAnnotation]; rctAnnotation.onSelected([event toJSON]); } } @@ -444,8 +444,8 @@ - (void)mapView:(MLNMapView *)mapView didSelectAnnotation:(nonnull id)annotation { - if ([annotation isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *rctAnnotation = (RCTMLNPointAnnotation *)annotation; + if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation; if (rctAnnotation.onDeselected != nil) { rctAnnotation.onDeselected(nil); @@ -454,8 +454,8 @@ - (void)mapView:(MLNMapView *)mapView didDeselectAnnotation:(nonnull id)annotation { - if ([annotation isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *rctAnnotation = (RCTMLNPointAnnotation *)annotation; + if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation; return rctAnnotation.calloutView != nil; } return NO; @@ -463,8 +463,8 @@ - (BOOL)mapView:(MLNMapView *)mapView annotationCanShowCallout:(id *)mapView:(MLNMapView *)mapView calloutViewForAnnotation:(id)annotation { - if ([annotation isKindOfClass:[RCTMLNPointAnnotation class]]) { - RCTMLNPointAnnotation *rctAnnotation = (RCTMLNPointAnnotation *)annotation; + if ([annotation isKindOfClass:[MLRNPointAnnotation class]]) { + MLRNPointAnnotation *rctAnnotation = (MLRNPointAnnotation *)annotation; return rctAnnotation.calloutView; } return nil; @@ -472,13 +472,13 @@ - (BOOL)mapView:(MLNMapView *)mapView annotationCanShowCallout:(id *allImages = [reactMapView getAllImages]; - for (RCTMLNImages *images in allImages) { + MLRNMapView* reactMapView = ((MLRNMapView *) mapView); + NSArray *allImages = [reactMapView getAllImages]; + for (MLRNImages *images in allImages) { if([images addMissingImageToStyle:imageName]) { // The image was added inside addMissingImageToStyle so we can return nil return nil; } } - for (RCTMLNImages *images in allImages) { + for (MLRNImages *images in allImages) { [images sendImageMissingEvent:imageName]; } return nil; @@ -592,14 +592,14 @@ - (void)reactMapDidChange:(MLNMapView*)mapView eventType:(NSString*)type - (void)reactMapDidChange:(MLNMapView*)mapView eventType:(NSString*)type andPayload:(NSDictionary*)payload { - RCTMLNMapView *reactMapView = (RCTMLNMapView*)mapView; - RCTMLNEvent *event = [RCTMLNEvent makeEvent:type withPayload:payload]; + MLRNMapView *reactMapView = (MLRNMapView*)mapView; + MLRNEvent *event = [MLRNEvent makeEvent:type withPayload:payload]; [self fireEvent:event withCallback:reactMapView.onMapChange]; } - (NSDictionary*)_makeRegionPayload:(MLNMapView*)mapView animated:(BOOL)animated { - RCTMLNMapView *rctMapView = (RCTMLNMapView *)mapView; + MLRNMapView *rctMapView = (MLRNMapView *)mapView; MLNPointFeature *feature = [[MLNPointFeature alloc] init]; feature.coordinate = mapView.centerCoordinate; feature.attributes = @{ @@ -608,7 +608,7 @@ - (NSDictionary*)_makeRegionPayload:(MLNMapView*)mapView animated:(BOOL)animated @"pitch": [NSNumber numberWithDouble:mapView.camera.pitch], @"animated": [NSNumber numberWithBool:animated], @"isUserInteraction": @(rctMapView.isUserInteraction), - @"visibleBounds": [RCTMLNUtils fromCoordinateBounds:mapView.visibleCoordinateBounds] + @"visibleBounds": [MLRNUtils fromCoordinateBounds:mapView.visibleCoordinateBounds] }; return feature.geoJSONDictionary; } diff --git a/ios/RCTMLN/RCTMLNNativeUserLocation.h b/ios/MLRN/MLRNNativeUserLocation.h similarity index 60% rename from ios/RCTMLN/RCTMLNNativeUserLocation.h rename to ios/MLRN/MLRNNativeUserLocation.h index 96a18fcc0..0c4cfaee2 100644 --- a/ios/RCTMLN/RCTMLNNativeUserLocation.h +++ b/ios/MLRN/MLRNNativeUserLocation.h @@ -1,6 +1,6 @@ // -// RCTMLNCamera.h -// RCTMLN +// MLRNCamera.h +// MLRN // // Created by Nick Italiano on 6/22/18. // Copyright © 2018 Mapbox Inc. All rights reserved. @@ -8,11 +8,11 @@ #import #import -@class RCTMLNMapView; +@class MLRNMapView; -@interface RCTMLNNativeUserLocation : UIView +@interface MLRNNativeUserLocation : UIView -@property (nonatomic, strong) RCTMLNMapView *map; +@property (nonatomic, strong) MLRNMapView *map; @property (nonatomic) BOOL iosShowsUserHeadingIndicator; @end diff --git a/ios/RCTMLN/RCTMLNNativeUserLocation.m b/ios/MLRN/MLRNNativeUserLocation.m similarity index 78% rename from ios/RCTMLN/RCTMLNNativeUserLocation.m rename to ios/MLRN/MLRNNativeUserLocation.m index 9c6a8b7a2..b4e82a43f 100644 --- a/ios/RCTMLN/RCTMLNNativeUserLocation.m +++ b/ios/MLRN/MLRNNativeUserLocation.m @@ -1,27 +1,27 @@ // -// RCTMLNCamera.m -// RCTMLN +// MLRNCamera.m +// MLRN // // Created by Nick Italiano on 6/22/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // -#import "RCTMLNNativeUserLocation.h" +#import "MLRNNativeUserLocation.h" #import "CameraStop.h" #import "CameraUpdateQueue.h" -#import "RCTMLNLocation.h" -#import "RCTMLNUtils.h" -#import "RCTMLNLocationManager.h" -#import "RCTMLNEvent.h" -#import "RCTMLNEventTypes.h" +#import "MLRNLocation.h" +#import "MLRNUtils.h" +#import "MLRNLocationManager.h" +#import "MLRNEvent.h" +#import "MLRNEventTypes.h" #import "CameraMode.h" -@implementation RCTMLNNativeUserLocation +@implementation MLRNNativeUserLocation { } -- (void)setMap:(RCTMLNMapView *)map +- (void)setMap:(MLRNMapView *)map { if (map == nil && _map) { _map.useNativeUserLocationAnnotationView = NO; diff --git a/ios/MLRN/MLRNNativeUserLocationManager.h b/ios/MLRN/MLRNNativeUserLocationManager.h new file mode 100644 index 000000000..a174aa671 --- /dev/null +++ b/ios/MLRN/MLRNNativeUserLocationManager.h @@ -0,0 +1,5 @@ +#import "ViewManager.h" + +@interface MLRNNativeUserLocationManager : ViewManager + +@end diff --git a/ios/MLRN/MLRNNativeUserLocationManager.m b/ios/MLRN/MLRNNativeUserLocationManager.m new file mode 100644 index 000000000..180ccb1f3 --- /dev/null +++ b/ios/MLRN/MLRNNativeUserLocationManager.m @@ -0,0 +1,25 @@ +#import "MLRNNativeUserLocationManager.h" +#import "MLRNNativeUserLocation.h" + +@implementation MLRNNativeUserLocationManager + +RCT_EXPORT_MODULE(MLRNNativeUserLocation) +RCT_EXPORT_VIEW_PROPERTY(iosShowsUserHeadingIndicator, BOOL) + + +#pragma - View Properties + + +#pragma Methods + +- (BOOL)requiresMainQueueSetup +{ + return YES; +} + +- (UIView *)view +{ + return [[MLRNNativeUserLocation alloc] init]; +} + +@end diff --git a/ios/RCTMLN/RCTMLNPointAnnotation.h b/ios/MLRN/MLRNPointAnnotation.h similarity index 84% rename from ios/RCTMLN/RCTMLNPointAnnotation.h rename to ios/MLRN/MLRNPointAnnotation.h index d458201f6..c91554598 100644 --- a/ios/RCTMLN/RCTMLNPointAnnotation.h +++ b/ios/MLRN/MLRNPointAnnotation.h @@ -1,6 +1,6 @@ // -// RCTMLNPointAnnotation.h -// RCTMLN +// MLRNPointAnnotation.h +// MLRN // // Created by Nick Italiano on 10/12/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,14 +9,14 @@ #import #import #import -#import "RCTMLNCallout.h" +#import "MLRNCallout.h" @import MapLibre; -@interface RCTMLNPointAnnotation : MLNAnnotationView +@interface MLRNPointAnnotation : MLNAnnotationView @property (nonatomic, weak) MLNMapView *map; -@property (nonatomic, strong) RCTMLNCallout *calloutView; +@property (nonatomic, strong) MLRNCallout *calloutView; @property (nonatomic, copy) NSString *id; @property (nonatomic, copy) NSString *reactTitle; diff --git a/ios/RCTMLN/RCTMLNPointAnnotation.m b/ios/MLRN/MLRNPointAnnotation.m similarity index 87% rename from ios/RCTMLN/RCTMLNPointAnnotation.m rename to ios/MLRN/MLRNPointAnnotation.m index 6fda2c048..651dfd203 100644 --- a/ios/RCTMLN/RCTMLNPointAnnotation.m +++ b/ios/MLRN/MLRNPointAnnotation.m @@ -1,20 +1,20 @@ // -// RCTMLNPointAnnotation.m -// RCTMLN +// MLRNPointAnnotation.m +// MLRN // // Created by Nick Italiano on 10/12/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNPointAnnotation.h" -#import "RCTMLNMapTouchEvent.h" -#import "RCTMLNUtils.h" +#import "MLRNPointAnnotation.h" +#import "MLRNMapTouchEvent.h" +#import "MLRNUtils.h" #import const float CENTER_X_OFFSET_BASE = -0.5f; const float CENTER_Y_OFFSET_BASE = -0.5f; -@implementation RCTMLNPointAnnotation +@implementation MLRNPointAnnotation { UITapGestureRecognizer *customViewTap; } @@ -29,8 +29,8 @@ - (id)init - (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex { - if ([subview isKindOfClass:[RCTMLNCallout class]]) { - self.calloutView = (RCTMLNCallout *)subview; + if ([subview isKindOfClass:[MLRNCallout class]]) { + self.calloutView = (MLRNCallout *)subview; self.calloutView.representedObject = self; } else { [super insertReactSubview:subview atIndex:0]; @@ -39,7 +39,7 @@ - (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex - (void)removeReactSubview:(UIView *)subview { - if ([subview isKindOfClass:[RCTMLNCallout class]]) { + if ([subview isKindOfClass:[MLRNCallout class]]) { self.calloutView = nil; } else { [super removeReactSubview:subview]; @@ -189,7 +189,7 @@ - (void)_updateCoordinate return; } - MLNPointFeature *feature = (MLNPointFeature *)[RCTMLNUtils shapeFromGeoJSON:_reactCoordinate]; + MLNPointFeature *feature = (MLNPointFeature *)[MLRNUtils shapeFromGeoJSON:_reactCoordinate]; if (feature == nil) { return; } @@ -221,7 +221,7 @@ - (void)setDragState:(MLNAnnotationViewDragState)dragState animated:(BOOL)animat switch (dragState) { case MLNAnnotationViewDragStateStarting: { if (self.onDragStart != nil) { - RCTMLNMapTouchEvent *event = [RCTMLNMapTouchEvent makeAnnotationTapEvent:self]; + MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeAnnotationTapEvent:self]; self.onDragStart([event toJSON]); } break; @@ -229,7 +229,7 @@ - (void)setDragState:(MLNAnnotationViewDragState)dragState animated:(BOOL)animat case MLNAnnotationViewDragStateDragging: if (self.onDrag != nil) { - RCTMLNMapTouchEvent *event = [RCTMLNMapTouchEvent makeAnnotationTapEventOnDrag:self]; + MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeAnnotationTapEventOnDrag:self]; self.onDrag([event toJSON]); } break; @@ -237,7 +237,7 @@ - (void)setDragState:(MLNAnnotationViewDragState)dragState animated:(BOOL)animat case MLNAnnotationViewDragStateEnding: case MLNAnnotationViewDragStateCanceling: { if (self.onDragEnd != nil) { - RCTMLNMapTouchEvent *event = [RCTMLNMapTouchEvent makeAnnotationTapEvent:self]; + MLRNMapTouchEvent *event = [MLRNMapTouchEvent makeAnnotationTapEvent:self]; self.onDragEnd([event toJSON]); } break; diff --git a/ios/RCTMLN/RCTMLNPointAnnotationManager.h b/ios/MLRN/MLRNPointAnnotationManager.h similarity index 57% rename from ios/RCTMLN/RCTMLNPointAnnotationManager.h rename to ios/MLRN/MLRNPointAnnotationManager.h index bd4b1eb77..bf5f5d575 100644 --- a/ios/RCTMLN/RCTMLNPointAnnotationManager.h +++ b/ios/MLRN/MLRNPointAnnotationManager.h @@ -1,6 +1,6 @@ // -// RCTMLNPointAnnotationManager.h -// RCTMLN +// MLRNPointAnnotationManager.h +// MLRN // // Created by Nick Italiano on 10/12/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNPointAnnotationManager : ViewManager +@interface MLRNPointAnnotationManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNPointAnnotationManager.m b/ios/MLRN/MLRNPointAnnotationManager.m similarity index 82% rename from ios/RCTMLN/RCTMLNPointAnnotationManager.m rename to ios/MLRN/MLRNPointAnnotationManager.m index d738c11f6..af908d62c 100644 --- a/ios/RCTMLN/RCTMLNPointAnnotationManager.m +++ b/ios/MLRN/MLRNPointAnnotationManager.m @@ -1,15 +1,15 @@ // -// RCTMLNPointAnnotationManager.m -// RCTMLN +// MLRNPointAnnotationManager.m +// MLRN // // Created by Nick Italiano on 10/12/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNPointAnnotationManager.h" -#import "RCTMLNPointAnnotation.h" +#import "MLRNPointAnnotationManager.h" +#import "MLRNPointAnnotation.h" -@implementation RCTMLNPointAnnotationManager +@implementation MLRNPointAnnotationManager RCT_EXPORT_MODULE() @@ -30,7 +30,7 @@ @implementation RCTMLNPointAnnotationManager - (UIView *)view { - return [[RCTMLNPointAnnotation alloc] init]; + return [[MLRNPointAnnotation alloc] init]; } @end diff --git a/ios/RCTMLN/RCTMLNBackgroundLayer.h b/ios/MLRN/MLRNRasterLayer.h similarity index 54% rename from ios/RCTMLN/RCTMLNBackgroundLayer.h rename to ios/MLRN/MLRNRasterLayer.h index 942ff425a..9b4e41e70 100644 --- a/ios/RCTMLN/RCTMLNBackgroundLayer.h +++ b/ios/MLRN/MLRNRasterLayer.h @@ -1,14 +1,14 @@ // -// RCTMLNBackgroundLayer.h -// RCTMLN +// MLRNRasterLayer.h +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLayer.h" +#import "MLRNLayer.h" @import MapLibre; -@interface RCTMLNBackgroundLayer : RCTMLNLayer +@interface MLRNRasterLayer : MLRNLayer @end diff --git a/ios/RCTMLN/RCTMLNRasterLayer.m b/ios/MLRN/MLRNRasterLayer.m similarity index 74% rename from ios/RCTMLN/RCTMLNRasterLayer.m rename to ios/MLRN/MLRNRasterLayer.m index bf7afea2f..889a6c84a 100644 --- a/ios/RCTMLN/RCTMLNRasterLayer.m +++ b/ios/MLRN/MLRNRasterLayer.m @@ -1,15 +1,15 @@ // -// RCTMLNRasterLayer.m -// RCTMLN +// MLRNRasterLayer.m +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNRasterLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNRasterLayer.h" +#import "MLRNStyle.h" -@implementation RCTMLNRasterLayer +@implementation MLRNRasterLayer - (MLNStyleLayer*)makeLayer:(MLNStyle*)style { @@ -21,7 +21,7 @@ - (MLNStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style rasterLayer:(MLNRasterStyleLayer*)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; }]; diff --git a/ios/RCTMLN/RCTMLNRasterLayerManager.h b/ios/MLRN/MLRNRasterLayerManager.h similarity index 59% rename from ios/RCTMLN/RCTMLNRasterLayerManager.h rename to ios/MLRN/MLRNRasterLayerManager.h index 5634fbaf1..236b217da 100644 --- a/ios/RCTMLN/RCTMLNRasterLayerManager.h +++ b/ios/MLRN/MLRNRasterLayerManager.h @@ -1,6 +1,6 @@ // -// RCTMLNRasterLayerManager.h -// RCTMLN +// MLRNRasterLayerManager.h +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNRasterLayerManager : ViewManager +@interface MLRNRasterLayerManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNRasterLayerManager.m b/ios/MLRN/MLRNRasterLayerManager.m similarity index 74% rename from ios/RCTMLN/RCTMLNRasterLayerManager.m rename to ios/MLRN/MLRNRasterLayerManager.m index 5aa41cd2a..0ad26f075 100644 --- a/ios/RCTMLN/RCTMLNRasterLayerManager.m +++ b/ios/MLRN/MLRNRasterLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNRasterLayerManager.m -// RCTMLN +// MLRNRasterLayerManager.m +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNRasterLayerManager.h" -#import "RCTMLNRasterLayer.h" +#import "MLRNRasterLayerManager.h" +#import "MLRNRasterLayer.h" -@implementation RCTMLNRasterLayerManager +@implementation MLRNRasterLayerManager RCT_EXPORT_MODULE() @@ -27,7 +27,7 @@ @implementation RCTMLNRasterLayerManager - (UIView*)view { - RCTMLNRasterLayer *layer = [[RCTMLNRasterLayer alloc] init]; + MLRNRasterLayer *layer = [[MLRNRasterLayer alloc] init]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNRasterSource.h b/ios/MLRN/MLRNRasterSource.h similarity index 61% rename from ios/RCTMLN/RCTMLNRasterSource.h rename to ios/MLRN/MLRNRasterSource.h index 8417fc433..685324e6a 100644 --- a/ios/RCTMLN/RCTMLNRasterSource.h +++ b/ios/MLRN/MLRNRasterSource.h @@ -1,15 +1,15 @@ // -// RCTMLNRasterSource.h -// RCTMLN +// MLRNRasterSource.h +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNTileSource.h" +#import "MLRNTileSource.h" @import MapLibre; -@interface RCTMLNRasterSource : RCTMLNTileSource +@interface MLRNRasterSource : MLRNTileSource @property (nonatomic, strong) NSNumber *tileSize; diff --git a/ios/RCTMLN/RCTMLNRasterSource.m b/ios/MLRN/MLRNRasterSource.m similarity index 90% rename from ios/RCTMLN/RCTMLNRasterSource.m rename to ios/MLRN/MLRNRasterSource.m index 1b4750e1e..2faa2af93 100644 --- a/ios/RCTMLN/RCTMLNRasterSource.m +++ b/ios/MLRN/MLRNRasterSource.m @@ -1,14 +1,14 @@ // -// RCTMLNRasterSource.m -// RCTMLN +// MLRNRasterSource.m +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNRasterSource.h" +#import "MLRNRasterSource.h" -@implementation RCTMLNRasterSource +@implementation MLRNRasterSource - (nullable MLNSource*)makeSource { diff --git a/ios/RCTMLN/RCTMLNBackgroundLayerManager.h b/ios/MLRN/MLRNRasterSourceManager.h similarity index 57% rename from ios/RCTMLN/RCTMLNBackgroundLayerManager.h rename to ios/MLRN/MLRNRasterSourceManager.h index 86736882a..1c4b0c8aa 100644 --- a/ios/RCTMLN/RCTMLNBackgroundLayerManager.h +++ b/ios/MLRN/MLRNRasterSourceManager.h @@ -1,6 +1,6 @@ // -// RCTMLNBackgroundLayerManager.h -// RCTMLN +// MLRNRasterSourceManager.h +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,6 +8,6 @@ #import "ViewManager.h" -@interface RCTMLNBackgroundLayerManager : ViewManager +@interface MLRNRasterSourceManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNRasterSourceManager.m b/ios/MLRN/MLRNRasterSourceManager.m similarity index 72% rename from ios/RCTMLN/RCTMLNRasterSourceManager.m rename to ios/MLRN/MLRNRasterSourceManager.m index 656c2df00..5c7ba3c63 100644 --- a/ios/RCTMLN/RCTMLNRasterSourceManager.m +++ b/ios/MLRN/MLRNRasterSourceManager.m @@ -1,15 +1,15 @@ // -// RCTMLNRasterSourceManager.m -// RCTMLN +// MLRNRasterSourceManager.m +// MLRN // // Created by Nick Italiano on 9/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNRasterSourceManager.h" -#import "RCTMLNRasterSource.h" +#import "MLRNRasterSourceManager.h" +#import "MLRNRasterSource.h" -@implementation RCTMLNRasterSourceManager +@implementation MLRNRasterSourceManager RCT_EXPORT_MODULE() @@ -26,7 +26,7 @@ @implementation RCTMLNRasterSourceManager - (UIView*)view { - return [RCTMLNRasterSource new]; + return [MLRNRasterSource new]; } @end diff --git a/ios/RCTMLN/RCTMLNShapeSource.h b/ios/MLRN/MLRNShapeSource.h similarity index 95% rename from ios/RCTMLN/RCTMLNShapeSource.h rename to ios/MLRN/MLRNShapeSource.h index ac2ac1917..5aad10157 100644 --- a/ios/RCTMLN/RCTMLNShapeSource.h +++ b/ios/MLRN/MLRNShapeSource.h @@ -1,17 +1,17 @@ // -// RCTMLNShapeSource.h -// RCTMLN +// MLRNShapeSource.h +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNSource.h" +#import "MLRNSource.h" @import MapLibre; -@interface RCTMLNShapeSource : RCTMLNSource +@interface MLRNShapeSource : MLRNSource @property (nonatomic, weak) RCTBridge *bridge; diff --git a/ios/RCTMLN/RCTMLNShapeSource.m b/ios/MLRN/MLRNShapeSource.m similarity index 90% rename from ios/RCTMLN/RCTMLNShapeSource.m rename to ios/MLRN/MLRNShapeSource.m index 798e1c84a..6dff87611 100644 --- a/ios/RCTMLN/RCTMLNShapeSource.m +++ b/ios/MLRN/MLRNShapeSource.m @@ -1,16 +1,16 @@ // -// RCTMLNShapeSource.m -// RCTMLN +// MLRNShapeSource.m +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNShapeSource.h" -#import "RCTMLNUtils.h" -#import "RCTMLNMapView.h" +#import "MLRNShapeSource.h" +#import "MLRNUtils.h" +#import "MLRNMapView.h" -@implementation RCTMLNShapeSource +@implementation MLRNShapeSource static UIImage * _placeHolderImage; @@ -29,7 +29,7 @@ - (void)setShape:(NSString *)shape if (self.source != nil) { MLNShapeSource *source = (MLNShapeSource *)self.source; - [source setShape: shape == nil ? nil : [RCTMLNUtils shapeFromGeoJSON:_shape]]; + [source setShape: shape == nil ? nil : [MLRNUtils shapeFromGeoJSON:_shape]]; } } @@ -55,7 +55,7 @@ - (nullable MLNSource*)makeSource NSDictionary *options = [self _getOptions]; if (_shape != nil) { - MLNShape *shape = [RCTMLNUtils shapeFromGeoJSON:_shape]; + MLNShape *shape = [MLRNUtils shapeFromGeoJSON:_shape]; return [[MLNShapeSource alloc] initWithIdentifier:self.id shape:shape options:options]; } @@ -126,7 +126,7 @@ - (double)getClusterExpansionZoom:(nonnull NSString *)featureJSON { MLNShapeSource *shapeSource = (MLNShapeSource *)self.source; - MLNPointFeature *feature = (MLNPointFeature*)[RCTMLNUtils shapeFromGeoJSON:featureJSON]; + MLNPointFeature *feature = (MLNPointFeature*)[MLRNUtils shapeFromGeoJSON:featureJSON]; return [shapeSource zoomLevelForExpandingCluster:(MLNPointFeatureCluster *)feature]; } @@ -137,7 +137,7 @@ - (double)getClusterExpansionZoom:(nonnull NSString *)featureJSON { MLNShapeSource *shapeSource = (MLNShapeSource *)self.source; - MLNPointFeature *feature = (MLNPointFeature*)[RCTMLNUtils shapeFromGeoJSON:featureJSON]; + MLNPointFeature *feature = (MLNPointFeature*)[MLRNUtils shapeFromGeoJSON:featureJSON]; MLNPointFeatureCluster * cluster = (MLNPointFeatureCluster *)feature; return [shapeSource leavesOfCluster:cluster offset:offset limit:number]; @@ -147,7 +147,7 @@ - (double)getClusterExpansionZoom:(nonnull NSString *)featureJSON { MLNShapeSource *shapeSource = (MLNShapeSource *)self.source; - MLNPointFeature *feature = (MLNPointFeature*)[RCTMLNUtils shapeFromGeoJSON:featureJSON]; + MLNPointFeature *feature = (MLNPointFeature*)[MLRNUtils shapeFromGeoJSON:featureJSON]; MLNPointFeatureCluster * cluster = (MLNPointFeatureCluster *)feature; return [shapeSource childrenOfCluster:cluster]; diff --git a/ios/RCTMLN/RCTMLNShapeSourceManager.h b/ios/MLRN/MLRNShapeSourceManager.h similarity index 61% rename from ios/RCTMLN/RCTMLNShapeSourceManager.h rename to ios/MLRN/MLRNShapeSourceManager.h index 7295ba4d3..99e55480b 100644 --- a/ios/RCTMLN/RCTMLNShapeSourceManager.h +++ b/ios/MLRN/MLRNShapeSourceManager.h @@ -1,6 +1,6 @@ // -// RCTMLNShapeSourceManager.h -// RCTMLN +// MLRNShapeSourceManager.h +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,6 +9,6 @@ #import "ViewManager.h" #import -@interface RCTMLNShapeSourceManager : ViewManager +@interface MLRNShapeSourceManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNShapeSourceManager.m b/ios/MLRN/MLRNShapeSourceManager.m similarity index 84% rename from ios/RCTMLN/RCTMLNShapeSourceManager.m rename to ios/MLRN/MLRNShapeSourceManager.m index 98d41bf47..f558ff21b 100644 --- a/ios/RCTMLN/RCTMLNShapeSourceManager.m +++ b/ios/MLRN/MLRNShapeSourceManager.m @@ -1,20 +1,20 @@ // -// RCTMLNShapeSourceManager.m -// RCTMLN +// MLRNShapeSourceManager.m +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNShapeSourceManager.h" -#import "RCTMLNShapeSource.h" +#import "MLRNShapeSourceManager.h" +#import "MLRNShapeSource.h" #import "FilterParser.h" -@implementation RCTMLNShapeSourceManager +@implementation MLRNShapeSourceManager -RCT_EXPORT_MODULE(RCTMLNShapeSource) +RCT_EXPORT_MODULE(MLRNShapeSource) RCT_EXPORT_VIEW_PROPERTY(id, NSString) RCT_EXPORT_VIEW_PROPERTY(url, NSString) @@ -36,7 +36,7 @@ @implementation RCTMLNShapeSourceManager - (UIView*)view { - RCTMLNShapeSource *source = [RCTMLNShapeSource new]; + MLRNShapeSource *source = [MLRNShapeSource new]; source.bridge = self.bridge; return source; } @@ -47,10 +47,10 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = viewRegistry[reactTag]; - if (![shapeSource isKindOfClass:[RCTMLNShapeSource class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![shapeSource isKindOfClass:[MLRNShapeSource class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } @@ -74,10 +74,10 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = (RCTMLNShapeSource *)viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = (MLRNShapeSource *)viewRegistry[reactTag]; - if (![shapeSource isKindOfClass:[RCTMLNShapeSource class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![shapeSource isKindOfClass:[MLRNShapeSource class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } @@ -99,7 +99,7 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = (RCTMLNShapeSource *)viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = (MLRNShapeSource *)viewRegistry[reactTag]; NSArray> *shapes = [shapeSource getClusterLeaves:featureJSON number:number offset:offset]; @@ -120,7 +120,7 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = (RCTMLNShapeSource *)viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = (MLRNShapeSource *)viewRegistry[reactTag]; NSArray> *shapes = [shapeSource getClusterChildren: featureJSON]; @@ -142,10 +142,10 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = (RCTMLNShapeSource *)viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = (MLRNShapeSource *)viewRegistry[reactTag]; - if (![shapeSource isKindOfClass:[RCTMLNShapeSource class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![shapeSource isKindOfClass:[MLRNShapeSource class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } @@ -167,7 +167,7 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = (RCTMLNShapeSource *)viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = (MLRNShapeSource *)viewRegistry[reactTag]; NSArray> *shapes = [shapeSource getClusterLeavesById:clusterId number:number offset:offset]; @@ -188,7 +188,7 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNShapeSource* shapeSource = (RCTMLNShapeSource *)viewRegistry[reactTag]; + MLRNShapeSource* shapeSource = (MLRNShapeSource *)viewRegistry[reactTag]; NSArray> *shapes = [shapeSource getClusterChildrenById: clusterId]; diff --git a/ios/RCTMLN/RCTMLNSource.h b/ios/MLRN/MLRNSource.h similarity index 80% rename from ios/RCTMLN/RCTMLNSource.h rename to ios/MLRN/MLRNSource.h index bebac8e41..fbe7e6565 100644 --- a/ios/RCTMLN/RCTMLNSource.h +++ b/ios/MLRN/MLRNSource.h @@ -1,24 +1,24 @@ // // BaseSource.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNLayer.h" +#import "MLRNLayer.h" #import @import MapLibre; -@interface RCTMLNSource : UIView +@interface MLRNSource : UIView extern NSString * _Nonnull const DEFAULT_SOURCE_ID; @property (nonatomic, strong) NSMutableArray> *reactSubviews; -@property (nonatomic, strong) NSMutableArray *layers; +@property (nonatomic, strong) NSMutableArray *layers; @property (nonatomic, strong) MLNSource *source; -@property (nonatomic, strong) RCTMLNMapView *map; +@property (nonatomic, strong) MLRNMapView *map; @property (nonatomic, strong) NSDictionary *hitbox; @property (nonatomic, copy) NSString *id; diff --git a/ios/RCTMLN/RCTMLNSource.m b/ios/MLRN/MLRNSource.m similarity index 85% rename from ios/RCTMLN/RCTMLNSource.m rename to ios/MLRN/MLRNSource.m index 92ea10b47..10fc0d9e4 100644 --- a/ios/RCTMLN/RCTMLNSource.m +++ b/ios/MLRN/MLRNSource.m @@ -1,17 +1,17 @@ // // BaseSource.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNSource.h" +#import "MLRNSource.h" #import -#import "RCTMLNMapView.h" +#import "MLRNMapView.h" #import -@implementation RCTMLNSource +@implementation MLRNSource double const DEFAULT_HITBOX_AREA = 44.0; NSString *const DEFAULT_SOURCE_ID = @"composite"; @@ -30,8 +30,8 @@ - (instancetype)initWithFrame:(CGRect)frame #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-missing-super-calls" - (void)insertReactSubview:(id)subview atIndex:(NSInteger)atIndex { - if ([subview isKindOfClass:[RCTMLNLayer class]]) { - RCTMLNLayer *layer = (RCTMLNLayer*)subview; + if ([subview isKindOfClass:[MLRNLayer class]]) { + MLRNLayer *layer = (MLRNLayer*)subview; if (_map.style != nil) { [layer addToMap:_map style:_map.style]; @@ -46,8 +46,8 @@ - (void)insertReactSubview:(id)subview atIndex:(NSInteger)atIndex #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-missing-super-calls" - (void)removeReactSubview:(id)subview { - if ([subview isKindOfClass:[RCTMLNLayer class]]) { - RCTMLNLayer *layer = (RCTMLNLayer*)subview; + if ([subview isKindOfClass:[MLRNLayer class]]) { + MLRNLayer *layer = (MLRNLayer*)subview; [layer removeFromMap:_map.style]; [_layers removeObject:layer]; [_reactSubviews removeObject:layer]; @@ -62,7 +62,7 @@ - (void)removeReactSubview:(id)subview { } #pragma clang diagnostic pop -- (void)setMap:(RCTMLNMapView *)map +- (void)setMap:(MLRNMapView *)map { if (map == nil) { [self removeFromMap]; @@ -93,7 +93,7 @@ - (void)addToMap if (_layers.count > 0) { for (int i = 0; i < _layers.count; i++) { - RCTMLNLayer *layer = [_layers objectAtIndex:i]; + MLRNLayer *layer = [_layers objectAtIndex:i]; [layer addToMap:_map style:_map.style]; } } @@ -106,11 +106,11 @@ - (void)removeFromMap } for (int i = 0; i < _layers.count; i++) { - RCTMLNLayer *layer = [_layers objectAtIndex:i]; + MLRNLayer *layer = [_layers objectAtIndex:i]; [layer removeFromMap:_map.style]; } - if (![RCTMLNSource isDefaultSource:_id]) { + if (![MLRNSource isDefaultSource:_id]) { if (_source != nil) { [_map.style removeSource:_source]; } @@ -128,7 +128,7 @@ - (nullable MLNSource*)makeSource { NSMutableArray *layerIDs = [[NSMutableArray alloc] init]; - for (RCTMLNLayer *layer in _layers) { + for (MLRNLayer *layer in _layers) { [layerIDs addObject:layer.id]; } diff --git a/ios/RCTMLN/RCTMLNStyle.h b/ios/MLRN/MLRNStyle.h similarity index 58% rename from ios/RCTMLN/RCTMLNStyle.h rename to ios/MLRN/MLRNStyle.h index 549405305..cc340fd5d 100644 --- a/ios/RCTMLN/RCTMLNStyle.h +++ b/ios/MLRN/MLRNStyle.h @@ -1,13 +1,13 @@ // DO NOT MODIFY -// This file is auto-generated from scripts/templates/RCTMLNStyle.h.ejs +// This file is auto-generated from scripts/templates/MLRNStyle.h.ejs -#import "RCTMLNStyle.h" -#import "RCTMLNStyleValue.h" +#import "MLRNStyle.h" +#import "MLRNStyleValue.h" #import @import MapLibre; -@interface RCTMLNStyle : NSObject +@interface MLRNStyle : NSObject @property (nonatomic, weak) RCTBridge *bridge; @property (nonatomic, strong) MLNStyle *style; @@ -25,199 +25,199 @@ - (void)backgroundLayer:(MLNBackgroundStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle isValid:(BOOL (^)(void)) isValid; - (void)lightLayer:(MLNLight *)layer withReactStyle:(NSDictionary *)reactStyle isValid:(BOOL (^)(void)) isValid; -- (void)setFillSortKey:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillStyleLayerVisibility:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillAntialias:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillOpacity:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillOpacityTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillColor:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillOutlineColor:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillOutlineColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillTranslate:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillTranslateTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillTranslateAnchor:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillPattern:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillPatternTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineCap:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineJoin:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineMiterLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineRoundLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineSortKey:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineStyleLayerVisibility:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineOpacity:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineOpacityTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineColor:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineColorTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineTranslate:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineTranslateTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineTranslateAnchor:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineGapWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineGapWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineOffset:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineOffsetTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineBlur:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineBlurTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineDasharray:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineDasharrayTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLinePattern:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLinePatternTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setLineGradient:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setSymbolPlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setSymbolSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setSymbolAvoidEdges:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setSymbolSortKey:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setSymbolZOrder:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconTextFit:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconTextFitPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconImage:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextField:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextFont:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextMaxWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextLineHeight:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextLetterSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextJustify:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextRadialOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextVariableAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextMaxAngle:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextWritingMode:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextTransform:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setSymbolStyleLayerVisibility:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIconTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setTextTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleSortKey:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStyleLayerVisibility:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleRadius:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleRadiusTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleBlur:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleBlurTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleTranslate:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleTranslateTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleTranslateAnchor:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCirclePitchScale:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCirclePitchAlignment:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStrokeWidth:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStrokeWidthTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStrokeColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStrokeColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStrokeOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setCircleStrokeOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapStyleLayerVisibility:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapRadius:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapRadiusTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapWeight:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapIntensity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapIntensityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapColor:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapOpacity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHeatmapOpacityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionStyleLayerVisibility:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionOpacity:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionOpacityTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionColor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionColorTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionTranslate:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionTranslateTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionTranslateAnchor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionPattern:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionPatternTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionHeight:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionHeightTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionBase:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterOpacity:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterOpacityTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterHueRotate:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterHueRotateTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterBrightnessMin:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterBrightnessMinTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterBrightnessMax:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterBrightnessMaxTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterSaturation:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterSaturationTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterContrast:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterContrastTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterResampling:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setRasterFadeDuration:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeStyleLayerVisibility:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeIlluminationDirection:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeIlluminationAnchor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeExaggeration:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeExaggerationTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeShadowColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeShadowColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeHighlightColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeHighlightColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeAccentColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setHillshadeAccentColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundStyleLayerVisibility:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundColor:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundColorTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundPattern:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundPatternTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundOpacity:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setBackgroundOpacityTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setAnchor:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setPosition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setPositionTransition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setColor:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setColorTransition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIntensity:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; -- (void)setIntensityTransition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; +- (void)setFillSortKey:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillStyleLayerVisibility:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillAntialias:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillOpacity:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillOpacityTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillColor:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillOutlineColor:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillOutlineColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillTranslate:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillTranslateTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillTranslateAnchor:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillPattern:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillPatternTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineCap:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineJoin:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineMiterLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineRoundLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineSortKey:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineStyleLayerVisibility:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineOpacity:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineOpacityTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineColor:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineColorTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineTranslate:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineTranslateTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineTranslateAnchor:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineGapWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineGapWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineOffset:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineOffsetTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineBlur:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineBlurTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineDasharray:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineDasharrayTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLinePattern:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLinePatternTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setLineGradient:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setSymbolPlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setSymbolSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setSymbolAvoidEdges:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setSymbolSortKey:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setSymbolZOrder:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconTextFit:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconTextFitPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconImage:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextField:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextFont:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextMaxWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextLineHeight:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextLetterSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextJustify:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextRadialOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextVariableAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextMaxAngle:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextWritingMode:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextTransform:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setSymbolStyleLayerVisibility:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIconTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setTextTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleSortKey:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStyleLayerVisibility:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleRadius:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleRadiusTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleBlur:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleBlurTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleTranslate:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleTranslateTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleTranslateAnchor:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCirclePitchScale:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCirclePitchAlignment:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStrokeWidth:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStrokeWidthTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStrokeColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStrokeColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStrokeOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setCircleStrokeOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapStyleLayerVisibility:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapRadius:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapRadiusTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapWeight:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapIntensity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapIntensityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapColor:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapOpacity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHeatmapOpacityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionStyleLayerVisibility:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionOpacity:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionOpacityTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionColor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionColorTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionTranslate:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionTranslateTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionTranslateAnchor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionPattern:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionPatternTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionHeight:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionHeightTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionBase:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterOpacity:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterOpacityTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterHueRotate:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterHueRotateTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterBrightnessMin:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterBrightnessMinTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterBrightnessMax:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterBrightnessMaxTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterSaturation:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterSaturationTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterContrast:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterContrastTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterResampling:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setRasterFadeDuration:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeStyleLayerVisibility:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeIlluminationDirection:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeIlluminationAnchor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeExaggeration:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeExaggerationTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeShadowColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeShadowColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeHighlightColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeHighlightColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeAccentColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setHillshadeAccentColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundStyleLayerVisibility:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundColor:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundColorTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundPattern:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundPatternTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundOpacity:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setBackgroundOpacityTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setAnchor:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setPosition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setPositionTransition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setColor:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setColorTransition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIntensity:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; +- (void)setIntensityTransition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; @end diff --git a/ios/RCTMLN/RCTMLNStyle.m b/ios/MLRN/MLRNStyle.m similarity index 84% rename from ios/RCTMLN/RCTMLNStyle.m rename to ios/MLRN/MLRNStyle.m index a6b13d531..a982d12ea 100644 --- a/ios/RCTMLN/RCTMLNStyle.m +++ b/ios/MLRN/MLRNStyle.m @@ -1,10 +1,10 @@ // DO NOT MODIFY -// This file is auto-generated from scripts/templates/RCTMLNStyle.m.ejs +// This file is auto-generated from scripts/templates/MLRNStyle.m.ejs -#import "RCTMLNStyle.h" -#import "RCTMLNUtils.h" +#import "MLRNStyle.h" +#import "MLRNUtils.h" -@implementation RCTMLNStyle +@implementation MLRNStyle - (id)initWithMLNStyle:(MLNStyle*)mlnStyle { @@ -28,7 +28,7 @@ - (void)fillLayer:(MLNFillStyleLayer *)layer withReactStyle:(NSDictionary *)reac continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"fillSortKey"]) { [self setFillSortKey:layer withReactStyleValue:styleValue]; @@ -60,7 +60,7 @@ - (void)fillLayer:(MLNFillStyleLayer *)layer withReactStyle:(NSDictionary *)reac } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMLNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [MLRNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ if (isValid()) { @@ -92,7 +92,7 @@ - (void)lineLayer:(MLNLineStyleLayer *)layer withReactStyle:(NSDictionary *)reac continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"lineCap"]) { [self setLineCap:layer withReactStyleValue:styleValue]; @@ -146,7 +146,7 @@ - (void)lineLayer:(MLNLineStyleLayer *)layer withReactStyle:(NSDictionary *)reac } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMLNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [MLRNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ if (isValid()) { @@ -180,7 +180,7 @@ - (void)symbolLayer:(MLNSymbolStyleLayer *)layer withReactStyle:(NSDictionary *) continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"symbolPlacement"]) { [self setSymbolPlacement:layer withReactStyleValue:styleValue]; @@ -212,7 +212,7 @@ - (void)symbolLayer:(MLNSymbolStyleLayer *)layer withReactStyle:(NSDictionary *) } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMLNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [MLRNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ if (isValid()) { @@ -352,7 +352,7 @@ - (void)circleLayer:(MLNCircleStyleLayer *)layer withReactStyle:(NSDictionary *) continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"circleSortKey"]) { [self setCircleSortKey:layer withReactStyleValue:styleValue]; @@ -415,7 +415,7 @@ - (void)heatmapLayer:(MLNHeatmapStyleLayer *)layer withReactStyle:(NSDictionary continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"visibility"]) { [self setHeatmapStyleLayerVisibility:layer withReactStyleValue:styleValue]; @@ -454,7 +454,7 @@ - (void)fillExtrusionLayer:(MLNFillExtrusionStyleLayer *)layer withReactStyle:(N continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"visibility"]) { [self setFillExtrusionStyleLayerVisibility:layer withReactStyleValue:styleValue]; @@ -478,7 +478,7 @@ - (void)fillExtrusionLayer:(MLNFillExtrusionStyleLayer *)layer withReactStyle:(N } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMLNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [MLRNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ if (isValid()) { @@ -520,7 +520,7 @@ - (void)rasterLayer:(MLNRasterStyleLayer *)layer withReactStyle:(NSDictionary *) continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"visibility"]) { [self setRasterStyleLayerVisibility:layer withReactStyleValue:styleValue]; @@ -571,7 +571,7 @@ - (void)hillshadeLayer:(MLNHillshadeStyleLayer *)layer withReactStyle:(NSDiction continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"visibility"]) { [self setHillshadeStyleLayerVisibility:layer withReactStyleValue:styleValue]; @@ -614,7 +614,7 @@ - (void)backgroundLayer:(MLNBackgroundStyleLayer *)layer withReactStyle:(NSDicti continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"visibility"]) { [self setBackgroundStyleLayerVisibility:layer withReactStyleValue:styleValue]; @@ -628,7 +628,7 @@ - (void)backgroundLayer:(MLNBackgroundStyleLayer *)layer withReactStyle:(NSDicti } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMLNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [MLRNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ if (isValid()) { @@ -664,7 +664,7 @@ - (void)lightLayer:(MLNLight *)layer withReactStyle:(NSDictionary *)reactStyle i continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; if ([prop isEqualToString:@"anchor"]) { [self setAnchor:layer withReactStyleValue:styleValue]; @@ -689,985 +689,985 @@ - (void)lightLayer:(MLNLight *)layer withReactStyle:(NSDictionary *)reactStyle i -- (void)setFillSortKey:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillSortKey:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillSortKey = styleValue.mlnStyleValue; } -- (void)setFillStyleLayerVisibility:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillStyleLayerVisibility:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setFillAntialias:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillAntialias:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillAntialiased = styleValue.mlnStyleValue; } -- (void)setFillOpacity:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillOpacity:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillOpacity = styleValue.mlnStyleValue; } -- (void)setFillOpacityTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillOpacityTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillOpacityTransition = [styleValue getTransition]; } -- (void)setFillColor:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillColor:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillColor = styleValue.mlnStyleValue; } -- (void)setFillColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillColorTransition = [styleValue getTransition]; } -- (void)setFillOutlineColor:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillOutlineColor:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillOutlineColor = styleValue.mlnStyleValue; } -- (void)setFillOutlineColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillOutlineColorTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillOutlineColorTransition = [styleValue getTransition]; } -- (void)setFillTranslate:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillTranslate:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillTranslation = styleValue.mlnStyleValue; } -- (void)setFillTranslateTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillTranslateTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillTranslationTransition = [styleValue getTransition]; } -- (void)setFillTranslateAnchor:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillTranslateAnchor:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillTranslationAnchor = styleValue.mlnStyleValue; } -- (void)setFillPattern:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillPattern:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillPattern = styleValue.mlnStyleValue; } -- (void)setFillPatternTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillPatternTransition:(MLNFillStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillPatternTransition = [styleValue getTransition]; } -- (void)setLineCap:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineCap:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineCap = styleValue.mlnStyleValue; } -- (void)setLineJoin:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineJoin:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineJoin = styleValue.mlnStyleValue; } -- (void)setLineMiterLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineMiterLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineMiterLimit = styleValue.mlnStyleValue; } -- (void)setLineRoundLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineRoundLimit:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineRoundLimit = styleValue.mlnStyleValue; } -- (void)setLineSortKey:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineSortKey:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineSortKey = styleValue.mlnStyleValue; } -- (void)setLineStyleLayerVisibility:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineStyleLayerVisibility:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setLineOpacity:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineOpacity:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineOpacity = styleValue.mlnStyleValue; } -- (void)setLineOpacityTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineOpacityTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineOpacityTransition = [styleValue getTransition]; } -- (void)setLineColor:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineColor:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineColor = styleValue.mlnStyleValue; } -- (void)setLineColorTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineColorTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineColorTransition = [styleValue getTransition]; } -- (void)setLineTranslate:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineTranslate:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineTranslation = styleValue.mlnStyleValue; } -- (void)setLineTranslateTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineTranslateTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineTranslationTransition = [styleValue getTransition]; } -- (void)setLineTranslateAnchor:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineTranslateAnchor:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineTranslationAnchor = styleValue.mlnStyleValue; } -- (void)setLineWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineWidth = styleValue.mlnStyleValue; } -- (void)setLineWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineWidthTransition = [styleValue getTransition]; } -- (void)setLineGapWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineGapWidth:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineGapWidth = styleValue.mlnStyleValue; } -- (void)setLineGapWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineGapWidthTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineGapWidthTransition = [styleValue getTransition]; } -- (void)setLineOffset:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineOffset:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineOffset = styleValue.mlnStyleValue; } -- (void)setLineOffsetTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineOffsetTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineOffsetTransition = [styleValue getTransition]; } -- (void)setLineBlur:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineBlur:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineBlur = styleValue.mlnStyleValue; } -- (void)setLineBlurTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineBlurTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineBlurTransition = [styleValue getTransition]; } -- (void)setLineDasharray:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineDasharray:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineDashPattern = styleValue.mlnStyleValue; } -- (void)setLineDasharrayTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineDasharrayTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineDashPatternTransition = [styleValue getTransition]; } -- (void)setLinePattern:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLinePattern:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.linePattern = styleValue.mlnStyleValue; } -- (void)setLinePatternTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLinePatternTransition:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.linePatternTransition = [styleValue getTransition]; } -- (void)setLineGradient:(MLNLineStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setLineGradient:(MLNLineStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.lineGradient = styleValue.mlnStyleValue; } -- (void)setSymbolPlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setSymbolPlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.symbolPlacement = styleValue.mlnStyleValue; } -- (void)setSymbolSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setSymbolSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.symbolSpacing = styleValue.mlnStyleValue; } -- (void)setSymbolAvoidEdges:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setSymbolAvoidEdges:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.symbolAvoidsEdges = styleValue.mlnStyleValue; } -- (void)setSymbolSortKey:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setSymbolSortKey:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.symbolSortKey = styleValue.mlnStyleValue; } -- (void)setSymbolZOrder:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setSymbolZOrder:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.symbolZOrder = styleValue.mlnStyleValue; } -- (void)setIconAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconAllowsOverlap = styleValue.mlnStyleValue; } -- (void)setIconIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconIgnoresPlacement = styleValue.mlnStyleValue; } -- (void)setIconOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconOptional = styleValue.mlnStyleValue; } -- (void)setIconRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconRotationAlignment = styleValue.mlnStyleValue; } -- (void)setIconSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconScale = styleValue.mlnStyleValue; } -- (void)setIconTextFit:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconTextFit:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconTextFit = styleValue.mlnStyleValue; } -- (void)setIconTextFitPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconTextFitPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconTextFitPadding = styleValue.mlnStyleValue; } -- (void)setIconImage:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconImage:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconImageName = styleValue.mlnStyleValue; } -- (void)setIconRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconRotation = styleValue.mlnStyleValue; } -- (void)setIconPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconPadding = styleValue.mlnStyleValue; } -- (void)setIconKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.keepsIconUpright = styleValue.mlnStyleValue; } -- (void)setIconOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconOffset = styleValue.mlnStyleValue; } -- (void)setIconAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconAnchor = styleValue.mlnStyleValue; } -- (void)setIconPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconPitchAlignment = styleValue.mlnStyleValue; } -- (void)setTextPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextPitchAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textPitchAlignment = styleValue.mlnStyleValue; } -- (void)setTextRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextRotationAlignment:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textRotationAlignment = styleValue.mlnStyleValue; } -- (void)setTextField:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextField:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.text = styleValue.mlnStyleValue; } -- (void)setTextFont:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextFont:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textFontNames = styleValue.mlnStyleValue; } -- (void)setTextSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextSize:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textFontSize = styleValue.mlnStyleValue; } -- (void)setTextMaxWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextMaxWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.maximumTextWidth = styleValue.mlnStyleValue; } -- (void)setTextLineHeight:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextLineHeight:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textLineHeight = styleValue.mlnStyleValue; } -- (void)setTextLetterSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextLetterSpacing:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textLetterSpacing = styleValue.mlnStyleValue; } -- (void)setTextJustify:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextJustify:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textJustification = styleValue.mlnStyleValue; } -- (void)setTextRadialOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextRadialOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textRadialOffset = styleValue.mlnStyleValue; } -- (void)setTextVariableAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextVariableAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textVariableAnchor = styleValue.mlnStyleValue; } -- (void)setTextAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textAnchor = styleValue.mlnStyleValue; } -- (void)setTextMaxAngle:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextMaxAngle:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.maximumTextAngle = styleValue.mlnStyleValue; } -- (void)setTextWritingMode:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextWritingMode:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textWritingModes = styleValue.mlnStyleValue; } -- (void)setTextRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextRotate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textRotation = styleValue.mlnStyleValue; } -- (void)setTextPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextPadding:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textPadding = styleValue.mlnStyleValue; } -- (void)setTextKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextKeepUpright:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.keepsTextUpright = styleValue.mlnStyleValue; } -- (void)setTextTransform:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextTransform:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textTransform = styleValue.mlnStyleValue; } -- (void)setTextOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextOffset:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textOffset = styleValue.mlnStyleValue; } -- (void)setTextAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextAllowOverlap:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textAllowsOverlap = styleValue.mlnStyleValue; } -- (void)setTextIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextIgnorePlacement:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textIgnoresPlacement = styleValue.mlnStyleValue; } -- (void)setTextOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextOptional:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textOptional = styleValue.mlnStyleValue; } -- (void)setSymbolStyleLayerVisibility:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setSymbolStyleLayerVisibility:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setIconOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconOpacity = styleValue.mlnStyleValue; } -- (void)setIconOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconOpacityTransition = [styleValue getTransition]; } -- (void)setIconColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconColor = styleValue.mlnStyleValue; } -- (void)setIconColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconColorTransition = [styleValue getTransition]; } -- (void)setIconHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconHaloColor = styleValue.mlnStyleValue; } -- (void)setIconHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconHaloColorTransition = [styleValue getTransition]; } -- (void)setIconHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconHaloWidth = styleValue.mlnStyleValue; } -- (void)setIconHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconHaloWidthTransition = [styleValue getTransition]; } -- (void)setIconHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconHaloBlur = styleValue.mlnStyleValue; } -- (void)setIconHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconHaloBlurTransition = [styleValue getTransition]; } -- (void)setIconTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconTranslation = styleValue.mlnStyleValue; } -- (void)setIconTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconTranslationTransition = [styleValue getTransition]; } -- (void)setIconTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIconTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.iconTranslationAnchor = styleValue.mlnStyleValue; } -- (void)setTextOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextOpacity:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textOpacity = styleValue.mlnStyleValue; } -- (void)setTextOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextOpacityTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textOpacityTransition = [styleValue getTransition]; } -- (void)setTextColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textColor = styleValue.mlnStyleValue; } -- (void)setTextColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textColorTransition = [styleValue getTransition]; } -- (void)setTextHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextHaloColor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textHaloColor = styleValue.mlnStyleValue; } -- (void)setTextHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextHaloColorTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textHaloColorTransition = [styleValue getTransition]; } -- (void)setTextHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextHaloWidth:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textHaloWidth = styleValue.mlnStyleValue; } -- (void)setTextHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextHaloWidthTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textHaloWidthTransition = [styleValue getTransition]; } -- (void)setTextHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextHaloBlur:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textHaloBlur = styleValue.mlnStyleValue; } -- (void)setTextHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextHaloBlurTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textHaloBlurTransition = [styleValue getTransition]; } -- (void)setTextTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextTranslate:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textTranslation = styleValue.mlnStyleValue; } -- (void)setTextTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextTranslateTransition:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textTranslationTransition = [styleValue getTransition]; } -- (void)setTextTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setTextTranslateAnchor:(MLNSymbolStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.textTranslationAnchor = styleValue.mlnStyleValue; } -- (void)setCircleSortKey:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleSortKey:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleSortKey = styleValue.mlnStyleValue; } -- (void)setCircleStyleLayerVisibility:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStyleLayerVisibility:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setCircleRadius:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleRadius:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleRadius = styleValue.mlnStyleValue; } -- (void)setCircleRadiusTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleRadiusTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleRadiusTransition = [styleValue getTransition]; } -- (void)setCircleColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleColor = styleValue.mlnStyleValue; } -- (void)setCircleColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleColorTransition = [styleValue getTransition]; } -- (void)setCircleBlur:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleBlur:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleBlur = styleValue.mlnStyleValue; } -- (void)setCircleBlurTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleBlurTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleBlurTransition = [styleValue getTransition]; } -- (void)setCircleOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleOpacity = styleValue.mlnStyleValue; } -- (void)setCircleOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleOpacityTransition = [styleValue getTransition]; } -- (void)setCircleTranslate:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleTranslate:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleTranslation = styleValue.mlnStyleValue; } -- (void)setCircleTranslateTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleTranslateTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleTranslationTransition = [styleValue getTransition]; } -- (void)setCircleTranslateAnchor:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleTranslateAnchor:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleTranslationAnchor = styleValue.mlnStyleValue; } -- (void)setCirclePitchScale:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCirclePitchScale:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleScaleAlignment = styleValue.mlnStyleValue; } -- (void)setCirclePitchAlignment:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCirclePitchAlignment:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circlePitchAlignment = styleValue.mlnStyleValue; } -- (void)setCircleStrokeWidth:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStrokeWidth:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleStrokeWidth = styleValue.mlnStyleValue; } -- (void)setCircleStrokeWidthTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStrokeWidthTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleStrokeWidthTransition = [styleValue getTransition]; } -- (void)setCircleStrokeColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStrokeColor:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleStrokeColor = styleValue.mlnStyleValue; } -- (void)setCircleStrokeColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStrokeColorTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleStrokeColorTransition = [styleValue getTransition]; } -- (void)setCircleStrokeOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStrokeOpacity:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleStrokeOpacity = styleValue.mlnStyleValue; } -- (void)setCircleStrokeOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setCircleStrokeOpacityTransition:(MLNCircleStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.circleStrokeOpacityTransition = [styleValue getTransition]; } -- (void)setHeatmapStyleLayerVisibility:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapStyleLayerVisibility:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setHeatmapRadius:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapRadius:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapRadius = styleValue.mlnStyleValue; } -- (void)setHeatmapRadiusTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapRadiusTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapRadiusTransition = [styleValue getTransition]; } -- (void)setHeatmapWeight:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapWeight:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapWeight = styleValue.mlnStyleValue; } -- (void)setHeatmapIntensity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapIntensity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapIntensity = styleValue.mlnStyleValue; } -- (void)setHeatmapIntensityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapIntensityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapIntensityTransition = [styleValue getTransition]; } -- (void)setHeatmapColor:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapColor:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapColor = styleValue.mlnStyleValue; } -- (void)setHeatmapOpacity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapOpacity:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapOpacity = styleValue.mlnStyleValue; } -- (void)setHeatmapOpacityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHeatmapOpacityTransition:(MLNHeatmapStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.heatmapOpacityTransition = [styleValue getTransition]; } -- (void)setFillExtrusionStyleLayerVisibility:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionStyleLayerVisibility:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setFillExtrusionOpacity:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionOpacity:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionOpacity = styleValue.mlnStyleValue; } -- (void)setFillExtrusionOpacityTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionOpacityTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionOpacityTransition = [styleValue getTransition]; } -- (void)setFillExtrusionColor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionColor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionColor = styleValue.mlnStyleValue; } -- (void)setFillExtrusionColorTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionColorTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionColorTransition = [styleValue getTransition]; } -- (void)setFillExtrusionTranslate:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionTranslate:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionTranslation = styleValue.mlnStyleValue; } -- (void)setFillExtrusionTranslateTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionTranslateTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionTranslationTransition = [styleValue getTransition]; } -- (void)setFillExtrusionTranslateAnchor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionTranslateAnchor:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionTranslationAnchor = styleValue.mlnStyleValue; } -- (void)setFillExtrusionPattern:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionPattern:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionPattern = styleValue.mlnStyleValue; } -- (void)setFillExtrusionPatternTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionPatternTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionPatternTransition = [styleValue getTransition]; } -- (void)setFillExtrusionHeight:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionHeight:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionHeight = styleValue.mlnStyleValue; } -- (void)setFillExtrusionHeightTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionHeightTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionHeightTransition = [styleValue getTransition]; } -- (void)setFillExtrusionBase:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionBase:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionBase = styleValue.mlnStyleValue; } -- (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionBaseTransition = [styleValue getTransition]; } -- (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.fillExtrusionHasVerticalGradient = styleValue.mlnStyleValue; } -- (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setRasterOpacity:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterOpacity:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterOpacity = styleValue.mlnStyleValue; } -- (void)setRasterOpacityTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterOpacityTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterOpacityTransition = [styleValue getTransition]; } -- (void)setRasterHueRotate:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterHueRotate:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterHueRotation = styleValue.mlnStyleValue; } -- (void)setRasterHueRotateTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterHueRotateTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterHueRotationTransition = [styleValue getTransition]; } -- (void)setRasterBrightnessMin:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterBrightnessMin:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.minimumRasterBrightness = styleValue.mlnStyleValue; } -- (void)setRasterBrightnessMinTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterBrightnessMinTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.minimumRasterBrightnessTransition = [styleValue getTransition]; } -- (void)setRasterBrightnessMax:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterBrightnessMax:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.maximumRasterBrightness = styleValue.mlnStyleValue; } -- (void)setRasterBrightnessMaxTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterBrightnessMaxTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.maximumRasterBrightnessTransition = [styleValue getTransition]; } -- (void)setRasterSaturation:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterSaturation:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterSaturation = styleValue.mlnStyleValue; } -- (void)setRasterSaturationTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterSaturationTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterSaturationTransition = [styleValue getTransition]; } -- (void)setRasterContrast:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterContrast:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterContrast = styleValue.mlnStyleValue; } -- (void)setRasterContrastTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterContrastTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterContrastTransition = [styleValue getTransition]; } -- (void)setRasterResampling:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterResampling:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterResamplingMode = styleValue.mlnStyleValue; } -- (void)setRasterFadeDuration:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setRasterFadeDuration:(MLNRasterStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.rasterFadeDuration = styleValue.mlnStyleValue; } -- (void)setHillshadeStyleLayerVisibility:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeStyleLayerVisibility:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setHillshadeIlluminationDirection:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeIlluminationDirection:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeIlluminationDirection = styleValue.mlnStyleValue; } -- (void)setHillshadeIlluminationAnchor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeIlluminationAnchor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeIlluminationAnchor = styleValue.mlnStyleValue; } -- (void)setHillshadeExaggeration:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeExaggeration:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeExaggeration = styleValue.mlnStyleValue; } -- (void)setHillshadeExaggerationTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeExaggerationTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeExaggerationTransition = [styleValue getTransition]; } -- (void)setHillshadeShadowColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeShadowColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeShadowColor = styleValue.mlnStyleValue; } -- (void)setHillshadeShadowColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeShadowColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeShadowColorTransition = [styleValue getTransition]; } -- (void)setHillshadeHighlightColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeHighlightColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeHighlightColor = styleValue.mlnStyleValue; } -- (void)setHillshadeHighlightColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeHighlightColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeHighlightColorTransition = [styleValue getTransition]; } -- (void)setHillshadeAccentColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeAccentColor:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeAccentColor = styleValue.mlnStyleValue; } -- (void)setHillshadeAccentColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setHillshadeAccentColorTransition:(MLNHillshadeStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.hillshadeAccentColorTransition = [styleValue getTransition]; } -- (void)setBackgroundStyleLayerVisibility:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundStyleLayerVisibility:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.visible = [styleValue isVisible]; } -- (void)setBackgroundColor:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundColor:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.backgroundColor = styleValue.mlnStyleValue; } -- (void)setBackgroundColorTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundColorTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.backgroundColorTransition = [styleValue getTransition]; } -- (void)setBackgroundPattern:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundPattern:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.backgroundPattern = styleValue.mlnStyleValue; } -- (void)setBackgroundPatternTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundPatternTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.backgroundPatternTransition = [styleValue getTransition]; } -- (void)setBackgroundOpacity:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundOpacity:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.backgroundOpacity = styleValue.mlnStyleValue; } -- (void)setBackgroundOpacityTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setBackgroundOpacityTransition:(MLNBackgroundStyleLayer *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.backgroundOpacityTransition = [styleValue getTransition]; } -- (void)setAnchor:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setAnchor:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.anchor = styleValue.mlnStyleValue; } -- (void)setPosition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setPosition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.position = [styleValue getSphericalPosition]; } -- (void)setPositionTransition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setPositionTransition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.positionTransition = [styleValue getTransition]; } -- (void)setColor:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setColor:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.color = styleValue.mlnStyleValue; } -- (void)setColorTransition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setColorTransition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.colorTransition = [styleValue getTransition]; } -- (void)setIntensity:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIntensity:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.intensity = styleValue.mlnStyleValue; } -- (void)setIntensityTransition:(MLNLight *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)setIntensityTransition:(MLNLight *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.intensityTransition = [styleValue getTransition]; } diff --git a/ios/RCTMLN/RCTMLNStyleValue.h b/ios/MLRN/MLRNStyleValue.h similarity index 79% rename from ios/RCTMLN/RCTMLNStyleValue.h rename to ios/MLRN/MLRNStyleValue.h index 29743dc22..5815b197f 100644 --- a/ios/RCTMLN/RCTMLNStyleValue.h +++ b/ios/MLRN/MLRNStyleValue.h @@ -1,6 +1,6 @@ // -// RCTMLNStyleValue.h -// RCTMLN +// MLRNStyleValue.h +// MLRN // // Created by Nick Italiano on 9/11/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,7 +9,7 @@ #import @import MapLibre; -@interface RCTMLNStyleValue : NSObject +@interface MLRNStyleValue : NSObject @property (nonatomic, strong) NSString *styleType; @property (nonatomic, strong) NSDictionary *rawStyleValue; @@ -22,6 +22,6 @@ - (NSExpression *)getSphericalPosition; - (BOOL)isVisible; -+ (RCTMLNStyleValue*)make:(NSString*)expressionJSONStr; ++ (MLRNStyleValue*)make:(NSString*)expressionJSONStr; @end diff --git a/ios/RCTMLN/RCTMLNStyleValue.m b/ios/MLRN/MLRNStyleValue.m similarity index 91% rename from ios/RCTMLN/RCTMLNStyleValue.m rename to ios/MLRN/MLRNStyleValue.m index 3b7db284d..a7cfa0b69 100644 --- a/ios/RCTMLN/RCTMLNStyleValue.m +++ b/ios/MLRN/MLRNStyleValue.m @@ -1,16 +1,16 @@ // -// RCTMLNStyleValue.m -// RCTMLN +// MLRNStyleValue.m +// MLRN // // Created by Nick Italiano on 9/11/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNStyleValue.h" -#import "RCTMLNUtils.h" +#import "MLRNStyleValue.h" +#import "MLRNUtils.h" #import -@implementation RCTMLNStyleValue +@implementation MLRNStyleValue { NSObject *expressionJSON; } @@ -18,19 +18,19 @@ @implementation RCTMLNStyleValue - (NSExpression *)mlnStyleValue { if ([_styleType isEqualToString:@"color"] && [expressionJSON respondsToSelector:@selector(objectEnumerator)] && [[[(NSArray*)expressionJSON objectEnumerator] nextObject] isKindOfClass:[NSNumber class]]) { - UIColor *color = [RCTMLNUtils toColor:expressionJSON]; + UIColor *color = [MLRNUtils toColor:expressionJSON]; return [NSExpression expressionWithMLNJSONObject:color]; } else if ([_styleType isEqualToString:@"color"] && [expressionJSON isKindOfClass:[NSNumber class]]) { - UIColor *color = [RCTMLNUtils toColor:expressionJSON]; + UIColor *color = [MLRNUtils toColor:expressionJSON]; return [NSExpression expressionWithMLNJSONObject:color]; } else if ([_styleType isEqualToString:@"vector"] && [expressionJSON respondsToSelector:@selector(objectEnumerator)] && [[[(NSArray*)expressionJSON objectEnumerator] nextObject] isKindOfClass:[NSNumber class]]) { - CGVector vector = [RCTMLNUtils toCGVector:(NSArray *)expressionJSON]; + CGVector vector = [MLRNUtils toCGVector:(NSArray *)expressionJSON]; return [NSExpression expressionWithMLNJSONObject:[NSValue valueWithCGVector:vector]]; } else if ([_styleType isEqualToString:@"image"] && [expressionJSON isKindOfClass:[NSDictionary class]]) { return [NSExpression expressionForConstantValue:[self getImageURI]]; } else if ([_styleType isEqual:@"edgeinsets"] && [expressionJSON respondsToSelector:@selector(objectEnumerator)] && [[[(NSArray*)expressionJSON objectEnumerator] nextObject] isKindOfClass:[NSNumber class]]){ - UIEdgeInsets edgeInsets = [RCTMLNUtils toUIEdgeInsets:(NSArray *)expressionJSON]; + UIEdgeInsets edgeInsets = [MLRNUtils toUIEdgeInsets:(NSArray *)expressionJSON]; return [NSExpression expressionWithMLNJSONObject:[NSValue valueWithUIEdgeInsets:edgeInsets]]; } else if ([_styleType isEqualToString:@"enum"] && [expressionJSON isKindOfClass:[NSNumber class]]) { // ensure we pass through values as NSUInteger when mapping to an MLN enum @@ -155,9 +155,9 @@ - (BOOL)isVisible return YES; } -+ (RCTMLNStyleValue*)make:(NSDictionary*)rawStyleValue; ++ (MLRNStyleValue*)make:(NSDictionary*)rawStyleValue; { - RCTMLNStyleValue *styleValue = [[RCTMLNStyleValue alloc] init]; + MLRNStyleValue *styleValue = [[MLRNStyleValue alloc] init]; styleValue.styleType = (NSString *)rawStyleValue[@"styletype"]; NSObject *object = [styleValue parse:(NSDictionary *)rawStyleValue[@"stylevalue"]]; [styleValue setStyleObject:object]; diff --git a/ios/RCTMLN/RCTMLNSymbolLayer.h b/ios/MLRN/MLRNSymbolLayer.h similarity index 71% rename from ios/RCTMLN/RCTMLNSymbolLayer.h rename to ios/MLRN/MLRNSymbolLayer.h index 8beeffdad..dd80b6d5c 100644 --- a/ios/RCTMLN/RCTMLNSymbolLayer.h +++ b/ios/MLRN/MLRNSymbolLayer.h @@ -1,15 +1,15 @@ // -// RCTMLNSymbolLayer.h -// RCTMLN +// MLRNSymbolLayer.h +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNVectorLayer.h" +#import "MLRNVectorLayer.h" -@interface RCTMLNSymbolLayer : RCTMLNVectorLayer +@interface MLRNSymbolLayer : MLRNVectorLayer @property (nonatomic, strong) NSMutableArray> *reactSubviews; diff --git a/ios/RCTMLN/RCTMLNSymbolLayer.m b/ios/MLRN/MLRNSymbolLayer.m similarity index 94% rename from ios/RCTMLN/RCTMLNSymbolLayer.m rename to ios/MLRN/MLRNSymbolLayer.m index b55f1cf22..58b42aefe 100644 --- a/ios/RCTMLN/RCTMLNSymbolLayer.m +++ b/ios/MLRN/MLRNSymbolLayer.m @@ -1,17 +1,17 @@ // -// RCTMLNSymbolLayer.m -// RCTMLN +// MLRNSymbolLayer.m +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNSymbolLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNSymbolLayer.h" +#import "MLRNStyle.h" #import #import -@implementation RCTMLNSymbolLayer +@implementation MLRNSymbolLayer - (instancetype)initWithFrame:(CGRect)frame { @@ -99,7 +99,7 @@ - (MLNSymbolStyleLayer*)makeLayer:(MLNStyle*)style - (void)addStyles { - RCTMLNStyle *style = [[RCTMLNStyle alloc] initWithMLNStyle:self.style]; + MLRNStyle *style = [[MLRNStyle alloc] initWithMLNStyle:self.style]; style.bridge = self.bridge; [style symbolLayer:(MLNSymbolStyleLayer*)self.styleLayer withReactStyle:self.reactStyle isValid:^{ return [self isAddedToMap]; }]; diff --git a/ios/MLRN/MLRNSymbolLayerManager.h b/ios/MLRN/MLRNSymbolLayerManager.h new file mode 100644 index 000000000..07a14f2d3 --- /dev/null +++ b/ios/MLRN/MLRNSymbolLayerManager.h @@ -0,0 +1,13 @@ +// +// MLRNSymbolLayerManager.h +// MLRN +// +// Created by Nick Italiano on 9/19/17. +// Copyright © 2017 Mapbox Inc. All rights reserved. +// + +#import "ViewManager.h" + +@interface MLRNSymbolLayerManager : ViewManager + +@end diff --git a/ios/RCTMLN/RCTMLNSymbolLayerManager.m b/ios/MLRN/MLRNSymbolLayerManager.m similarity index 79% rename from ios/RCTMLN/RCTMLNSymbolLayerManager.m rename to ios/MLRN/MLRNSymbolLayerManager.m index 5111ea456..2eb8d740f 100644 --- a/ios/RCTMLN/RCTMLNSymbolLayerManager.m +++ b/ios/MLRN/MLRNSymbolLayerManager.m @@ -1,15 +1,15 @@ // -// RCTMLNSymbolLayerManager.m -// RCTMLN +// MLRNSymbolLayerManager.m +// MLRN // // Created by Nick Italiano on 9/19/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNSymbolLayerManager.h" -#import "RCTMLNSymbolLayer.h" +#import "MLRNSymbolLayerManager.h" +#import "MLRNSymbolLayer.h" -@implementation RCTMLNSymbolLayerManager +@implementation MLRNSymbolLayerManager RCT_EXPORT_MODULE() @@ -32,7 +32,7 @@ @implementation RCTMLNSymbolLayerManager - (UIView*)view { - RCTMLNSymbolLayer *layer = [RCTMLNSymbolLayer new]; + MLRNSymbolLayer *layer = [MLRNSymbolLayer new]; layer.bridge = self.bridge; return layer; } diff --git a/ios/RCTMLN/RCTMLNTileSource.h b/ios/MLRN/MLRNTileSource.h similarity index 79% rename from ios/RCTMLN/RCTMLNTileSource.h rename to ios/MLRN/MLRNTileSource.h index 1a8ff7d5c..b0d0deafa 100644 --- a/ios/RCTMLN/RCTMLNTileSource.h +++ b/ios/MLRN/MLRNTileSource.h @@ -1,12 +1,12 @@ // -// RCTMLNTileSource.h -// RCTMLN +// MLRNTileSource.h +// MLRN // -#import "RCTMLNSource.h" +#import "MLRNSource.h" @import MapLibre; -@interface RCTMLNTileSource : RCTMLNSource +@interface MLRNTileSource : MLRNSource @property (nonatomic, copy) NSString *url; @property (nonatomic, strong) NSArray *tileUrlTemplates; diff --git a/ios/RCTMLN/RCTMLNTileSource.m b/ios/MLRN/MLRNTileSource.m similarity index 90% rename from ios/RCTMLN/RCTMLNTileSource.m rename to ios/MLRN/MLRNTileSource.m index 78765b926..b495cf50b 100644 --- a/ios/RCTMLN/RCTMLNTileSource.m +++ b/ios/MLRN/MLRNTileSource.m @@ -1,11 +1,11 @@ // // BaseSource.m -// RCTMLN +// MLRN // -#import "RCTMLNTileSource.h" +#import "MLRNTileSource.h" -@implementation RCTMLNTileSource +@implementation MLRNTileSource - (NSDictionary*)getOptions { NSMutableDictionary *options = [[NSMutableDictionary alloc] init]; diff --git a/ios/RCTMLN/RCTMLNUserLocation.h b/ios/MLRN/MLRNUserLocation.h similarity index 73% rename from ios/RCTMLN/RCTMLNUserLocation.h rename to ios/MLRN/MLRNUserLocation.h index 8df54436a..41782f4c3 100644 --- a/ios/RCTMLN/RCTMLNUserLocation.h +++ b/ios/MLRN/MLRNUserLocation.h @@ -1,12 +1,12 @@ // -// RCTMLNUserLocation.h -// RCTMLN +// MLRNUserLocation.h +// MLRN #import #import #import -@interface RCTMLNUserLocation : NSObject +@interface MLRNUserLocation : NSObject + (id)sharedInstance; diff --git a/ios/RCTMLN/RCTMLNUserLocation.m b/ios/MLRN/MLRNUserLocation.m similarity index 76% rename from ios/RCTMLN/RCTMLNUserLocation.m rename to ios/MLRN/MLRNUserLocation.m index a807182e5..65703ce72 100644 --- a/ios/RCTMLN/RCTMLNUserLocation.m +++ b/ios/MLRN/MLRNUserLocation.m @@ -1,9 +1,9 @@ // -// RCTMLNUserLocation.m -// RCTMLN +// MLRNUserLocation.m +// MLRN // -#import "RCTMLNUserLocation.h" +#import "MLRNUserLocation.h" #import @interface HiddenUserLocationAnnotationView : MLNUserLocationAnnotationView @@ -20,11 +20,11 @@ - (void)update { @end -@implementation RCTMLNUserLocation : NSObject +@implementation MLRNUserLocation : NSObject + (id)sharedInstance { - static RCTMLNUserLocation *userLocation = nil; + static MLRNUserLocation *userLocation = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ userLocation = [[self alloc] init]; }); return userLocation; diff --git a/ios/RCTMLN/RCTMLNUtils.h b/ios/MLRN/MLRNUtils.h similarity index 96% rename from ios/RCTMLN/RCTMLNUtils.h rename to ios/MLRN/MLRNUtils.h index f72513bf4..070051cf9 100644 --- a/ios/RCTMLN/RCTMLNUtils.h +++ b/ios/MLRN/MLRNUtils.h @@ -1,6 +1,6 @@ // // RCTConvert+Mapbox.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -13,7 +13,7 @@ @import MapLibre; -@interface RCTMLNUtils: NSObject +@interface MLRNUtils: NSObject + (CLLocationCoordinate2D)fromFeature:(NSString*)json; + (MLNShape*)shapeFromGeoJSON:(NSString*)json; diff --git a/ios/RCTMLN/RCTMLNUtils.m b/ios/MLRN/MLRNUtils.m similarity index 91% rename from ios/RCTMLN/RCTMLNUtils.m rename to ios/MLRN/MLRNUtils.m index 1e3caa54b..b6c8fad6d 100644 --- a/ios/RCTMLN/RCTMLNUtils.m +++ b/ios/MLRN/MLRNUtils.m @@ -1,17 +1,17 @@ // // RCTConvert+Mapbox.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNUtils.h" -#import "RCTMLNImageQueue.h" +#import "MLRNUtils.h" +#import "MLRNImageQueue.h" @import MapLibre; -@implementation RCTMLNUtils +@implementation MLRNUtils static double const MS_TO_S = 0.001; @@ -90,7 +90,7 @@ + (CGVector)toCGVector:(NSArray *)arr + (void)fetchImage:(RCTBridge*)bridge url:(NSString *)url scale:(double)scale callback:(RCTImageLoaderCompletionBlock)callback { - [RCTMLNImageQueue.sharedInstance addImage:url scale:scale bridge:bridge completionHandler:callback]; + [MLRNImageQueue.sharedInstance addImage:url scale:scale bridge:bridge completionHandler:callback]; } + (void)fetchImages:(RCTBridge *)bridge style:(MLNStyle *)style objects:(NSDictionary*)objects forceUpdate:(BOOL)forceUpdate callback:(void (^)(void))callback @@ -124,7 +124,7 @@ + (void)fetchImages:(RCTBridge *)bridge style:(MLNStyle *)style objects:(NSDicti NSDictionary* image = objects[imageName]; BOOL hasScale = [image isKindOfClass:[NSDictionary class]] && ([image objectForKey:@"scale"] != nil); double scale = hasScale ? [[image objectForKey:@"scale"] doubleValue] : 1.0; - [RCTMLNImageQueue.sharedInstance addImage:objects[imageName] scale:scale bridge:bridge completionHandler:^(NSError *error, UIImage *image) { + [MLRNImageQueue.sharedInstance addImage:objects[imageName] scale:scale bridge:bridge completionHandler:^(NSError *error, UIImage *image) { if (!image) { RCTLogWarn(@"Failed to fetch image: %@ error:%@", imageName, error); } @@ -145,7 +145,7 @@ + (NSString*)getStyleJsonTempDirectory { static NSString *styleJsonTempDirectory; if (!styleJsonTempDirectory) { - styleJsonTempDirectory = [NSTemporaryDirectory() stringByAppendingPathComponent:@"RCTMLNStyleJSON"]; + styleJsonTempDirectory = [NSTemporaryDirectory() stringByAppendingPathComponent:@"MLRNStyleJSON"]; } return styleJsonTempDirectory; } @@ -159,7 +159,7 @@ + (NSString*)getStyleJsonTempDirectory + (void)cleanCustomStyleJSONCacheIfNeeded { NSFileManager *fileManager = [NSFileManager defaultManager]; - NSString *styleJsonTempDirectory = [RCTMLNUtils getStyleJsonTempDirectory]; + NSString *styleJsonTempDirectory = [MLRNUtils getStyleJsonTempDirectory]; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -175,10 +175,10 @@ + (void)cleanCustomStyleJSONCacheIfNeeded */ + (NSURL*)styleURLFromStyleJSON:(NSString *)styleJSON { - [RCTMLNUtils cleanCustomStyleJSONCacheIfNeeded]; + [MLRNUtils cleanCustomStyleJSONCacheIfNeeded]; NSFileManager *fileManager = [NSFileManager defaultManager]; - NSString *styleJsonTempDirectory = [RCTMLNUtils getStyleJsonTempDirectory]; + NSString *styleJsonTempDirectory = [MLRNUtils getStyleJsonTempDirectory]; // attempt to create the temporary directory if (![fileManager fileExistsAtPath:styleJsonTempDirectory]) { diff --git a/ios/RCTMLN/RCTMLNVectorLayer.h b/ios/MLRN/MLRNVectorLayer.h similarity index 62% rename from ios/RCTMLN/RCTMLNVectorLayer.h rename to ios/MLRN/MLRNVectorLayer.h index ff0edff8e..b7db31522 100644 --- a/ios/RCTMLN/RCTMLNVectorLayer.h +++ b/ios/MLRN/MLRNVectorLayer.h @@ -1,14 +1,14 @@ // -// RCTMLNCircleLayer.h -// RCTMLN +// MLRNCircleLayer.h +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNLayer.h" +#import "MLRNLayer.h" -@interface RCTMLNVectorLayer : RCTMLNLayer +@interface MLRNVectorLayer : MLRNLayer @property (nonatomic, copy) NSString *sourceLayerID; diff --git a/ios/RCTMLN/RCTMLNVectorLayer.m b/ios/MLRN/MLRNVectorLayer.m similarity index 90% rename from ios/RCTMLN/RCTMLNVectorLayer.m rename to ios/MLRN/MLRNVectorLayer.m index 04295095f..15db2b29b 100644 --- a/ios/RCTMLN/RCTMLNVectorLayer.m +++ b/ios/MLRN/MLRNVectorLayer.m @@ -1,17 +1,17 @@ // -// RCTMLNCircleLayer.m -// RCTMLN +// MLRNCircleLayer.m +// MLRN // // Created by Nick Italiano on 9/18/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNVectorLayer.h" -#import "RCTMLNStyle.h" +#import "MLRNVectorLayer.h" +#import "MLRNStyle.h" #import "FilterParser.h" #import -@implementation RCTMLNVectorLayer +@implementation MLRNVectorLayer - (NSPredicate*)buildFilters diff --git a/ios/RCTMLN/RCTMLNVectorSource.h b/ios/MLRN/MLRNVectorSource.h similarity index 72% rename from ios/RCTMLN/RCTMLNVectorSource.h rename to ios/MLRN/MLRNVectorSource.h index f68cb5d15..e41657864 100644 --- a/ios/RCTMLN/RCTMLNVectorSource.h +++ b/ios/MLRN/MLRNVectorSource.h @@ -1,15 +1,15 @@ // -// RCTMLNVectorSource.h -// RCTMLN +// MLRNVectorSource.h +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNTileSource.h" +#import "MLRNTileSource.h" @import MapLibre; -@interface RCTMLNVectorSource : RCTMLNTileSource +@interface MLRNVectorSource : MLRNTileSource - (nonnull NSArray> *)featuresInSourceLayersWithIdentifiers:(nonnull NSSet *)sourceLayerIdentifiers predicate:(nullable NSPredicate *)predicate; diff --git a/ios/RCTMLN/RCTMLNVectorSource.m b/ios/MLRN/MLRNVectorSource.m similarity index 88% rename from ios/RCTMLN/RCTMLNVectorSource.m rename to ios/MLRN/MLRNVectorSource.m index 1eb6f4f5b..adf011306 100644 --- a/ios/RCTMLN/RCTMLNVectorSource.m +++ b/ios/MLRN/MLRNVectorSource.m @@ -1,14 +1,14 @@ // -// RCTMLNVectorSource.m -// RCTMLN +// MLRNVectorSource.m +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "RCTMLNVectorSource.h" +#import "MLRNVectorSource.h" -@implementation RCTMLNVectorSource +@implementation MLRNVectorSource - (nullable MLNSource*)makeSource { diff --git a/ios/RCTMLN/RCTMLNVectorSourceManager.h b/ios/MLRN/MLRNVectorSourceManager.h similarity index 60% rename from ios/RCTMLN/RCTMLNVectorSourceManager.h rename to ios/MLRN/MLRNVectorSourceManager.h index 66eb42070..6ac4dc178 100644 --- a/ios/RCTMLN/RCTMLNVectorSourceManager.h +++ b/ios/MLRN/MLRNVectorSourceManager.h @@ -1,6 +1,6 @@ // -// RCTMLNVectorSourceManager.h -// RCTMLN +// MLRNVectorSourceManager.h +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -9,6 +9,6 @@ #import "ViewManager.h" #import -@interface RCTMLNVectorSourceManager : ViewManager +@interface MLRNVectorSourceManager : ViewManager @end diff --git a/ios/RCTMLN/RCTMLNVectorSourceManager.m b/ios/MLRN/MLRNVectorSourceManager.m similarity index 82% rename from ios/RCTMLN/RCTMLNVectorSourceManager.m rename to ios/MLRN/MLRNVectorSourceManager.m index a0aed68c1..f8b20b163 100644 --- a/ios/RCTMLN/RCTMLNVectorSourceManager.m +++ b/ios/MLRN/MLRNVectorSourceManager.m @@ -1,6 +1,6 @@ // -// RCTMLNVectorSourceManager.m -// RCTMLN +// MLRNVectorSourceManager.m +// MLRN // // Created by Nick Italiano on 9/8/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -8,20 +8,20 @@ #import -#import "RCTMLNVectorSourceManager.h" -#import "RCTMLNVectorSource.h" +#import "MLRNVectorSourceManager.h" +#import "MLRNVectorSource.h" #import "FilterParser.h" -@implementation RCTMLNVectorSourceManager +@implementation MLRNVectorSourceManager -RCT_EXPORT_MODULE(RCTMLNVectorSource); +RCT_EXPORT_MODULE(MLRNVectorSource); RCT_EXPORT_VIEW_PROPERTY(id, NSString); - (UIView*)view { - return [RCTMLNVectorSource new]; + return [MLRNVectorSource new]; } RCT_EXPORT_VIEW_PROPERTY(url, NSString) @@ -44,10 +44,10 @@ - (UIView*)view rejecter:(RCTPromiseRejectBlock)reject) { [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *manager, NSDictionary *viewRegistry) { - RCTMLNVectorSource* vectorSource = viewRegistry[reactTag]; + MLRNVectorSource* vectorSource = viewRegistry[reactTag]; - if (![vectorSource isKindOfClass:[RCTMLNVectorSource class]]) { - RCTLogError(@"Invalid react tag, could not find RCTMLNMapView"); + if (![vectorSource isKindOfClass:[MLRNVectorSource class]]) { + RCTLogError(@"Invalid react tag, could not find MLRNMapView"); return; } diff --git a/ios/RCTMLN/RCTConvert+Mapbox.h b/ios/MLRN/RCTConvert+Mapbox.h similarity index 96% rename from ios/RCTMLN/RCTConvert+Mapbox.h rename to ios/MLRN/RCTConvert+Mapbox.h index 54e224559..5d58465f0 100644 --- a/ios/RCTMLN/RCTConvert+Mapbox.h +++ b/ios/MLRN/RCTConvert+Mapbox.h @@ -1,6 +1,6 @@ // // RCTConvert+Mapbox.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/RCTConvert+Mapbox.m b/ios/MLRN/RCTConvert+Mapbox.m similarity index 98% rename from ios/RCTMLN/RCTConvert+Mapbox.m rename to ios/MLRN/RCTConvert+Mapbox.m index e434769f5..923655a92 100644 --- a/ios/RCTMLN/RCTConvert+Mapbox.m +++ b/ios/MLRN/RCTConvert+Mapbox.m @@ -1,6 +1,6 @@ // // RCTConvert+Mapbox.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/RNMBImageUtils.h b/ios/MLRN/RNMBImageUtils.h similarity index 96% rename from ios/RCTMLN/RNMBImageUtils.h rename to ios/MLRN/RNMBImageUtils.h index 1f095ec6f..1ae751a53 100644 --- a/ios/RCTMLN/RNMBImageUtils.h +++ b/ios/MLRN/RNMBImageUtils.h @@ -1,6 +1,6 @@ // // RNMBImageUtils.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 1/18/18. // Copyright © 2018 Mapbox Inc. All rights reserved. diff --git a/ios/RCTMLN/RNMBImageUtils.m b/ios/MLRN/RNMBImageUtils.m similarity index 93% rename from ios/RCTMLN/RNMBImageUtils.m rename to ios/MLRN/RNMBImageUtils.m index 12a280949..6f5bc622c 100644 --- a/ios/RCTMLN/RNMBImageUtils.m +++ b/ios/MLRN/RNMBImageUtils.m @@ -1,6 +1,6 @@ // // RNMBImageUtils.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 1/18/18. // Copyright © 2018 Mapbox Inc. All rights reserved. @@ -13,7 +13,7 @@ @implementation RNMBImageUtils + (NSString *)createTempFile:(UIImage *)image { NSString *fileID = [[NSUUID UUID] UUIDString]; - NSString *pathComponent = [NSString stringWithFormat:@"Documents/rctmln-snapshot-%@.%@", fileID, @"png"]; + NSString *pathComponent = [NSString stringWithFormat:@"Documents/mlrn-snapshot-%@.%@", fileID, @"png"]; NSString *filePath = [NSHomeDirectory() stringByAppendingPathComponent: pathComponent]; NSData *data = UIImagePNGRepresentation(image); diff --git a/ios/RCTMLN/ViewManager.h b/ios/MLRN/ViewManager.h similarity index 63% rename from ios/RCTMLN/ViewManager.h rename to ios/MLRN/ViewManager.h index 9d6329a7c..c0dd34415 100644 --- a/ios/RCTMLN/ViewManager.h +++ b/ios/MLRN/ViewManager.h @@ -1,16 +1,16 @@ // // ViewManager.h -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/31/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // #import -#import "RCTMLNEvent.h" +#import "MLRNEvent.h" @interface ViewManager : RCTViewManager --(void)fireEvent:(RCTMLNEvent*)event withCallback:(RCTBubblingEventBlock)callback; +-(void)fireEvent:(MLRNEvent*)event withCallback:(RCTBubblingEventBlock)callback; @end diff --git a/ios/RCTMLN/ViewManager.m b/ios/MLRN/ViewManager.m similarity index 86% rename from ios/RCTMLN/ViewManager.m rename to ios/MLRN/ViewManager.m index 92045f1bc..c2af63614 100644 --- a/ios/RCTMLN/ViewManager.m +++ b/ios/MLRN/ViewManager.m @@ -1,6 +1,6 @@ // // ViewManager.m -// RCTMLN +// MLRN // // Created by Nick Italiano on 8/31/17. // Copyright © 2017 Mapbox Inc. All rights reserved. @@ -35,7 +35,7 @@ - (instancetype)init return self; } -- (void)fireEvent:(RCTMLNEvent*)event withCallback:(RCTBubblingEventBlock)callback +- (void)fireEvent:(MLRNEvent*)event withCallback:(RCTBubblingEventBlock)callback { if (![self _shouldDropEvent:event]) { NSString *cacheKey = [self _getCacheKey:event]; @@ -48,14 +48,14 @@ - (void)fireEvent:(RCTMLNEvent*)event withCallback:(RCTBubblingEventBlock)callba } } -- (BOOL)_shouldDropEvent:(RCTMLNEvent *)event +- (BOOL)_shouldDropEvent:(MLRNEvent *)event { NSString *cacheKey = [self _getCacheKey:event]; NSNumber *lastTimestamp = [eventTimestampCache objectForKey:cacheKey]; return lastTimestamp != nil && (event.timestamp - [lastTimestamp doubleValue]) <= EVENT_THROTTLE_S; } -- (NSString*)_getCacheKey:(RCTMLNEvent*)event +- (NSString*)_getCacheKey:(MLRNEvent*)event { return event.type; } diff --git a/ios/RCTMLN/RCTMLNCalloutManager.m b/ios/RCTMLN/RCTMLNCalloutManager.m deleted file mode 100644 index c56714466..000000000 --- a/ios/RCTMLN/RCTMLNCalloutManager.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// RCTMLNCalloutViewManager.m -// RCTMLN -// -// Created by Nick Italiano on 10/13/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import "RCTMLNCalloutManager.h" -#import "RCTMLNCallout.h" - -@implementation RCTMLNCalloutManager - -RCT_EXPORT_MODULE() - -- (UIView *)view -{ - return [[RCTMLNCallout alloc] init]; -} - -@end diff --git a/ios/RCTMLN/RCTMLNCircleLayer.h b/ios/RCTMLN/RCTMLNCircleLayer.h deleted file mode 100644 index 191f59b9d..000000000 --- a/ios/RCTMLN/RCTMLNCircleLayer.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// RCTMLNCircleLayer.h -// RCTMLN -// -// Created by Nick Italiano on 9/18/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import "RCTMLNVectorLayer.h" - -@interface RCTMLNCircleLayer : RCTMLNVectorLayer - -@end diff --git a/ios/RCTMLN/RCTMLNCircleLayerManager.h b/ios/RCTMLN/RCTMLNCircleLayerManager.h deleted file mode 100644 index e18234dad..000000000 --- a/ios/RCTMLN/RCTMLNCircleLayerManager.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// RCTMLNCircleLayerManager.h -// RCTMLN -// -// Created by Nick Italiano on 9/18/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import "ViewManager.h" - -@interface RCTMLNCircleLayerManager : ViewManager - -@end diff --git a/ios/RCTMLN/RCTMLNHeatmapLayer.h b/ios/RCTMLN/RCTMLNHeatmapLayer.h deleted file mode 100644 index 30c997cda..000000000 --- a/ios/RCTMLN/RCTMLNHeatmapLayer.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// RCTMLNHeatmapLayer.h -// RCTMLN -// -// Created by Dheeraj Yalamanchili on 6/8/19. -// - -#import "RCTMLNVectorLayer.h" - -@interface RCTMLNHeatmapLayer : RCTMLNVectorLayer - -@end diff --git a/ios/RCTMLN/RCTMLNHeatmapLayerManager.h b/ios/RCTMLN/RCTMLNHeatmapLayerManager.h deleted file mode 100644 index 427d4066b..000000000 --- a/ios/RCTMLN/RCTMLNHeatmapLayerManager.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// RCTMLNHeatmapLayerManager.h -// RCTMLN -// -// Created by Dheeraj Yalamanchili on 6/8/19. -// - -#import "ViewManager.h" - -@interface RCTMLNHeatmapLayerManager : ViewManager - -@end diff --git a/ios/RCTMLN/RCTMLNImagesManager.h b/ios/RCTMLN/RCTMLNImagesManager.h deleted file mode 100644 index 128c45c29..000000000 --- a/ios/RCTMLN/RCTMLNImagesManager.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "ViewManager.h" - -@interface RCTMLNImagesManager : ViewManager - -@end diff --git a/ios/RCTMLN/RCTMLNLocationManager.h b/ios/RCTMLN/RCTMLNLocationManager.h deleted file mode 100644 index 4beccf408..000000000 --- a/ios/RCTMLN/RCTMLNLocationManager.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// RCTMLNLocationManager.h -// RCTMLN -// -// Created by Nick Italiano on 6/21/18. -// Copyright © 2018 Mapbox Inc. All rights reserved. -// - -#import - -#import "RCTMLNLocation.h" -#import "RCTMLNLocationManagerDelegate.h" - -typedef void (^RCTMLNLocationBlock)(RCTMLNLocation *location); - -@interface RCTMLNLocationManager : NSObject - -@property (nonatomic, strong) id delegate; - -+ (id)sharedInstance; - -- (void)start:(CLLocationDistance)minDisplacement; -- (void)stop; -- (void)setMinDisplacement:(CLLocationDistance)minDisplacement; -- (BOOL)isEnabled; -- (RCTMLNLocation *)getLastKnownLocation; -- (void)addListener:(RCTMLNLocationBlock)listener; -- (void)removeListener:(RCTMLNLocationBlock)listener; - -@end diff --git a/ios/RCTMLN/RCTMLNLocationManagerDelegate.h b/ios/RCTMLN/RCTMLNLocationManagerDelegate.h deleted file mode 100644 index c0e8c12d4..000000000 --- a/ios/RCTMLN/RCTMLNLocationManagerDelegate.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// RCTMLNLocationManagerDelegate.h -// RCTMLN -// -// Created by Nick Italiano on 6/21/18. -// Copyright © 2018 Mapbox Inc. All rights reserved. -// - -#import - -#import "RCTMLNLocation.h" - -@class RCTMLNLocationManager; - -@protocol RCTMLNLocationManagerDelegate - -- (void)locationManager:(RCTMLNLocationManager *)locationManager didUpdateLocation:(RCTMLNLocation *)location; - -@end - diff --git a/ios/RCTMLN/RCTMLNMapTouchEvent.h b/ios/RCTMLN/RCTMLNMapTouchEvent.h deleted file mode 100644 index 072a97ef0..000000000 --- a/ios/RCTMLN/RCTMLNMapTouchEvent.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// RCTMLNTouchEvent.h -// RCTMLN -// -// Created by Nick Italiano on 8/25/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import -#import "RCTMLNEvent.h" -#import "RCTMLNPointAnnotation.h" -@import MapLibre; - -@interface RCTMLNMapTouchEvent : RCTMLNEvent - -@property (nonatomic, copy) NSString *id; -@property (nonatomic, assign) CLLocationCoordinate2D coordinate; -@property (nonatomic, assign) CGPoint screenPoint; - -+ (RCTMLNMapTouchEvent*)makeTapEvent:(MLNMapView*)mapView withPoint:(CGPoint)point; -+ (RCTMLNMapTouchEvent*)makeLongPressEvent:(MLNMapView*)mapView withPoint:(CGPoint)point; -+ (RCTMLNMapTouchEvent *)makeAnnotationTapEvent:(RCTMLNPointAnnotation *)pointAnnotation; -+ (RCTMLNMapTouchEvent *)makeAnnotationTapEventOnDrag:(RCTMLNPointAnnotation *)pointAnnotation; - -@end diff --git a/ios/RCTMLN/RCTMLNNativeUserLocationManager.h b/ios/RCTMLN/RCTMLNNativeUserLocationManager.h deleted file mode 100644 index 3e1efbdcd..000000000 --- a/ios/RCTMLN/RCTMLNNativeUserLocationManager.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "ViewManager.h" - -@interface RCTMLNNativeUserLocationManager : ViewManager - -@end diff --git a/ios/RCTMLN/RCTMLNNativeUserLocationManager.m b/ios/RCTMLN/RCTMLNNativeUserLocationManager.m deleted file mode 100644 index c2146fe05..000000000 --- a/ios/RCTMLN/RCTMLNNativeUserLocationManager.m +++ /dev/null @@ -1,25 +0,0 @@ -#import "RCTMLNNativeUserLocationManager.h" -#import "RCTMLNNativeUserLocation.h" - -@implementation RCTMLNNativeUserLocationManager - -RCT_EXPORT_MODULE(RCTMLNNativeUserLocation) -RCT_EXPORT_VIEW_PROPERTY(iosShowsUserHeadingIndicator, BOOL) - - -#pragma - View Properties - - -#pragma Methods - -- (BOOL)requiresMainQueueSetup -{ - return YES; -} - -- (UIView *)view -{ - return [[RCTMLNNativeUserLocation alloc] init]; -} - -@end diff --git a/ios/install.md b/ios/install.md index f230ebb18..0f70aabbc 100644 --- a/ios/install.md +++ b/ios/install.md @@ -8,7 +8,7 @@ Add the following to your `ios/Podfile`: ```ruby post_install do |installer| ... other post install hooks - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) end ``` @@ -38,7 +38,7 @@ If you want to install a different version, you can override as follows in your `Podfile`: ```ruby -$RCTMLN_SPM_Spec = { +$MLRN_SPM_Spec = { url: "https://github.com/maplibre/maplibre-gl-native-distribution", requirement: { kind: "upToNextMajorVersion", diff --git a/maplibre-react-native.podspec b/maplibre-react-native.podspec index b9ac40665..f3466147f 100644 --- a/maplibre-react-native.podspec +++ b/maplibre-react-native.podspec @@ -2,9 +2,9 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) -$RCTMLN = Object.new +$MLRN = Object.new -def $RCTMLN._add_spm_to_target(project, target, url, requirement, product_name) +def $MLRN._add_spm_to_target(project, target, url, requirement, product_name) pkg_class = Xcodeproj::Project::Object::XCRemoteSwiftPackageReference ref_class = Xcodeproj::Project::Object::XCSwiftPackageProductDependency pkg = project.root_object.package_references.find { |p| p.class == pkg_class && p.repositoryURL == url } @@ -23,7 +23,7 @@ def $RCTMLN._add_spm_to_target(project, target, url, requirement, product_name) end end -def $RCTMLN.post_install(installer) +def $MLRN.post_install(installer) spm_spec = { url: "https://github.com/maplibre/maplibre-gl-native-distribution", requirement: { @@ -33,8 +33,8 @@ def $RCTMLN.post_install(installer) product_name: "MapLibre" } - if $RCTMLN_SPM_Spec.is_a?(Hash) - spm_spec = $RCTMLN_SPM_Spec + if $MLRN_SPM_Spec.is_a?(Hash) + spm_spec = $MLRN_SPM_Spec end project = installer.pods_project self._add_spm_to_target( @@ -74,6 +74,6 @@ Pod::Spec.new do |s| s.dependency 'React' s.subspec 'DynamicLibrary' do |sp| - sp.source_files = "ios/RCTMLN/**/*.{h,m}" + sp.source_files = "ios/MLRN/**/*.{h,m}" end end diff --git a/packages/react-native-app/android/app/build.gradle b/packages/react-native-app/android/app/build.gradle index 9c0fdeb70..55b25fd35 100644 --- a/packages/react-native-app/android/app/build.gradle +++ b/packages/react-native-app/android/app/build.gradle @@ -108,7 +108,7 @@ android { } dependencies { - implementation project(':rctmln') + implementation project(':mlrn') // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") diff --git a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt index 7613cbf18..a26c5cf35 100644 --- a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt +++ b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt @@ -11,7 +11,7 @@ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.soloader.SoLoader -import org.maplibre.rctmln.RCTMLNPackage; +import org.maplibre.mlrn.MLRNPackage; class MainApplication : Application(), ReactApplication { @@ -22,7 +22,7 @@ class MainApplication : Application(), ReactApplication { PackageList(this).packages.apply { // Packages that cannot be autolinked yet can be added manually here, for example: // add(MyReactNativePackage()) - add(RCTMLNPackage()); + add(MLRNPackage()); } diff --git a/packages/react-native-app/android/settings.gradle b/packages/react-native-app/android/settings.gradle index d56956b99..b84e6b1b2 100644 --- a/packages/react-native-app/android/settings.gradle +++ b/packages/react-native-app/android/settings.gradle @@ -3,7 +3,7 @@ plugins { id("com.facebook.react.settings") } extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } rootProject.name = 'MapLibreReactNativeExample' -include ':rctmln' -project(':rctmln').projectDir = new File(rootProject.projectDir, '../../../android') +include ':mlrn' +project(':mlrn').projectDir = new File(rootProject.projectDir, '../../../android') include ':app' includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/packages/react-native-app/ios/Podfile b/packages/react-native-app/ios/Podfile index 67a433395..fc4fdedd6 100644 --- a/packages/react-native-app/ios/Podfile +++ b/packages/react-native-app/ios/Podfile @@ -8,7 +8,7 @@ require Pod::Executable.execute_command('node', ['-p', platform :ios, min_ios_version_supported prepare_react_native_project! -$RCTMLN_SPM_Spec = { +$MLRN_SPM_Spec = { url: "https://github.com/maplibre/maplibre-gl-native-distribution", requirement: { kind: "upToNextMajorVersion", @@ -17,7 +17,7 @@ $RCTMLN_SPM_Spec = { product_name: "MapLibre" } -# We ingore warning except for RCTMLN +# We ingore warning except for MLRN INHIBIT_WARNING_BY_DEFAULT = true if INHIBIT_WARNING_BY_DEFAULT @@ -72,13 +72,13 @@ target 'MapLibreReactNativeExample' do # :ccache_enabled => true ) - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) end else # CI configuration post_install do |installer| react_native_post_install(installer) - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) end end end diff --git a/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap b/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap index ff359d4c2..17094b7e3 100644 --- a/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap +++ b/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap @@ -15,7 +15,7 @@ target 'HelloWorld' do # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-4092f82b887b5b9edb84642c2a56984d69b9a403 post_install do |installer| # @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer end # @generated end post_installer @@ -48,7 +48,7 @@ target 'HelloWorld' do # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-4092f82b887b5b9edb84642c2a56984d69b9a403 post_install do |installer| # @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer end # @generated end post_installer @@ -98,7 +98,7 @@ target 'HelloWorld' do post_install do |installer| # @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer react_native_post_install(installer) end @@ -126,7 +126,7 @@ target 'HelloWorld' do # use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1') # post_install do |installer| # @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer # flipper_post_install(installer) # end @@ -135,7 +135,7 @@ target 'HelloWorld' do # @generated begin pre_installer - expo prebuild (DO NOT MODIFY) sync-00old-id INVALID_pre_install do |installer| # @generated begin @react-native-mapbox-gl/maps-pre_installer - expo prebuild (DO NOT MODIFY) sync-00 - INVALID_$RCTMLN.pre_install(installer) + INVALID_$MLRN.pre_install(installer) # @generated end @react-native-mapbox-gl/maps-pre_installer end # @generated end pre_installer @@ -165,14 +165,14 @@ target 'HelloWorld' do # @generated begin pre_installer - expo prebuild (DO NOT MODIFY) sync-00old-id INVALID_pre_install do |installer| # @generated begin @react-native-mapbox-gl/maps-pre_installer - expo prebuild (DO NOT MODIFY) sync-00 - INVALID_$RCTMLN.pre_install(installer) + INVALID_$MLRN.pre_install(installer) # @generated end @react-native-mapbox-gl/maps-pre_installer end # @generated end pre_installer # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-4092f82b887b5b9edb84642c2a56984d69b9a403 post_install do |installer| # @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be - $RCTMLN.post_install(installer) + $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer end # @generated end post_installer diff --git a/plugin/__tests__/fixtures/cocoapodFiles.ts b/plugin/__tests__/fixtures/cocoapodFiles.ts index e9c5b29ee..d8a31b95b 100644 --- a/plugin/__tests__/fixtures/cocoapodFiles.ts +++ b/plugin/__tests__/fixtures/cocoapodFiles.ts @@ -96,14 +96,14 @@ target 'HelloWorld' do # @generated begin pre_installer - expo prebuild (DO NOT MODIFY) sync-00old-id INVALID_pre_install do |installer| # @generated begin @react-native-mapbox-gl/maps-pre_installer - expo prebuild (DO NOT MODIFY) sync-00 - INVALID_$RCTMLN.pre_install(installer) + INVALID_$MLRN.pre_install(installer) # @generated end @react-native-mapbox-gl/maps-pre_installer end # @generated end pre_installer # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-00old-id-2 INVALID_post_install do |installer| # @generated begin @react-native-mapbox-gl/maps-post_installer - expo prebuild (DO NOT MODIFY) sync-001 - INVALID_$RCTMLN.post_install(installer) + INVALID_$MLRN.post_install(installer) # @generated end @react-native-mapbox-gl/maps-post_installer end # @generated end post_installer @@ -148,14 +148,14 @@ target 'HelloWorld' do # @generated begin pre_installer - expo prebuild (DO NOT MODIFY) sync-00old-id INVALID_pre_install do |installer| # @generated begin @react-native-mapbox-gl/maps-pre_installer - expo prebuild (DO NOT MODIFY) sync-00 - INVALID_$RCTMLN.pre_install(installer) + INVALID_$MLRN.pre_install(installer) # @generated end @react-native-mapbox-gl/maps-pre_installer end # @generated end pre_installer # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-00old-id-2 INVALID_post_install do |installer| # @generated begin @react-native-mapbox-gl/maps-post_installer - expo prebuild (DO NOT MODIFY) sync-001 - INVALID_$RCTMLN.post_install(installer) + INVALID_$MLRN.post_install(installer) # @generated end @react-native-mapbox-gl/maps-post_installer end # @generated end post_installer diff --git a/plugin/src/withMapLibre.ts b/plugin/src/withMapLibre.ts index cb4451189..d81edf360 100644 --- a/plugin/src/withMapLibre.ts +++ b/plugin/src/withMapLibre.ts @@ -101,7 +101,7 @@ export function addMapLibreInstallerBlock( return mergeContents({ tag: `@maplibre/maplibre-react-native-${blockName}_installer`, src, - newSrc: ` $RCTMLN.${blockName}_install(installer)`, + newSrc: ` $MLRN.${blockName}_install(installer)`, anchor: new RegExp(`${blockName}_install do \\|installer\\|`), offset: 1, comment: "#", diff --git a/scripts/codegen.ts b/scripts/codegen.ts index 8e53d189d..efd377651 100644 --- a/scripts/codegen.ts +++ b/scripts/codegen.ts @@ -17,7 +17,7 @@ import { const TEMPLATES_PATH = path.join(__dirname, "templates"); -const IOS_OUTPUT_PATH = path.join(__dirname, "..", "ios", "RCTMLN"); +const IOS_OUTPUT_PATH = path.join(__dirname, "..", "ios", "MLRN"); const ANDROID_OUTPUT_PATH = path.join( __dirname, "..", @@ -27,7 +27,7 @@ const ANDROID_OUTPUT_PATH = path.join( "java", "org", "maplibre", - "rctmln", + "mlrn", "components", "styles", ); @@ -36,20 +36,20 @@ const JS_OUTPUT_PATH = path.join(__dirname, "..", "src", "utils"); const TEMPLATE_MAPPINGS = [ { - input: path.join(TEMPLATES_PATH, "RCTMLNStyle.h.ejs"), - output: path.join(IOS_OUTPUT_PATH, "RCTMLNStyle.h"), + input: path.join(TEMPLATES_PATH, "MLRNStyle.h.ejs"), + output: path.join(IOS_OUTPUT_PATH, "MLRNStyle.h"), }, { input: path.join(TEMPLATES_PATH, "MapLibreRNStyles.ts.ejs"), output: path.join(JS_OUTPUT_PATH, "MapLibreRNStyles.d.ts"), }, { - input: path.join(TEMPLATES_PATH, "RCTMLNStyle.m.ejs"), - output: path.join(IOS_OUTPUT_PATH, "RCTMLNStyle.m"), + input: path.join(TEMPLATES_PATH, "MLRNStyle.m.ejs"), + output: path.join(IOS_OUTPUT_PATH, "MLRNStyle.m"), }, { - input: path.join(TEMPLATES_PATH, "RCTMLNStyleFactory.java.ejs"), - output: path.join(ANDROID_OUTPUT_PATH, "RCTMLNStyleFactory.java"), + input: path.join(TEMPLATES_PATH, "MLRNStyleFactory.java.ejs"), + output: path.join(ANDROID_OUTPUT_PATH, "MLRNStyleFactory.java"), }, { input: path.join(TEMPLATES_PATH, "styleMap.ts.ejs"), diff --git a/scripts/templates/RCTMLNStyle.h.ejs b/scripts/templates/MLRNStyle.h.ejs similarity index 82% rename from scripts/templates/RCTMLNStyle.h.ejs rename to scripts/templates/MLRNStyle.h.ejs index 194f99295..ff740152c 100644 --- a/scripts/templates/RCTMLNStyle.h.ejs +++ b/scripts/templates/MLRNStyle.h.ejs @@ -5,13 +5,13 @@ // <%= helpers.autoGeneratedHeader.doNotModify %> // <%= helpers.autoGeneratedHeader.generatedFrom(locals.filePath) %> -#import "RCTMLNStyle.h" -#import "RCTMLNStyleValue.h" +#import "MLRNStyle.h" +#import "MLRNStyleValue.h" #import @import MapLibre; -@interface RCTMLNStyle : NSObject +@interface MLRNStyle : NSObject @property (nonatomic, weak) RCTBridge *bridge; @property (nonatomic, strong) MLNStyle *style; @@ -24,9 +24,9 @@ <%_ for (const layer of layers) { _%> <%_ for (const prop of layer.properties) { _%> -- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; +- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; <%_ if (prop.transition) { _%> -- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>Transition:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue; +- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>Transition:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(MLRNStyleValue *)styleValue; <%_ } _%> <%_ } _%> <% } %> diff --git a/scripts/templates/RCTMLNStyle.m.ejs b/scripts/templates/MLRNStyle.m.ejs similarity index 88% rename from scripts/templates/RCTMLNStyle.m.ejs rename to scripts/templates/MLRNStyle.m.ejs index 575e5d31c..c55f7ae7f 100644 --- a/scripts/templates/RCTMLNStyle.m.ejs +++ b/scripts/templates/MLRNStyle.m.ejs @@ -5,10 +5,10 @@ // <%= helpers.autoGeneratedHeader.doNotModify %> // <%= helpers.autoGeneratedHeader.generatedFrom(locals.filePath) %> -#import "RCTMLNStyle.h" -#import "RCTMLNUtils.h" +#import "MLRNStyle.h" +#import "MLRNUtils.h" -@implementation RCTMLNStyle +@implementation MLRNStyle - (id)initWithMLNStyle:(MLNStyle*)mlnStyle { @@ -32,7 +32,7 @@ continue; } - RCTMLNStyleValue *styleValue = [RCTMLNStyleValue make:reactStyle[prop]]; + MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]]; <% for (let i = 0; i < layer.properties.length; i++) { -%> <%- helpers.ifOrElseIf(i) -%> ([prop isEqualToString:@"<%= layer.properties[i].name %>"]) { @@ -42,7 +42,7 @@ } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMLNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [MLRNUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ if (isValid()) { @@ -70,7 +70,7 @@ <% for (const layer of layers) {%> <% for (const prop of layer.properties) {%> -- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { <%_ if (layer.name === 'light' && prop.name === 'position') { _%> layer.position = [styleValue getSphericalPosition]; @@ -82,7 +82,7 @@ } <%_ if (prop.transition) { _%> -- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>Transition:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue +- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>Transition:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(MLRNStyleValue *)styleValue { layer.<%- helpers.iosPropName(prop.name) -%>Transition = [styleValue getTransition]; } diff --git a/scripts/templates/RCTMLNStyleFactory.java.ejs b/scripts/templates/MLRNStyleFactory.java.ejs similarity index 84% rename from scripts/templates/RCTMLNStyleFactory.java.ejs rename to scripts/templates/MLRNStyleFactory.java.ejs index d4845079a..cce75ad5f 100644 --- a/scripts/templates/RCTMLNStyleFactory.java.ejs +++ b/scripts/templates/MLRNStyleFactory.java.ejs @@ -5,7 +5,7 @@ // <%= helpers.autoGeneratedHeader.doNotModify %> // <%= helpers.autoGeneratedHeader.generatedFrom(locals.filePath) %> -package org.maplibre.rctmln.components.styles; +package org.maplibre.mlrn.components.styles; import org.maplibre.android.style.layers.BackgroundLayer; import org.maplibre.android.style.layers.CircleLayer; @@ -21,16 +21,16 @@ import org.maplibre.android.style.layers.HillshadeLayer; import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import org.maplibre.rctmln.utils.DownloadMapImageTask; +import org.maplibre.mlrn.utils.DownloadMapImageTask; import java.util.List; -public class RCTMLNStyleFactory { +public class MLRNStyleFactory { public static final String VALUE_KEY = "value"; public static final String SHOULD_ADD_IMAGE_KEY = "shouldAddImage"; <%_ for (const layer of layers) { _%> - public static void <%- helpers.setLayerMethodName(layer) -%>(final <%- helpers.getLayerType(layer, 'android') -%> layer, RCTMLNStyle style) { + public static void <%- helpers.setLayerMethodName(layer) -%>(final <%- helpers.getLayerType(layer, 'android') -%> layer, MLRNStyle style) { List styleKeys = style.getAllStyleKeys(); if (styleKeys.size() == 0) { @@ -38,7 +38,7 @@ public class RCTMLNStyleFactory { } for (String styleKey : styleKeys) { - final RCTMLNStyleValue styleValue = style.getStyleValueForKey(styleKey); + final MLRNStyleValue styleValue = style.getStyleValueForKey(styleKey); switch (styleKey) { <%_ for (const prop of layer.properties) { _%> @@ -47,16 +47,16 @@ public class RCTMLNStyleFactory { style.addImage(styleValue, new DownloadMapImageTask.OnAllImagesLoaded() { @Override public void onAllImagesLoaded() { - RCTMLNStyleFactory.set<%- helpers.pascalCase(prop.name) -%>(layer, styleValue); + MLRNStyleFactory.set<%- helpers.pascalCase(prop.name) -%>(layer, styleValue); } }); <%_ } else { _%> - RCTMLNStyleFactory.set<%- helpers.pascalCase(prop.name) -%>(layer, styleValue); + MLRNStyleFactory.set<%- helpers.pascalCase(prop.name) -%>(layer, styleValue); <%_ } _%> break; <%_ if (prop.transition) { _%> case "<%= prop.name %>Transition": - RCTMLNStyleFactory.set<%- helpers.pascalCase(prop.name) -%>Transition(layer, styleValue); + MLRNStyleFactory.set<%- helpers.pascalCase(prop.name) -%>Transition(layer, styleValue); break; <%_ } _%> <%_ } _%> @@ -67,7 +67,7 @@ public class RCTMLNStyleFactory { <%_ for (const layer of layers) { _%> <%_ for (const prop of layer.properties) { _%> - public static void set<%- helpers.pascalCase(prop.name) -%>(<%- helpers.getLayerType(layer, 'android') -%> layer, RCTMLNStyleValue styleValue) { + public static void set<%- helpers.pascalCase(prop.name) -%>(<%- helpers.getLayerType(layer, 'android') -%> layer, MLRNStyleValue styleValue) { <%_ if (layer.name === 'light' && prop.name === 'position') { _%> Float[] values = styleValue.getFloatArray(VALUE_KEY); layer.set<%- helpers.pascalCase(prop.name) -%>(Position.fromPosition(values[0], values[1], values[2])); @@ -95,7 +95,7 @@ public class RCTMLNStyleFactory { } <%_ if (prop.transition) { %> - public static void set<%- helpers.pascalCase(prop.name) -%>Transition(<%- helpers.getLayerType(layer, 'android') -%> layer, RCTMLNStyleValue styleValue) { + public static void set<%- helpers.pascalCase(prop.name) -%>Transition(<%- helpers.getLayerType(layer, 'android') -%> layer, MLRNStyleValue styleValue) { TransitionOptions transition = styleValue.getTransition(); if (transition != null) { layer.set<%- helpers.pascalCase(prop.name) -%>Transition(transition); diff --git a/src/components/BackgroundLayer.tsx b/src/components/BackgroundLayer.tsx index 1b7a06844..dea44139d 100644 --- a/src/components/BackgroundLayer.tsx +++ b/src/components/BackgroundLayer.tsx @@ -10,7 +10,7 @@ import { type BackgroundLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNBackgroundLayer"; +export const NATIVE_MODULE_NAME = "MLRNBackgroundLayer"; export interface BackgroundLayerProps extends BaseProps, BaseLayerProps { /** @@ -23,7 +23,7 @@ interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNBackgroundLayer = +const MLRNBackgroundLayer = requireNativeComponent(NATIVE_MODULE_NAME); const BackgroundLayer: React.FC = ({ @@ -39,8 +39,8 @@ const BackgroundLayer: React.FC = ({ }); return ( - diff --git a/src/components/Callout.tsx b/src/components/Callout.tsx index 0dd9052be..07bcf2e31 100644 --- a/src/components/Callout.tsx +++ b/src/components/Callout.tsx @@ -10,7 +10,7 @@ import { type StyleProp, } from "react-native"; -export const NATIVE_MODULE_NAME = "RCTMLNCallout"; +export const NATIVE_MODULE_NAME = "MLRNCallout"; const styles = StyleSheet.create({ container: { @@ -58,7 +58,7 @@ interface CalloutProps extends Omit { */ style?: ViewStyle; /** - * Style property for the native RCTMLNCallout container, set at your own risk. + * Style property for the native MLRNCallout container, set at your own risk. */ containerStyle?: ViewStyle; /** @@ -130,12 +130,12 @@ const Callout = (props: CalloutProps): ReactElement => { : _renderDefaultCallout(); return ( - + {calloutContent} - + ); }; -const RCTMLNCallout = requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNCallout = requireNativeComponent(NATIVE_MODULE_NAME); export default Callout; diff --git a/src/components/Camera.tsx b/src/components/Camera.tsx index 3d1d2e5d1..d6d2784f8 100644 --- a/src/components/Camera.tsx +++ b/src/components/Camera.tsx @@ -9,7 +9,7 @@ import { CameraMode } from "../types/CameraMode"; import type { MapLibreRNEvent } from "../types/MapLibreRNEvent"; import { makeNativeBounds } from "../utils/makeNativeBounds"; -export const NATIVE_MODULE_NAME = "RCTMLNCamera"; +export const NATIVE_MODULE_NAME = "MLRNCamera"; export enum UserTrackingMode { Follow = "normal", @@ -466,7 +466,7 @@ const Camera = memo( ); return ( - (NATIVE_MODULE_NAME); export default Camera; diff --git a/src/components/CircleLayer.tsx b/src/components/CircleLayer.tsx index cb95fa3c3..2d8b69c41 100644 --- a/src/components/CircleLayer.tsx +++ b/src/components/CircleLayer.tsx @@ -10,7 +10,7 @@ import { type CircleLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNCircleLayer"; +export const NATIVE_MODULE_NAME = "MLRNCircleLayer"; export interface CircleLayerProps extends BaseProps, BaseLayerProps { /** @@ -23,7 +23,7 @@ interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNCircleLayer = +const MLRNCircleLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -42,8 +42,8 @@ const CircleLayer: React.FC = ({ }); return ( - diff --git a/src/components/FillExtrusionLayer.tsx b/src/components/FillExtrusionLayer.tsx index cd000f0ad..d0a8f3bcc 100644 --- a/src/components/FillExtrusionLayer.tsx +++ b/src/components/FillExtrusionLayer.tsx @@ -10,7 +10,7 @@ import { type FillExtrusionLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNFillExtrusionLayer"; +export const NATIVE_MODULE_NAME = "MLRNFillExtrusionLayer"; export interface FillExtrusionLayerProps extends BaseProps, BaseLayerProps { /** @@ -23,7 +23,7 @@ interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNFillExtrusionLayer = +const MLRNFillExtrusionLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -41,7 +41,7 @@ const FillExtrusionLayer: React.FC = ({ sourceID, }); - return ; + return ; }; export default FillExtrusionLayer; diff --git a/src/components/FillLayer.tsx b/src/components/FillLayer.tsx index cfb58d7ef..109210e24 100644 --- a/src/components/FillLayer.tsx +++ b/src/components/FillLayer.tsx @@ -10,7 +10,7 @@ import { type FillLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNFillLayer"; +export const NATIVE_MODULE_NAME = "MLRNFillLayer"; export interface FillLayerProps extends BaseProps, BaseLayerProps { /** @@ -21,7 +21,7 @@ export interface FillLayerProps extends BaseProps, BaseLayerProps { interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNFillLayer = requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNFillLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** * FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map. @@ -38,7 +38,7 @@ const FillLayer: React.FC = ({ sourceID, }); - return ; + return ; }; export default FillLayer; diff --git a/src/components/HeatmapLayer.tsx b/src/components/HeatmapLayer.tsx index c8f30a8a0..2486a7307 100644 --- a/src/components/HeatmapLayer.tsx +++ b/src/components/HeatmapLayer.tsx @@ -10,7 +10,7 @@ import { type HeatmapLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNHeatmapLayer"; +export const NATIVE_MODULE_NAME = "MLRNHeatmapLayer"; export interface HeatmapLayerProps extends BaseProps, BaseLayerProps { /** @@ -23,7 +23,7 @@ interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNHeatmapLayer = +const MLRNHeatmapLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** * HeatmapLayer is a style layer that renders one or more filled circles on the map. @@ -40,7 +40,7 @@ const HeatmapLayer: React.FC = ({ sourceID, }); - return ; + return ; }; export default HeatmapLayer; diff --git a/src/components/ImageSource.tsx b/src/components/ImageSource.tsx index 753a885e0..c08b58651 100644 --- a/src/components/ImageSource.tsx +++ b/src/components/ImageSource.tsx @@ -9,7 +9,7 @@ import { resolveImagePath, } from "../utils"; -export const NATIVE_MODULE_NAME = "RCTMLNImageSource"; +export const NATIVE_MODULE_NAME = "MLRNImageSource"; export interface ImageSourceProps extends BaseProps { /** @@ -36,7 +36,7 @@ export interface ImageSourceProps extends BaseProps { type NativeProps = ImageSourceProps; -const RCTMLNImageSource = +const MLRNImageSource = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -60,11 +60,11 @@ const ImageSource: React.FC = (props: ImageSourceProps) => { }; return ( - + {cloneReactChildrenWithProps(allProps.children, { sourceID: allProps.id, })} - + ); }; diff --git a/src/components/Images.tsx b/src/components/Images.tsx index 678b2929d..131916574 100644 --- a/src/components/Images.tsx +++ b/src/components/Images.tsx @@ -10,7 +10,7 @@ import { import { SHAPE_SOURCE_NATIVE_ASSETS_KEY } from "./ShapeSource"; import { type BaseProps } from "../types/BaseProps"; -export const NATIVE_MODULE_NAME = "RCTMLNImages"; +export const NATIVE_MODULE_NAME = "MLRNImages"; export type ImageEntry = string | ImageSourcePropType; @@ -126,9 +126,9 @@ const Images = ({ ..._getImages(), }; - return {children}; + return {children}; }; -const RCTMLNImages = requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNImages = requireNativeComponent(NATIVE_MODULE_NAME); export default Images; diff --git a/src/components/Light.tsx b/src/components/Light.tsx index 449280e60..caa4191a9 100644 --- a/src/components/Light.tsx +++ b/src/components/Light.tsx @@ -8,7 +8,7 @@ import { type BaseProps } from "../types/BaseProps"; import { type LightLayerStyleProps } from "../utils/MapLibreRNStyles"; import { type StyleValue } from "../utils/StyleValue"; -export const NATIVE_MODULE_NAME = "RCTMLNLight"; +export const NATIVE_MODULE_NAME = "MLRNLight"; interface LightProps extends BaseProps, BaseLayerProps { /** @@ -21,7 +21,7 @@ interface NativeProps extends Omit { reactStyle?: { [key: string]: StyleValue }; } -const RCTMLNLight = requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNLight = requireNativeComponent(NATIVE_MODULE_NAME); /** * Light represents the light source for extruded geometries @@ -35,7 +35,7 @@ const Light: React.FC = (props: LightProps) => { }); return ( - + ); }; diff --git a/src/components/LineLayer.tsx b/src/components/LineLayer.tsx index d286196d2..8ddbb9838 100644 --- a/src/components/LineLayer.tsx +++ b/src/components/LineLayer.tsx @@ -10,7 +10,7 @@ import { type LineLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNLineLayer"; +export const NATIVE_MODULE_NAME = "MLRNLineLayer"; export interface LineLayerProps extends BaseProps, BaseLayerProps { /** @@ -21,7 +21,7 @@ export interface LineLayerProps extends BaseProps, BaseLayerProps { interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNLineLayer = +const MLRNLineLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -39,7 +39,7 @@ const LineLayer: React.FC = ({ sourceID, }); - return ; + return ; }; export default LineLayer; diff --git a/src/components/MapView.tsx b/src/components/MapView.tsx index 8ea0b7ca4..0576fd481 100644 --- a/src/components/MapView.tsx +++ b/src/components/MapView.tsx @@ -38,9 +38,9 @@ if (MapLibreGL == null) { ); } -export const NATIVE_MODULE_NAME = "RCTMLNMapView"; +export const NATIVE_MODULE_NAME = "MLRNMapView"; -export const ANDROID_TEXTURE_NATIVE_MODULE_NAME = "RCTMLNAndroidTextureMapView"; +export const ANDROID_TEXTURE_NATIVE_MODULE_NAME = "MLRNAndroidTextureMapView"; const styles = StyleSheet.create({ matchParent: { flex: 1 }, @@ -417,7 +417,7 @@ const MapView = memo( useOnce(() => { logger.current.start(); }); - const _nativeRef = useRef(); + const _nativeRef = useRef(); const [isReady, setIsReady] = useState(false); // Cleanups on unmount @@ -771,7 +771,7 @@ const MapView = memo( return props.contentInset; }, [props.contentInset]); - const _setNativeRef = (nativeRef: RCTMLNMapViewRefType): void => { + const _setNativeRef = (nativeRef: MLRNMapViewRefType): void => { _nativeRef.current = nativeRef; _runPendingNativeCommands(nativeRef); }; @@ -832,7 +832,7 @@ const MapView = memo( _setStyleURL(nativeProps); const callbacks = { - ref: (ref: RCTMLNMapViewRefType): void => _setNativeRef(ref), + ref: (ref: MLRNMapViewRefType): void => _setNativeRef(ref), onPress: _onPress, onLongPress: _onLongPress, onMapChange: _onChange, @@ -842,15 +842,15 @@ const MapView = memo( let mapView: ReactElement | null = null; if (isAndroid() && !surfaceView && isReady) { mapView = ( - + {props.children} - + ); } else if (isReady) { mapView = ( - + {props.children} - + ); } @@ -867,12 +867,12 @@ const MapView = memo( ), ); -type RCTMLNMapViewRefType = Component & Readonly; -const RCTMLNMapView = requireNativeComponent(NATIVE_MODULE_NAME); +type MLRNMapViewRefType = Component & Readonly; +const MLRNMapView = requireNativeComponent(NATIVE_MODULE_NAME); -let RCTMLNAndroidTextureMapView: typeof RCTMLNMapView; +let MLRNAndroidTextureMapView: typeof MLRNMapView; if (isAndroid()) { - RCTMLNAndroidTextureMapView = requireNativeComponent( + MLRNAndroidTextureMapView = requireNativeComponent( ANDROID_TEXTURE_NATIVE_MODULE_NAME, ); } diff --git a/src/components/MarkerView.tsx b/src/components/MarkerView.tsx index ffd6a741f..9a5f3a548 100644 --- a/src/components/MarkerView.tsx +++ b/src/components/MarkerView.tsx @@ -5,7 +5,7 @@ import { Platform, requireNativeComponent, type ViewProps } from "react-native"; import PointAnnotation from "./PointAnnotation"; import { toJSONString } from "../utils"; -export const NATIVE_MODULE_NAME = "RCTMLNMarkerView"; +export const NATIVE_MODULE_NAME = "MLRNMarkerView"; interface MarkerViewProps extends ViewProps { /** @@ -78,12 +78,12 @@ const MarkerView = ({ coordinate, }; - return {props.children}; + return {props.children}; }; let lastId = 0; -const RCTMLNMarkerView = +const MLRNMarkerView = requireNativeComponent(NATIVE_MODULE_NAME); export default MarkerView; diff --git a/src/components/NativeUserLocation.tsx b/src/components/NativeUserLocation.tsx index 7e9051541..e3bd46bf9 100644 --- a/src/components/NativeUserLocation.tsx +++ b/src/components/NativeUserLocation.tsx @@ -1,7 +1,7 @@ import { type ReactElement } from "react"; import { requireNativeComponent } from "react-native"; -const NATIVE_MODULE_NAME = "RCTMLNNativeUserLocation"; +const NATIVE_MODULE_NAME = "MLRNNativeUserLocation"; interface NativeUserLocationProps { /** @@ -27,9 +27,9 @@ interface NativeUserLocationProps { } const NativeUserLocation = (props: NativeUserLocationProps): ReactElement => { - return ; + return ; }; -const RCTMLNNativeUserLocation = requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNNativeUserLocation = requireNativeComponent(NATIVE_MODULE_NAME); export default NativeUserLocation; diff --git a/src/components/PointAnnotation.tsx b/src/components/PointAnnotation.tsx index c18469294..fbadb5eb7 100644 --- a/src/components/PointAnnotation.tsx +++ b/src/components/PointAnnotation.tsx @@ -17,7 +17,7 @@ import { import useNativeBridge, { type RNMLEvent } from "../hooks/useNativeBridge"; import { isFunction, toJSONString } from "../utils"; -export const NATIVE_MODULE_NAME = "RCTMLNPointAnnotation"; +export const NATIVE_MODULE_NAME = "MLRNPointAnnotation"; const styles = StyleSheet.create({ container: { @@ -228,9 +228,9 @@ const PointAnnotation = forwardRef( }; return ( - + {props.children} - + ); }, ); @@ -239,7 +239,7 @@ const PointAnnotation = forwardRef( // not sure why only in this component PointAnnotation.displayName = "PointAnnotation"; -const RCTMLNPointAnnotation = +const MLRNPointAnnotation = requireNativeComponent(NATIVE_MODULE_NAME); export default PointAnnotation; diff --git a/src/components/RasterLayer.tsx b/src/components/RasterLayer.tsx index 926a0cd29..dec77e380 100644 --- a/src/components/RasterLayer.tsx +++ b/src/components/RasterLayer.tsx @@ -10,7 +10,7 @@ import { type RasterLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNRasterLayer"; +export const NATIVE_MODULE_NAME = "MLRNRasterLayer"; export interface RasterLayerProps extends BaseProps, BaseLayerProps { /** @@ -23,7 +23,7 @@ interface NativeProps extends Omit, NativeBaseProps {} -const RCTMLNRasterLayer = +const MLRNRasterLayer = requireNativeComponent(NATIVE_MODULE_NAME); const RasterLayer: React.FC = ({ @@ -38,7 +38,7 @@ const RasterLayer: React.FC = ({ sourceID, }); - return ; + return ; }; export default RasterLayer; diff --git a/src/components/RasterSource.tsx b/src/components/RasterSource.tsx index ed7e02646..4f99488ea 100644 --- a/src/components/RasterSource.tsx +++ b/src/components/RasterSource.tsx @@ -8,7 +8,7 @@ import { cloneReactChildrenWithProps } from "../utils"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNRasterSource"; +export const NATIVE_MODULE_NAME = "MLRNRasterSource"; const isTileTemplateUrl = (url?: string): url is string => !!url && @@ -60,7 +60,7 @@ interface RasterSourceProps extends BaseProps { type NativeProps = RasterSourceProps; -const RCTMLNRasterSource = +const MLRNRasterSource = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -103,11 +103,11 @@ const RasterSource: React.FC = ({ }; return ( - + {cloneReactChildrenWithProps(props.children, { sourceID: id, })} - + ); }; diff --git a/src/components/ShapeSource.tsx b/src/components/ShapeSource.tsx index 98d41b9fb..1a6c330a1 100644 --- a/src/components/ShapeSource.tsx +++ b/src/components/ShapeSource.tsx @@ -30,14 +30,14 @@ import { copyPropertiesAsDeprecated } from "../utils/deprecation"; import { getFilter } from "../utils/filterUtils"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNShapeSource"; +export const NATIVE_MODULE_NAME = "MLRNShapeSource"; export const SHAPE_SOURCE_NATIVE_ASSETS_KEY = "assets"; interface NativeProps { shape?: string; } -type RCTMLNShapeSourceRefType = Component & +type MLRNShapeSourceRefType = Component & Readonly; export interface ShapeSourceProps extends BaseProps { @@ -154,7 +154,7 @@ export interface ShapeSourceRef { onPress: (event: NativeSyntheticEvent<{ payload: OnPressEvent }>) => void; // this was required by existing test __tests__/utils/animated/AnimatedCoordinatesArray.test.js - _nativeRef: RCTMLNShapeSourceRefType | undefined; + _nativeRef: MLRNShapeSourceRefType | undefined; } /** @@ -222,7 +222,7 @@ const ShapeSource = memo( }), ); - const _nativeRef = useRef(); + const _nativeRef = useRef(); const { _runNativeCommand, @@ -230,7 +230,7 @@ const ShapeSource = memo( _onAndroidCallback, } = useNativeBridge(NATIVE_MODULE_NAME); - const _setNativeRef = (nativeRef: RCTMLNShapeSourceRefType): void => { + const _setNativeRef = (nativeRef: MLRNShapeSourceRefType): void => { _nativeRef.current = nativeRef; _runPendingNativeCommands(nativeRef); }; @@ -422,17 +422,17 @@ const ShapeSource = memo( }; return ( - + {cloneReactChildrenWithProps(props.children, { sourceID: shapeId, })} - + ); }, ), ); -const RCTMLNShapeSource = +const MLRNShapeSource = requireNativeComponent(NATIVE_MODULE_NAME); export default ShapeSource; diff --git a/src/components/SymbolLayer.tsx b/src/components/SymbolLayer.tsx index 606d3b0ce..c6a100f81 100644 --- a/src/components/SymbolLayer.tsx +++ b/src/components/SymbolLayer.tsx @@ -10,7 +10,7 @@ import { type SymbolLayerStyleProps } from "../utils/MapLibreRNStyles"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNSymbolLayer"; +export const NATIVE_MODULE_NAME = "MLRNSymbolLayer"; export interface SymbolLayerProps extends BaseProps, BaseLayerProps { /** @@ -29,7 +29,7 @@ interface NativeProps extends Omit, NativeBaseProps { snapshot: boolean; } -const RCTMLNSymbolLayer = +const MLRNSymbolLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -69,9 +69,9 @@ const SymbolLayer: React.FC = ({ }; return ( - + {props.children} - + ); }; diff --git a/src/components/VectorSource.tsx b/src/components/VectorSource.tsx index 08b07a72e..fcd2837ea 100644 --- a/src/components/VectorSource.tsx +++ b/src/components/VectorSource.tsx @@ -17,7 +17,7 @@ import { getFilter } from "../utils/filterUtils"; const MapLibreGL = NativeModules.MLNModule; -export const NATIVE_MODULE_NAME = "RCTMLNVectorSource"; +export const NATIVE_MODULE_NAME = "MLRNVectorSource"; interface VectorSourceProps extends BaseProps { /** @@ -83,7 +83,7 @@ interface VectorSourceProps extends BaseProps { type NativeProps = VectorSourceProps; -const RCTMLNVectorSource = +const MLRNVectorSource = requireNativeComponent(NATIVE_MODULE_NAME); /** @@ -205,11 +205,11 @@ const VectorSource = memo( }; return ( - + {cloneReactChildrenWithProps(props.children, { sourceID: id, })} - + ); }, ), diff --git a/src/modules/location/locationManager.ts b/src/modules/location/locationManager.ts index c3a561d74..a73d9f216 100644 --- a/src/modules/location/locationManager.ts +++ b/src/modules/location/locationManager.ts @@ -5,7 +5,7 @@ import { } from "react-native"; const MapLibreGL = NativeModules.MLNModule; -const MapLibreGLLocationManager = NativeModules.MLNLocationModule; +const MapLibreGLLocationManager = NativeModules.MLRNLocationModule; export const LocationModuleEventEmitter = new NativeEventEmitter( MapLibreGLLocationManager, diff --git a/src/utils/Logger.ts b/src/utils/Logger.ts index dc95ffaf6..ea840996f 100644 --- a/src/utils/Logger.ts +++ b/src/utils/Logger.ts @@ -3,7 +3,7 @@ import { NativeEventEmitter, NativeModules, } from "react-native"; -const { MLNLogging } = NativeModules; +const MLRNLogging = NativeModules.MLRNLogging; export type LogLevel = "error" | "warning" | "info" | "debug" | "verbose"; interface Log { @@ -30,7 +30,7 @@ class Logger { private subscription: EmitterSubscription | null; constructor() { - this.loggerEmitter = new NativeEventEmitter(MLNLogging); + this.loggerEmitter = new NativeEventEmitter(MLRNLogging); this.startedCount = 0; this.logCallback = null; this.subscription = null; @@ -68,7 +68,7 @@ class Logger { * @param {LogLevel} level */ static setLogLevel(level: LogLevel): void { - MLNLogging.setLogLevel(level); + MLRNLogging.setLogLevel(level); } /** From 9e6e10c2191bbabcc64247949bc85a8f33f95b45 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 07:20:43 +0100 Subject: [PATCH 3/9] refactor: align module prefix to MLRN --- .../modules/location/locationManager.test.js | 60 +++++++++--------- __tests__/modules/offline/OfflinePack.test.js | 9 ++- .../modules/offline/offlineManager.test.js | 22 +++++-- .../modules/snapshot/SnapshotOptions.test.js | 6 +- .../mlrn/modules/MLRNLocationModule.java | 2 +- .../maplibre/mlrn/modules/MLRNLogging.java | 2 +- .../org/maplibre/mlrn/modules/MLRNModule.java | 2 +- .../mlrn/modules/MLRNOfflineModule.java | 2 +- .../mlrn/modules/MLRNSnapshotModule.java | 2 +- docs/BackgroundLayer.md | 2 +- docs/CircleLayer.md | 2 +- docs/CustomHttpHeaders.md | 8 +-- docs/FillExtrusionLayer.md | 2 +- docs/FillLayer.md | 2 +- docs/HeatmapLayer.md | 2 +- docs/LineLayer.md | 2 +- docs/RasterLayer.md | 2 +- docs/RasterSource.md | 2 +- docs/ShapeSource.md | 2 +- docs/SymbolLayer.md | 2 +- docs/VectorSource.md | 2 +- docs/docs.json | 22 +++---- ...MLNCustomHeaders.h => MLRNCustomHeaders.h} | 4 +- ...MLNCustomHeaders.m => MLRNCustomHeaders.m} | 12 ++-- ios/MLRN/{MLNModule.h => MLRNModule.h} | 4 +- ios/MLRN/{MLNModule.m => MLRNModule.m} | 14 ++--- ...MLNOfflineModule.h => MLRNOfflineModule.h} | 4 +- ...MLNOfflineModule.m => MLRNOfflineModule.m} | 6 +- ...NSnapshotModule.h => MLRNSnapshotModule.h} | 4 +- ...NSnapshotModule.m => MLRNSnapshotModule.m} | 6 +- jest-setup.ts | 8 +-- src/{MLNModule.ts => MLRNModule.ts} | 6 +- src/MapLibreRN.ts | 2 +- src/components/BackgroundLayer.tsx | 4 +- src/components/Camera.tsx | 2 +- src/components/CircleLayer.tsx | 7 +-- src/components/FillExtrusionLayer.tsx | 4 +- src/components/FillLayer.tsx | 4 +- src/components/HeatmapLayer.tsx | 4 +- src/components/LineLayer.tsx | 4 +- src/components/MapView.tsx | 62 +++++++++---------- src/components/RasterLayer.tsx | 7 +-- src/components/RasterSource.tsx | 4 +- src/components/ShapeSource.tsx | 10 ++- src/components/SymbolLayer.tsx | 7 +-- src/components/VectorSource.tsx | 4 +- src/modules/location/locationManager.ts | 17 +++-- src/modules/offline/OfflinePack.ts | 8 +-- src/modules/offline/offlineManager.ts | 37 ++++++----- src/modules/snapshot/SnapshotOptions.ts | 4 +- src/modules/snapshot/snapshotManager.ts | 4 +- 51 files changed, 213 insertions(+), 209 deletions(-) rename ios/MLRN/{MLNCustomHeaders.h => MLRNCustomHeaders.h} (84%) rename ios/MLRN/{MLNCustomHeaders.m => MLRNCustomHeaders.m} (91%) rename ios/MLRN/{MLNModule.h => MLRNModule.h} (73%) rename ios/MLRN/{MLNModule.m => MLRNModule.m} (98%) rename ios/MLRN/{MLNOfflineModule.h => MLRNOfflineModule.h} (78%) rename ios/MLRN/{MLNOfflineModule.m => MLRNOfflineModule.m} (99%) rename ios/MLRN/{MLNSnapshotModule.h => MLRNSnapshotModule.h} (65%) rename ios/MLRN/{MLNSnapshotModule.m => MLRNSnapshotModule.m} (96%) rename src/{MLNModule.ts => MLRNModule.ts} (88%) diff --git a/__tests__/modules/location/locationManager.test.js b/__tests__/modules/location/locationManager.test.js index befe8822c..214bf654d 100644 --- a/__tests__/modules/location/locationManager.test.js +++ b/__tests__/modules/location/locationManager.test.js @@ -4,8 +4,8 @@ import LocationManager, { LocationModuleEventEmitter, } from "../../../src/modules/location/locationManager"; -const MapLibreGL = NativeModules.MLNModule; -const MapLibreGLLocationManager = NativeModules.MLNLocationModule; +const MapLibreRN = NativeModules.MLRNModule; +const MLRNLocationModule = NativeModules.MLRNLocationModule; const location = { coords: { @@ -37,16 +37,16 @@ describe("LocationManager", () => { describe("#getLastKnownLocation", () => { test("gets last known location from native locationManager if non available", async () => { jest - .spyOn(MapLibreGLLocationManager, "getLastKnownLocation") + .spyOn(MLRNLocationModule, "getLastKnownLocation") .mockImplementation(() => location); const lastKnownLocation = await locationManager.getLastKnownLocation(); expect(lastKnownLocation).toStrictEqual(location); expect(locationManager._lastKnownLocation).toStrictEqual(location); - expect( - MapLibreGLLocationManager.getLastKnownLocation, - ).toHaveBeenCalledTimes(1); + expect(MLRNLocationModule.getLastKnownLocation).toHaveBeenCalledTimes( + 1, + ); locationManager._lastKnownLocation = null; }); @@ -58,9 +58,7 @@ describe("LocationManager", () => { expect(locationManager._lastKnownLocation).toStrictEqual(location); - expect( - MapLibreGLLocationManager.getLastKnownLocation, - ).not.toHaveBeenCalled(); + expect(MLRNLocationModule.getLastKnownLocation).not.toHaveBeenCalled(); // reset locationManager._lastKnownLocation = null; @@ -69,7 +67,7 @@ describe("LocationManager", () => { describe("#addListener", () => { const myListener = jest.fn(); - MapLibreGL.LocationCallbackName = { Update: "MapboxUserLocationUpdate" }; + MapLibreRN.LocationCallbackName = { Update: "MapboxUserLocationUpdate" }; afterEach(() => { locationManager._listeners = []; @@ -100,7 +98,7 @@ describe("LocationManager", () => { }); describe("#removeListener", () => { - MapLibreGLLocationManager.stop = jest.fn(); + MLRNLocationModule.stop = jest.fn(); test("removes selected listener", () => { // just two different functions @@ -109,22 +107,22 @@ describe("LocationManager", () => { locationManager.addListener(listenerA); expect(locationManager._listeners).toStrictEqual([listenerA]); - expect(MapLibreGLLocationManager.stop).not.toHaveBeenCalled(); + expect(MLRNLocationModule.stop).not.toHaveBeenCalled(); locationManager.addListener(listenerB); expect(locationManager._listeners).toStrictEqual([ listenerA, listenerB, ]); - expect(MapLibreGLLocationManager.stop).not.toHaveBeenCalled(); + expect(MLRNLocationModule.stop).not.toHaveBeenCalled(); locationManager.removeListener(listenerB); expect(locationManager._listeners).toStrictEqual([listenerA]); - expect(MapLibreGLLocationManager.stop).not.toHaveBeenCalled(); + expect(MLRNLocationModule.stop).not.toHaveBeenCalled(); locationManager.removeListener(listenerA); expect(locationManager._listeners).toStrictEqual([]); - expect(MapLibreGLLocationManager.stop).toHaveBeenCalledTimes(1); + expect(MLRNLocationModule.stop).toHaveBeenCalledTimes(1); }); }); @@ -148,7 +146,7 @@ describe("LocationManager", () => { }); describe("#start", () => { - jest.spyOn(MapLibreGLLocationManager, "start"); + jest.spyOn(MLRNLocationModule, "start"); jest.spyOn(LocationModuleEventEmitter, "addListener"); afterEach(() => { @@ -156,7 +154,7 @@ describe("LocationManager", () => { }); test("starts native location manager and adds event emitter listener", () => { - MapLibreGL.LocationCallbackName = { + MapLibreRN.LocationCallbackName = { Update: "MapboxUserLocationUpdate", }; @@ -164,9 +162,9 @@ describe("LocationManager", () => { locationManager.start(); - expect(MapLibreGLLocationManager.start).toHaveBeenCalledTimes(1); + expect(MLRNLocationModule.start).toHaveBeenCalledTimes(1); expect(LocationModuleEventEmitter.addListener).toHaveBeenCalledWith( - MapLibreGL.LocationCallbackName.Update, + MapLibreRN.LocationCallbackName.Update, locationManager.onUpdate, ); @@ -176,8 +174,8 @@ describe("LocationManager", () => { test('passes "displacement"', () => { locationManager.start(5); // displacement 5meters - expect(MapLibreGLLocationManager.start).toHaveBeenCalledTimes(1); - expect(MapLibreGLLocationManager.start).toHaveBeenCalledWith(5); + expect(MLRNLocationModule.start).toHaveBeenCalledTimes(1); + expect(MLRNLocationModule.start).toHaveBeenCalledWith(5); }); test("does not start when already listening", () => { @@ -188,7 +186,7 @@ describe("LocationManager", () => { locationManager.start(); - expect(MapLibreGLLocationManager.start).not.toHaveBeenCalled(); + expect(MLRNLocationModule.start).not.toHaveBeenCalled(); expect(LocationModuleEventEmitter.addListener).not.toHaveBeenCalled(); }); }); @@ -199,8 +197,8 @@ describe("LocationManager", () => { locationManager._isListening = true; // native location manager has no #stop exposed in tests? - MapLibreGLLocationManager.stop = jest.fn(); - MapLibreGL.LocationCallbackName = { + MLRNLocationModule.stop = jest.fn(); + MapLibreRN.LocationCallbackName = { Update: "MapboxUserLocationUpdate", }; @@ -208,7 +206,7 @@ describe("LocationManager", () => { locationManager.stop(); - expect(MapLibreGLLocationManager.stop).toHaveBeenCalledTimes(1); + expect(MLRNLocationModule.stop).toHaveBeenCalledTimes(1); expect(locationManager.subscription.remove).toHaveBeenCalled(); expect(locationManager._isListening).toStrictEqual(false); @@ -219,8 +217,8 @@ describe("LocationManager", () => { locationManager._isListening = false; // native location manager has no #stop exposed in tests? - MapLibreGLLocationManager.stop = jest.fn(); - MapLibreGL.LocationCallbackName = { + MLRNLocationModule.stop = jest.fn(); + MapLibreRN.LocationCallbackName = { Update: "MapboxUserLocationUpdate", }; @@ -228,18 +226,16 @@ describe("LocationManager", () => { locationManager.stop(); - expect(MapLibreGLLocationManager.stop).toHaveBeenCalledTimes(1); + expect(MLRNLocationModule.stop).toHaveBeenCalledTimes(1); expect(locationManager.subscription.remove).not.toHaveBeenCalled(); }); }); describe("#setMinDisplacement", () => { test('calls native "setMinDisplacement"', () => { - MapLibreGLLocationManager.setMinDisplacement = jest.fn(); + MLRNLocationModule.setMinDisplacement = jest.fn(); locationManager.setMinDisplacement(5); - expect( - MapLibreGLLocationManager.setMinDisplacement, - ).toHaveBeenCalledWith(5); + expect(MLRNLocationModule.setMinDisplacement).toHaveBeenCalledWith(5); }); }); diff --git a/__tests__/modules/offline/OfflinePack.test.js b/__tests__/modules/offline/OfflinePack.test.js index effc9695e..98e2845c8 100644 --- a/__tests__/modules/offline/OfflinePack.test.js +++ b/__tests__/modules/offline/OfflinePack.test.js @@ -20,7 +20,7 @@ describe("OfflinePack", () => { it("should resume pack download", () => { const spy = jest.spyOn( - NativeModules.MLNOfflineModule, + NativeModules.MLRNOfflineModule, "resumePackDownload", ); const offlinePack = new OfflinePack(fakeNativePack); @@ -30,7 +30,10 @@ describe("OfflinePack", () => { }); it("should pause pack download", () => { - const spy = jest.spyOn(NativeModules.MLNOfflineModule, "pausePackDownload"); + const spy = jest.spyOn( + NativeModules.MLRNOfflineModule, + "pausePackDownload", + ); const offlinePack = new OfflinePack(fakeNativePack); offlinePack.pause(); expect(spy).toHaveBeenCalled(); @@ -38,7 +41,7 @@ describe("OfflinePack", () => { }); it("should get pack status", () => { - const spy = jest.spyOn(NativeModules.MLNOfflineModule, "getPackStatus"); + const spy = jest.spyOn(NativeModules.MLRNOfflineModule, "getPackStatus"); const offlinePack = new OfflinePack(fakeNativePack); offlinePack.status(); expect(spy).toHaveBeenCalled(); diff --git a/__tests__/modules/offline/offlineManager.test.js b/__tests__/modules/offline/offlineManager.test.js index 93cb294af..a48205980 100644 --- a/__tests__/modules/offline/offlineManager.test.js +++ b/__tests__/modules/offline/offlineManager.test.js @@ -71,7 +71,10 @@ describe("offlineManager", () => { it("should set max tile count limit", () => { const expectedLimit = 2000; - const spy = jest.spyOn(NativeModules.MLNOfflineModule, "setTileCountLimit"); + const spy = jest.spyOn( + NativeModules.MLRNOfflineModule, + "setTileCountLimit", + ); MapLibreGL.offlineManager.setTileCountLimit(expectedLimit); expect(spy).toHaveBeenCalledWith(expectedLimit); spy.mockRestore(); @@ -80,7 +83,7 @@ describe("offlineManager", () => { it("should set progress event throttle value", () => { const expectedThrottleValue = 500; const spy = jest.spyOn( - NativeModules.MLNOfflineModule, + NativeModules.MLRNOfflineModule, "setProgressEventThrottle", ); MapLibreGL.offlineManager.setProgressEventThrottle(expectedThrottleValue); @@ -194,7 +197,10 @@ describe("offlineManager", () => { beforeEach(() => (Platform.OS = "android")); it("should set pack observer manually", async () => { - const spy = jest.spyOn(NativeModules.MLNOfflineModule, "setPackObserver"); + const spy = jest.spyOn( + NativeModules.MLRNOfflineModule, + "setPackObserver", + ); const name = `test-${Date.now()}`; const noop = () => {}; @@ -207,7 +213,10 @@ describe("offlineManager", () => { }); it("should not set pack observer manually during create flow", async () => { - const spy = jest.spyOn(NativeModules.MLNOfflineModule, "setPackObserver"); + const spy = jest.spyOn( + NativeModules.MLRNOfflineModule, + "setPackObserver", + ); const name = `test-${Date.now()}`; const noop = () => {}; @@ -223,7 +232,10 @@ describe("offlineManager", () => { beforeEach(() => (Platform.OS = "ios")); it("should not set pack observer manually", async () => { - const spy = jest.spyOn(NativeModules.MLNOfflineModule, "setPackObserver"); + const spy = jest.spyOn( + NativeModules.MLRNOfflineModule, + "setPackObserver", + ); const name = `test-${Date.now()}`; const noop = () => {}; diff --git a/__tests__/modules/snapshot/SnapshotOptions.test.js b/__tests__/modules/snapshot/SnapshotOptions.test.js index fab768d91..08451081d 100644 --- a/__tests__/modules/snapshot/SnapshotOptions.test.js +++ b/__tests__/modules/snapshot/SnapshotOptions.test.js @@ -14,7 +14,7 @@ describe("SnapshotOptions", () => { const options = new SnapshotOptions({ centerCoordinate }); expect(options.toJSON()).toEqual({ - styleURL: NativeModules.MLNModule.StyleURL.Default, + styleURL: NativeModules.MLRNModule.StyleURL.Default, heading: 0.0, pitch: 0.0, zoomLevel: 16.0, @@ -36,7 +36,7 @@ describe("SnapshotOptions", () => { height: 600, writeToDisk: true, withLogo: true, - styleURL: NativeModules.MLNModule.StyleURL.Default, + styleURL: NativeModules.MLRNModule.StyleURL.Default, }; const options = new SnapshotOptions(expectedOptions); @@ -54,7 +54,7 @@ describe("SnapshotOptions", () => { ], width: 400, height: 600, - styleURL: NativeModules.MLNModule.StyleURL.Default, + styleURL: NativeModules.MLRNModule.StyleURL.Default, writeToDisk: false, withLogo: true, }; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java index 3cf313e34..afa9c8cff 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java @@ -18,7 +18,7 @@ @ReactModule(name = MLRNLocationModule.REACT_CLASS) public class MLRNLocationModule extends ReactContextBaseJavaModule { - public static final String REACT_CLASS = "MLNLocationModule"; + public static final String REACT_CLASS = "MLRNLocationModule"; public static final String LOCATION_UPDATE = "MapboxUserLocationUpdate"; private boolean isEnabled; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java index b8f6da318..56baf59e5 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java @@ -13,7 +13,7 @@ @ReactModule(name = MLRNLogging.REACT_CLASS) public class MLRNLogging extends ReactContextBaseJavaModule { - public static final String REACT_CLASS = "MLNLogging"; + public static final String REACT_CLASS = "MLRNLogging"; private ReactApplicationContext mReactContext; public MLRNLogging(ReactApplicationContext reactApplicationContext) { diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java index b30ec5a17..952a3984d 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java @@ -36,7 +36,7 @@ @ReactModule(name = MLRNModule.REACT_CLASS) public class MLRNModule extends ReactContextBaseJavaModule { - public static final String REACT_CLASS = "MLNModule"; + public static final String REACT_CLASS = "MLRNModule"; private static boolean customHeaderInterceptorAdded = false; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java index 4a44dfa48..d5f1149dd 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java @@ -38,7 +38,7 @@ @ReactModule(name = MLRNOfflineModule.REACT_CLASS) public class MLRNOfflineModule extends ReactContextBaseJavaModule { - public static final String REACT_CLASS = "MLNOfflineModule"; + public static final String REACT_CLASS = "MLRNOfflineModule"; public static final int INACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_INACTIVE; public static final int ACTIVE_REGION_DOWNLOAD_STATE = OfflineRegion.STATE_ACTIVE; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java index 3a380d90d..12f9faf45 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java @@ -40,7 +40,7 @@ @ReactModule(name = MLRNSnapshotModule.REACT_CLASS) public class MLRNSnapshotModule extends ReactContextBaseJavaModule { - public static final String REACT_CLASS = "MLNSnapshotModule"; + public static final String REACT_CLASS = "MLRNSnapshotModule"; private ReactApplicationContext mContext; diff --git a/docs/BackgroundLayer.md b/docs/BackgroundLayer.md index 552786c56..d532ed197 100644 --- a/docs/BackgroundLayer.md +++ b/docs/BackgroundLayer.md @@ -7,7 +7,7 @@ | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `BackgroundLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/CircleLayer.md b/docs/CircleLayer.md index cde208781..de5fbaae3 100644 --- a/docs/CircleLayer.md +++ b/docs/CircleLayer.md @@ -7,7 +7,7 @@ CircleLayer is a style layer that renders one or more filled circles on the map. | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `CircleLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/CustomHttpHeaders.md b/docs/CustomHttpHeaders.md index 71379cbe0..e4890c876 100644 --- a/docs/CustomHttpHeaders.md +++ b/docs/CustomHttpHeaders.md @@ -14,14 +14,14 @@ None #### IOS -To enable this on iOS you need to call `[[MLNCustomHeaders sharedInstance] initHeaders]` pretty early in the lifecycle of the application. This will swizzle the custom method. +To enable this on iOS you need to call `[[MLRNCustomHeaders sharedInstance] initHeaders]` pretty early in the lifecycle of the application. This will swizzle the custom method. Suggested location is `[AppDelegate application: didFinishLaunchingWithOptions:]` #### Working example (AppDelegate.m) ```obj-c // (1) Include the header file -#import "MLNCustomHeaders.h" +#import "MLRNCustomHeaders.h" @implementation AppDelegate @@ -32,9 +32,9 @@ Suggested location is `[AppDelegate application: didFinishLaunchingWithOptions:] moduleName:@"SampleApp" initialProperties:nil]; // (2) Init headers, add swizzle method - [[MLNCustomHeaders sharedInstance] initHeaders]; + [[MLRNCustomHeaders sharedInstance] initHeaders]; // (3*) Optionally you can add some global headers here - [[MLNCustomHeaders sharedInstance] addHeader:@"IP" forHeaderName:@"X-For-Real"]; + [[MLRNCustomHeaders sharedInstance] addHeader:@"IP" forHeaderName:@"X-For-Real"]; ... return YES; diff --git a/docs/FillExtrusionLayer.md b/docs/FillExtrusionLayer.md index af71e61d1..89ff80e32 100644 --- a/docs/FillExtrusionLayer.md +++ b/docs/FillExtrusionLayer.md @@ -7,7 +7,7 @@ FillExtrusionLayer is a style layer that renders one or more 3D extruded polygon | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `FillExtrusionLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/FillLayer.md b/docs/FillLayer.md index af87e33d9..797b51373 100644 --- a/docs/FillLayer.md +++ b/docs/FillLayer.md @@ -7,7 +7,7 @@ FillLayer is a style layer that renders one or more filled (and optionally strok | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `FillLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/HeatmapLayer.md b/docs/HeatmapLayer.md index 6089bb84c..0a54971c4 100644 --- a/docs/HeatmapLayer.md +++ b/docs/HeatmapLayer.md @@ -7,7 +7,7 @@ HeatmapLayer is a style layer that renders one or more filled circles on the map | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `HeatmapLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/LineLayer.md b/docs/LineLayer.md index 3b32dfa6b..e1d1d2720 100644 --- a/docs/LineLayer.md +++ b/docs/LineLayer.md @@ -7,7 +7,7 @@ LineLayer is a style layer that renders one or more stroked polylines on the map | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `LineLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/RasterLayer.md b/docs/RasterLayer.md index b9ab8d920..0eb561ca4 100644 --- a/docs/RasterLayer.md +++ b/docs/RasterLayer.md @@ -7,7 +7,7 @@ | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | style | `RasterLayerStyleProps` | `none` | `false` | Customizable style attributes | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/RasterSource.md b/docs/RasterSource.md index ba02b41ae..becefedbd 100644 --- a/docs/RasterSource.md +++ b/docs/RasterSource.md @@ -6,7 +6,7 @@ RasterSource is a map content source that supplies raster image tiles to be show ## Props | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | -| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. | +| id | `string` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. | | url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. | | tileUrlTemplates | `Array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.
Example: https://example.com/raster-tiles/{z}/{x}/{y}.png | | minZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.
The value should be between 0 and 22, inclusive, and less than
maxZoomLevel, if specified. The default value for this option is 0. | diff --git a/docs/ShapeSource.md b/docs/ShapeSource.md index 13c647200..112b43f2c 100644 --- a/docs/ShapeSource.md +++ b/docs/ShapeSource.md @@ -6,7 +6,7 @@ ShapeSource is a map content source that supplies vector shapes to be shown on t ## Props | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | -| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. | +| id | `string` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. | | url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. | | 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. | | cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. | diff --git a/docs/SymbolLayer.md b/docs/SymbolLayer.md index e663f6464..0de55a419 100644 --- a/docs/SymbolLayer.md +++ b/docs/SymbolLayer.md @@ -8,7 +8,7 @@ SymbolLayer is a style layer that renders icon and text labels at points or alon | ---- | :--: | :-----: | :------: | :----------: | | style | `SymbolLayerStyleProps` | `none` | `false` | Customizable style attributes | | children | `ReactElement \| ReactElement[]` | `none` | `false` | @deprecated passed children used to create an image with id of symbol in style and also set the iconImageName property accordingly.
This is now deprecated, use Image component instead. | -| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | +| sourceID | `FIX ME UNKNOWN TYPE` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION | ## Styles diff --git a/docs/VectorSource.md b/docs/VectorSource.md index 6944ce80a..09a854654 100644 --- a/docs/VectorSource.md +++ b/docs/VectorSource.md @@ -6,7 +6,7 @@ VectorSource is a map content source that supplies tiled vector data in Mapbox V ## Props | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | -| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. | +| id | `string` | `MapLibreRN.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. | | url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. | | tileUrlTemplates | `Array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.
Example: https://example.com/vector-tiles/{z}/{x}/{y}.pbf | | minZoomLevel | `number` | `none` | `false` | An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.
The value should be between 0 and 22, inclusive, and less than
maxZoomLevel, if specified. The default value for this option is 0. | diff --git a/docs/docs.json b/docs/docs.json index cb8152403..95f3cb83f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -100,7 +100,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -566,7 +566,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -869,7 +869,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -1083,7 +1083,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -1309,7 +1309,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -1670,7 +1670,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -2776,7 +2776,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -2974,7 +2974,7 @@ "name": "id", "required": false, "type": "string", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "A string that uniquely identifies the source." }, { @@ -3213,7 +3213,7 @@ "name": "id", "required": false, "type": "string", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "A string that uniquely identifies the source." }, { @@ -3387,7 +3387,7 @@ "name": "sourceID", "required": false, "type": "FIX ME UNKNOWN TYPE", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "FIX ME NO DESCRIPTION" } ], @@ -4918,7 +4918,7 @@ "name": "id", "required": false, "type": "string", - "default": "MapLibreGL.StyleSource.DefaultSourceID", + "default": "MapLibreRN.StyleSource.DefaultSourceID", "description": "A string that uniquely identifies the source." }, { diff --git a/ios/MLRN/MLNCustomHeaders.h b/ios/MLRN/MLRNCustomHeaders.h similarity index 84% rename from ios/MLRN/MLNCustomHeaders.h rename to ios/MLRN/MLRNCustomHeaders.h index 6f71c4250..543bdc881 100644 --- a/ios/MLRN/MLNCustomHeaders.h +++ b/ios/MLRN/MLRNCustomHeaders.h @@ -1,5 +1,5 @@ // -// MLNCustomHeaders.h +// MLRNCustomHeaders.h // MLRN // @@ -8,7 +8,7 @@ @interface NSMutableURLRequest (CustomHeaders) @end -@interface MLNCustomHeaders : NSObject +@interface MLRNCustomHeaders : NSObject @property (nonatomic, strong) NSMutableDictionary *currentHeaders; diff --git a/ios/MLRN/MLNCustomHeaders.m b/ios/MLRN/MLRNCustomHeaders.m similarity index 91% rename from ios/MLRN/MLNCustomHeaders.m rename to ios/MLRN/MLRNCustomHeaders.m index 5649b5187..a6f82fa61 100644 --- a/ios/MLRN/MLNCustomHeaders.m +++ b/ios/MLRN/MLRNCustomHeaders.m @@ -1,11 +1,11 @@ // -// MLNCustomHeaders.h +// MLRNCustomHeaders.h // MLRN // #import -#import "MLNCustomHeaders.h" +#import "MLRNCustomHeaders.h" #import #import @@ -26,7 +26,7 @@ +(NSMutableURLRequest*) __swizzle_requestWithURL:(NSURL*)url { } NSMutableURLRequest *req = [NSMutableURLRequest __swizzle_requestWithURL:url]; - NSDictionary *currentHeaders = [[[MLNCustomHeaders sharedInstance] currentHeaders] copy]; + NSDictionary *currentHeaders = [[[MLRNCustomHeaders sharedInstance] currentHeaders] copy]; if(currentHeaders != nil && [currentHeaders count]>0) { for (NSString* headerName in currentHeaders) { id headerValue = currentHeaders[headerName]; @@ -38,21 +38,21 @@ +(NSMutableURLRequest*) __swizzle_requestWithURL:(NSURL*)url { @end -@implementation MLNCustomHeaders { +@implementation MLRNCustomHeaders { NSMutableDictionary *_currentHeaders; BOOL areHeadersAdded; } + (id)sharedInstance { - static MLNCustomHeaders *customHeaders; + static MLRNCustomHeaders *customHeaders; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ customHeaders = [[self alloc] init]; }); return customHeaders; } // This replaces the [NSMutableURLRequest requestWithURL:] with custom implementation which -// adds runtime headers copied from [MLNCustomHeaders _currentHeaders] +// adds runtime headers copied from [MLRNCustomHeaders _currentHeaders] -(void)initHeaders { if (!areHeadersAdded) { diff --git a/ios/MLRN/MLNModule.h b/ios/MLRN/MLRNModule.h similarity index 73% rename from ios/MLRN/MLNModule.h rename to ios/MLRN/MLRNModule.h index bf9bf7222..2d7c3bcbd 100644 --- a/ios/MLRN/MLNModule.h +++ b/ios/MLRN/MLRNModule.h @@ -1,5 +1,5 @@ // -// MLNModule.h +// MLRNModule.h // MLRN // // Created by Nick Italiano on 8/23/17. @@ -9,5 +9,5 @@ #import #import -@interface MLNModule : NSObject +@interface MLRNModule : NSObject @end diff --git a/ios/MLRN/MLNModule.m b/ios/MLRN/MLRNModule.m similarity index 98% rename from ios/MLRN/MLNModule.m rename to ios/MLRN/MLRNModule.m index eff6ec7cf..e5a40b3cf 100644 --- a/ios/MLRN/MLNModule.m +++ b/ios/MLRN/MLRNModule.m @@ -1,20 +1,20 @@ // -// MLNModule.m +// MLRNModule.m // MLRN // // Created by Nick Italiano on 8/23/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "MLNModule.h" +#import "MLRNModule.h" #import "MLRNEventTypes.h" -#import "MLNOfflineModule.h" +#import "MLRNOfflineModule.h" #import "CameraMode.h" #import "MLRNSource.h" -#import "MLNCustomHeaders.h" +#import "MLRNCustomHeaders.h" @import MapLibre; -@implementation MLNModule +@implementation MLRNModule RCT_EXPORT_MODULE(); @@ -246,12 +246,12 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(addCustomHeader:(NSString *)headerName forHeaderValue:(NSString *) headerValue) { - [MLNCustomHeaders.sharedInstance addHeader:headerValue forHeaderName:headerName]; + [MLRNCustomHeaders.sharedInstance addHeader:headerValue forHeaderName:headerName]; } RCT_EXPORT_METHOD(removeCustomHeader:(NSString *)headerName) { - [MLNCustomHeaders.sharedInstance removeHeader:headerName]; + [MLRNCustomHeaders.sharedInstance removeHeader:headerName]; } RCT_EXPORT_METHOD(getAccessToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) diff --git a/ios/MLRN/MLNOfflineModule.h b/ios/MLRN/MLRNOfflineModule.h similarity index 78% rename from ios/MLRN/MLNOfflineModule.h rename to ios/MLRN/MLRNOfflineModule.h index 899f42380..39436199d 100644 --- a/ios/MLRN/MLNOfflineModule.h +++ b/ios/MLRN/MLRNOfflineModule.h @@ -1,5 +1,5 @@ // -// MLNOfflineModule.h +// MLRNOfflineModule.h // MLRN // // Created by Nick Italiano on 10/25/17. @@ -11,7 +11,7 @@ @import MapLibre; -@interface MLNOfflineModule : RCTEventEmitter +@interface MLRNOfflineModule : RCTEventEmitter extern NSString *const RCT_MAPBOX_OFFLINE_CALLBACK_PROGRESS; extern NSString *const RCT_MAPBOX_OFFLINE_CALLBACK_ERROR; diff --git a/ios/MLRN/MLNOfflineModule.m b/ios/MLRN/MLRNOfflineModule.m similarity index 99% rename from ios/MLRN/MLNOfflineModule.m rename to ios/MLRN/MLRNOfflineModule.m index 3d432b97f..59f954dd7 100644 --- a/ios/MLRN/MLNOfflineModule.m +++ b/ios/MLRN/MLRNOfflineModule.m @@ -1,17 +1,17 @@ // -// MLNOfflineModule.m +// MLRNOfflineModule.m // MLRN // // Created by Nick Italiano on 10/25/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "MLNOfflineModule.h" +#import "MLRNOfflineModule.h" #import "MLRNUtils.h" #import "MLRNEvent.h" #import "MLRNEventTypes.h" -@implementation MLNOfflineModule +@implementation MLRNOfflineModule { NSUInteger lastPackState; double lastPackTimestamp; diff --git a/ios/MLRN/MLNSnapshotModule.h b/ios/MLRN/MLRNSnapshotModule.h similarity index 65% rename from ios/MLRN/MLNSnapshotModule.h rename to ios/MLRN/MLRNSnapshotModule.h index 66c65b8e9..a64c2c831 100644 --- a/ios/MLRN/MLNSnapshotModule.h +++ b/ios/MLRN/MLRNSnapshotModule.h @@ -1,5 +1,5 @@ // -// MLNSnapshotModule.h +// MLRNSnapshotModule.h // MLRN // // Created by Nick Italiano on 12/1/17. @@ -8,6 +8,6 @@ #import -@interface MLNSnapshotModule : NSObject +@interface MLRNSnapshotModule : NSObject @end diff --git a/ios/MLRN/MLNSnapshotModule.m b/ios/MLRN/MLRNSnapshotModule.m similarity index 96% rename from ios/MLRN/MLNSnapshotModule.m rename to ios/MLRN/MLRNSnapshotModule.m index 4bcd25e66..e96e65f60 100644 --- a/ios/MLRN/MLNSnapshotModule.m +++ b/ios/MLRN/MLRNSnapshotModule.m @@ -1,17 +1,17 @@ // -// MLNSnapshotModule.m +// MLRNSnapshotModule.m // MLRN // // Created by Nick Italiano on 12/1/17. // Copyright © 2017 Mapbox Inc. All rights reserved. // -#import "MLNSnapshotModule.h" +#import "MLRNSnapshotModule.h" #import "MLRNUtils.h" #import "RNMBImageUtils.h" @import MapLibre; -@implementation MLNSnapshotModule +@implementation MLRNSnapshotModule RCT_EXPORT_MODULE() diff --git a/jest-setup.ts b/jest-setup.ts index 646c151ff..ca21aa835 100644 --- a/jest-setup.ts +++ b/jest-setup.ts @@ -12,7 +12,7 @@ function keyMirror(keys: string[]) { } // Mock of what the native code puts on the JS object -NativeModules.MLNModule = { +NativeModules.MLRNModule = { // constants UserTrackingModes: keyMirror([ "None", @@ -81,7 +81,7 @@ NativeModules.MLNModule = { setConnected: jest.fn(), }; -NativeModules.MLNOfflineModule = { +NativeModules.MLRNOfflineModule = { createPack: (packOptions: any) => { return Promise.resolve({ bounds: packOptions.bounds, @@ -98,13 +98,13 @@ NativeModules.MLNOfflineModule = { setProgressEventThrottle: jest.fn(), }; -NativeModules.MLNSnapshotModule = { +NativeModules.MLRNSnapshotModule = { takeSnap: () => { return Promise.resolve("file://test.png"); }, }; -NativeModules.MLNLocationModule = { +NativeModules.MLRNLocationModule = { getLastKnownLocation: jest.fn(), setMinDisplacement: jest.fn(), start: jest.fn(), diff --git a/src/MLNModule.ts b/src/MLRNModule.ts similarity index 88% rename from src/MLNModule.ts rename to src/MLRNModule.ts index b8163b022..ba44cff1a 100644 --- a/src/MLNModule.ts +++ b/src/MLRNModule.ts @@ -2,7 +2,7 @@ import { NativeModules } from "react-native"; import { CameraMode } from "./types/CameraMode"; -interface IMLNModule { +interface IMLRNModule { CameraModes: { Flight: CameraMode.Flight; Ease: CameraMode.Ease; @@ -32,7 +32,7 @@ interface IMLNModule { setConnected(connected: boolean): void; } -const MLNModule: IMLNModule = Object.create(NativeModules.MLNModule); +const MLRNModule: IMLRNModule = Object.create(NativeModules.MLRNModule); export const { CameraModes, @@ -43,4 +43,4 @@ export const { setAccessToken, getAccessToken, setConnected, -} = MLNModule; +} = MLRNModule; diff --git a/src/MapLibreRN.ts b/src/MapLibreRN.ts index d0618d374..0614abd60 100644 --- a/src/MapLibreRN.ts +++ b/src/MapLibreRN.ts @@ -1,6 +1,6 @@ import { UserTrackingMode } from "./components/Camera"; -export * from "./MLNModule"; +export * from "./MLRNModule"; export { default as Camera, UserTrackingMode, diff --git a/src/components/BackgroundLayer.tsx b/src/components/BackgroundLayer.tsx index dea44139d..9304768b0 100644 --- a/src/components/BackgroundLayer.tsx +++ b/src/components/BackgroundLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type BackgroundLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNBackgroundLayer"; @@ -27,7 +27,7 @@ const MLRNBackgroundLayer = requireNativeComponent(NATIVE_MODULE_NAME); const BackgroundLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: BackgroundLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/Camera.tsx b/src/components/Camera.tsx index d6d2784f8..534c1c306 100644 --- a/src/components/Camera.tsx +++ b/src/components/Camera.tsx @@ -2,7 +2,7 @@ import { point } from "@turf/helpers"; import { forwardRef, memo, useImperativeHandle, useMemo } from "react"; import { requireNativeComponent, type ViewProps } from "react-native"; -import { CameraModes } from "../MLNModule"; +import { CameraModes } from "../MLRNModule"; import { useNativeRef } from "../hooks/useNativeRef"; import { type BaseProps } from "../types/BaseProps"; import { CameraMode } from "../types/CameraMode"; diff --git a/src/components/CircleLayer.tsx b/src/components/CircleLayer.tsx index 2d8b69c41..b4b7274d8 100644 --- a/src/components/CircleLayer.tsx +++ b/src/components/CircleLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type CircleLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNCircleLayer"; @@ -23,14 +23,13 @@ interface NativeProps extends Omit, NativeBaseProps {} -const MLRNCircleLayer = - requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNCircleLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** * CircleLayer is a style layer that renders one or more filled circles on the map. */ const CircleLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: CircleLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/FillExtrusionLayer.tsx b/src/components/FillExtrusionLayer.tsx index d0a8f3bcc..9133a4bbc 100644 --- a/src/components/FillExtrusionLayer.tsx +++ b/src/components/FillExtrusionLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type FillExtrusionLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNFillExtrusionLayer"; @@ -30,7 +30,7 @@ const MLRNFillExtrusionLayer = * FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map. */ const FillExtrusionLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: FillExtrusionLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/FillLayer.tsx b/src/components/FillLayer.tsx index 109210e24..e54a393c9 100644 --- a/src/components/FillLayer.tsx +++ b/src/components/FillLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type FillLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNFillLayer"; @@ -27,7 +27,7 @@ const MLRNFillLayer = requireNativeComponent(NATIVE_MODULE_NAME); * FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map. */ const FillLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: FillLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/HeatmapLayer.tsx b/src/components/HeatmapLayer.tsx index 2486a7307..9be2d8cac 100644 --- a/src/components/HeatmapLayer.tsx +++ b/src/components/HeatmapLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type HeatmapLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNHeatmapLayer"; @@ -29,7 +29,7 @@ const MLRNHeatmapLayer = * HeatmapLayer is a style layer that renders one or more filled circles on the map. */ const HeatmapLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: HeatmapLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/LineLayer.tsx b/src/components/LineLayer.tsx index 8ddbb9838..908aea6f8 100644 --- a/src/components/LineLayer.tsx +++ b/src/components/LineLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type LineLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNLineLayer"; @@ -28,7 +28,7 @@ const MLRNLineLayer = * LineLayer is a style layer that renders one or more stroked polylines on the map. */ const LineLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: LineLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/MapView.tsx b/src/components/MapView.tsx index 0576fd481..e58bd48be 100644 --- a/src/components/MapView.tsx +++ b/src/components/MapView.tsx @@ -31,8 +31,8 @@ import Logger from "../utils/Logger"; import { type FilterExpression } from "../utils/MapLibreRNStyles"; import { getFilter } from "../utils/filterUtils"; -const MapLibreGL = NativeModules.MLNModule; -if (MapLibreGL == null) { +const MapLibreRN = NativeModules.MLRNModule; +if (MapLibreRN == null) { console.error( "Native module of @maplibre/maplibre-react-native library was not registered properly, please consult the docs: https://github.com/maplibre/maplibre-react-native", ); @@ -46,7 +46,7 @@ const styles = StyleSheet.create({ matchParent: { flex: 1 }, }); -const defaultStyleURL = MapLibreGL.StyleURL.Street; +const defaultStyleURL = MapLibreRN.StyleURL.Street; export interface RegionPayload { zoomLevel: number; @@ -443,46 +443,46 @@ const MapView = memo( const events = []; if (props.onRegionWillChange) { - events.push(MapLibreGL.EventTypes.RegionWillChange); + events.push(MapLibreRN.EventTypes.RegionWillChange); } if (props.onRegionIsChanging) { - events.push(MapLibreGL.EventTypes.RegionIsChanging); + events.push(MapLibreRN.EventTypes.RegionIsChanging); } if (props.onRegionDidChange) { - events.push(MapLibreGL.EventTypes.RegionDidChange); + events.push(MapLibreRN.EventTypes.RegionDidChange); } if (props.onUserLocationUpdate) { - events.push(MapLibreGL.EventTypes.UserLocationUpdated); + events.push(MapLibreRN.EventTypes.UserLocationUpdated); } if (props.onWillStartLoadingMap) { - events.push(MapLibreGL.EventTypes.WillStartLoadingMap); + events.push(MapLibreRN.EventTypes.WillStartLoadingMap); } if (props.onDidFinishLoadingMap) { - events.push(MapLibreGL.EventTypes.DidFinishLoadingMap); + events.push(MapLibreRN.EventTypes.DidFinishLoadingMap); } if (props.onDidFailLoadingMap) { - events.push(MapLibreGL.EventTypes.DidFailLoadingMap); + events.push(MapLibreRN.EventTypes.DidFailLoadingMap); } if (props.onWillStartRenderingFrame) { - events.push(MapLibreGL.EventTypes.WillStartRenderingFrame); + events.push(MapLibreRN.EventTypes.WillStartRenderingFrame); } if (props.onDidFinishRenderingFrame) { - events.push(MapLibreGL.EventTypes.DidFinishRenderingFrame); + events.push(MapLibreRN.EventTypes.DidFinishRenderingFrame); } if (props.onDidFinishRenderingFrameFully) { - events.push(MapLibreGL.EventTypes.DidFinishRenderingFrameFully); + events.push(MapLibreRN.EventTypes.DidFinishRenderingFrameFully); } if (props.onWillStartRenderingMap) { - events.push(MapLibreGL.EventTypes.WillStartRenderingMap); + events.push(MapLibreRN.EventTypes.WillStartRenderingMap); } if (props.onDidFinishRenderingMap) { - events.push(MapLibreGL.EventTypes.DidFinishRenderingMap); + events.push(MapLibreRN.EventTypes.DidFinishRenderingMap); } if (props.onDidFinishRenderingMapFully) { - events.push(MapLibreGL.EventTypes.DidFinishRenderingMapFully); + events.push(MapLibreRN.EventTypes.DidFinishRenderingMapFully); } if (props.onDidFinishLoadingStyle) { - events.push(MapLibreGL.EventTypes.DidFinishLoadingStyle); + events.push(MapLibreRN.EventTypes.DidFinishLoadingStyle); } _runNativeCommand( @@ -672,7 +672,7 @@ const MapView = memo( let propName: CallableProps | undefined; switch (type) { - case MapLibreGL.EventTypes.RegionWillChange: + case MapLibreRN.EventTypes.RegionWillChange: if ( regionWillChangeDebounceTime && regionWillChangeDebounceTime > 0 @@ -686,10 +686,10 @@ const MapView = memo( propName = "onRegionWillChange"; } break; - case MapLibreGL.EventTypes.RegionIsChanging: + case MapLibreRN.EventTypes.RegionIsChanging: propName = "onRegionIsChanging"; break; - case MapLibreGL.EventTypes.RegionDidChange: + case MapLibreRN.EventTypes.RegionDidChange: if ( regionDidChangeDebounceTime && regionDidChangeDebounceTime > 0 @@ -703,37 +703,37 @@ const MapView = memo( propName = "onRegionDidChange"; } break; - case MapLibreGL.EventTypes.UserLocationUpdated: + case MapLibreRN.EventTypes.UserLocationUpdated: propName = "onUserLocationUpdate"; break; - case MapLibreGL.EventTypes.WillStartLoadingMap: + case MapLibreRN.EventTypes.WillStartLoadingMap: propName = "onWillStartLoadingMap"; break; - case MapLibreGL.EventTypes.DidFinishLoadingMap: + case MapLibreRN.EventTypes.DidFinishLoadingMap: propName = "onDidFinishLoadingMap"; break; - case MapLibreGL.EventTypes.DidFailLoadingMap: + case MapLibreRN.EventTypes.DidFailLoadingMap: propName = "onDidFailLoadingMap"; break; - case MapLibreGL.EventTypes.WillStartRenderingFrame: + case MapLibreRN.EventTypes.WillStartRenderingFrame: propName = "onWillStartRenderingFrame"; break; - case MapLibreGL.EventTypes.DidFinishRenderingFrame: + case MapLibreRN.EventTypes.DidFinishRenderingFrame: propName = "onDidFinishRenderingFrame"; break; - case MapLibreGL.EventTypes.DidFinishRenderingFrameFully: + case MapLibreRN.EventTypes.DidFinishRenderingFrameFully: propName = "onDidFinishRenderingFrameFully"; break; - case MapLibreGL.EventTypes.WillStartRenderingMap: + case MapLibreRN.EventTypes.WillStartRenderingMap: propName = "onWillStartRenderingMap"; break; - case MapLibreGL.EventTypes.DidFinishRenderingMap: + case MapLibreRN.EventTypes.DidFinishRenderingMap: propName = "onDidFinishRenderingMap"; break; - case MapLibreGL.EventTypes.DidFinishRenderingMapFully: + case MapLibreRN.EventTypes.DidFinishRenderingMapFully: propName = "onDidFinishRenderingMapFully"; break; - case MapLibreGL.EventTypes.DidFinishLoadingStyle: + case MapLibreRN.EventTypes.DidFinishLoadingStyle: propName = "onDidFinishLoadingStyle"; break; default: diff --git a/src/components/RasterLayer.tsx b/src/components/RasterLayer.tsx index dec77e380..bfded88c1 100644 --- a/src/components/RasterLayer.tsx +++ b/src/components/RasterLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type RasterLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNRasterLayer"; @@ -23,11 +23,10 @@ interface NativeProps extends Omit, NativeBaseProps {} -const MLRNRasterLayer = - requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNRasterLayer = requireNativeComponent(NATIVE_MODULE_NAME); const RasterLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: RasterLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/RasterSource.tsx b/src/components/RasterSource.tsx index 4f99488ea..c21087f6e 100644 --- a/src/components/RasterSource.tsx +++ b/src/components/RasterSource.tsx @@ -6,7 +6,7 @@ import useOnce from "../hooks/useOnce"; import { type BaseProps } from "../types/BaseProps"; import { cloneReactChildrenWithProps } from "../utils"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNRasterSource"; @@ -69,7 +69,7 @@ const MLRNRasterSource = * or by an external file that conforms to the TileJSON specification. */ const RasterSource: React.FC = ({ - id = MapLibreGL.StyleSource.DefaultSourceID, + id = MapLibreRN.StyleSource.DefaultSourceID, ...props }: RasterSourceProps) => { useOnce(() => { diff --git a/src/components/ShapeSource.tsx b/src/components/ShapeSource.tsx index 1a6c330a1..259b48a6e 100644 --- a/src/components/ShapeSource.tsx +++ b/src/components/ShapeSource.tsx @@ -29,7 +29,7 @@ import { import { copyPropertiesAsDeprecated } from "../utils/deprecation"; import { getFilter } from "../utils/filterUtils"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNShapeSource"; export const SHAPE_SOURCE_NATIVE_ASSETS_KEY = "assets"; @@ -37,8 +37,7 @@ interface NativeProps { shape?: string; } -type MLRNShapeSourceRefType = Component & - Readonly; +type MLRNShapeSourceRefType = Component & Readonly; export interface ShapeSourceProps extends BaseProps { /** @@ -165,7 +164,7 @@ const ShapeSource = memo( forwardRef( ( { - id: shapeId = MapLibreGL.StyleSource.DefaultSourceID, + id: shapeId = MapLibreRN.StyleSource.DefaultSourceID, ...props }: ShapeSourceProps, ref, @@ -432,7 +431,6 @@ const ShapeSource = memo( ), ); -const MLRNShapeSource = - requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNShapeSource = requireNativeComponent(NATIVE_MODULE_NAME); export default ShapeSource; diff --git a/src/components/SymbolLayer.tsx b/src/components/SymbolLayer.tsx index c6a100f81..e273ef57b 100644 --- a/src/components/SymbolLayer.tsx +++ b/src/components/SymbolLayer.tsx @@ -8,7 +8,7 @@ import useAbstractLayer, { import { type BaseProps } from "../types/BaseProps"; import { type SymbolLayerStyleProps } from "../utils/MapLibreRNStyles"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNSymbolLayer"; @@ -29,14 +29,13 @@ interface NativeProps extends Omit, NativeBaseProps { snapshot: boolean; } -const MLRNSymbolLayer = - requireNativeComponent(NATIVE_MODULE_NAME); +const MLRNSymbolLayer = requireNativeComponent(NATIVE_MODULE_NAME); /** * SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map. */ const SymbolLayer: React.FC = ({ - sourceID = MapLibreGL.StyleSource.DefaultSourceID, + sourceID = MapLibreRN.StyleSource.DefaultSourceID, ...props }: SymbolLayerProps) => { const { baseProps, setNativeLayer } = useAbstractLayer< diff --git a/src/components/VectorSource.tsx b/src/components/VectorSource.tsx index fcd2837ea..f0f637acb 100644 --- a/src/components/VectorSource.tsx +++ b/src/components/VectorSource.tsx @@ -15,7 +15,7 @@ import { type FilterExpression } from "../utils/MapLibreRNStyles"; import { copyPropertiesAsDeprecated } from "../utils/deprecation"; import { getFilter } from "../utils/filterUtils"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export const NATIVE_MODULE_NAME = "MLRNVectorSource"; @@ -94,7 +94,7 @@ const VectorSource = memo( forwardRef( ( { - id = MapLibreGL.StyleSource.DefaultSourceID, + id = MapLibreRN.StyleSource.DefaultSourceID, ...props }: VectorSourceProps, ref, diff --git a/src/modules/location/locationManager.ts b/src/modules/location/locationManager.ts index a73d9f216..60ec52f9f 100644 --- a/src/modules/location/locationManager.ts +++ b/src/modules/location/locationManager.ts @@ -4,11 +4,11 @@ import { type EmitterSubscription, } from "react-native"; -const MapLibreGL = NativeModules.MLNModule; -const MapLibreGLLocationManager = NativeModules.MLRNLocationModule; +const MapLibreRN = NativeModules.MLRNModule; +const MLRNLocationModule = NativeModules.MLRNLocationModule; export const LocationModuleEventEmitter = new NativeEventEmitter( - MapLibreGLLocationManager, + MLRNLocationModule, ); /** @@ -86,8 +86,7 @@ class LocationManager { // let's silently catch it and simply log out // instead of throwing an exception try { - lastKnownLocation = - await MapLibreGLLocationManager.getLastKnownLocation(); + lastKnownLocation = await MLRNLocationModule.getLastKnownLocation(); } catch (error) { console.log("locationManager Error: ", error); } @@ -127,10 +126,10 @@ class LocationManager { start(displacement = 0): void { if (!this._isListening) { - MapLibreGLLocationManager.start(displacement); + MLRNLocationModule.start(displacement); this.subscription = LocationModuleEventEmitter.addListener( - MapLibreGL.LocationCallbackName.Update, + MapLibreRN.LocationCallbackName.Update, this.onUpdate, ); @@ -139,7 +138,7 @@ class LocationManager { } stop(): void { - MapLibreGLLocationManager.stop(); + MLRNLocationModule.stop(); if (this._isListening) { this.subscription?.remove(); @@ -149,7 +148,7 @@ class LocationManager { } setMinDisplacement(minDisplacement: number): void { - MapLibreGLLocationManager.setMinDisplacement(minDisplacement); + MLRNLocationModule.setMinDisplacement(minDisplacement); } onUpdate(location: Location): void { diff --git a/src/modules/offline/OfflinePack.ts b/src/modules/offline/OfflinePack.ts index c041d1e62..b680240f0 100644 --- a/src/modules/offline/OfflinePack.ts +++ b/src/modules/offline/OfflinePack.ts @@ -2,7 +2,7 @@ import { NativeModules } from "react-native"; import OfflineCreatePackOptions from "./OfflineCreatePackOptions"; -const MapLibreGLOfflineManager = NativeModules.MLNOfflineModule; +const MLRNOfflineModule = NativeModules.MLRNOfflineModule; export type OfflinePackStatus = { name: string; @@ -41,15 +41,15 @@ class OfflinePack { } status(): Promise { - return MapLibreGLOfflineManager.getPackStatus(this.name); + return MLRNOfflineModule.getPackStatus(this.name); } resume(): Promise { - return MapLibreGLOfflineManager.resumePackDownload(this.name); + return MLRNOfflineModule.resumePackDownload(this.name); } pause(): Promise { - return MapLibreGLOfflineManager.pausePackDownload(this.name); + return MLRNOfflineModule.pausePackDownload(this.name); } } diff --git a/src/modules/offline/offlineManager.ts b/src/modules/offline/offlineManager.ts index f8f2ef0ce..30b474f5a 100644 --- a/src/modules/offline/offlineManager.ts +++ b/src/modules/offline/offlineManager.ts @@ -10,10 +10,10 @@ import OfflineCreatePackOptions, { import OfflinePack from "./OfflinePack"; import { isUndefined, isFunction, isAndroid } from "../../utils"; -const MapLibreGL = NativeModules.MLNModule; -const MapLibreGLOfflineManager = NativeModules.MLNOfflineModule; +const MapLibreRN = NativeModules.MLRNModule; +const MLRNOfflineModule = NativeModules.MLRNOfflineModule; export const OfflineModuleEventEmitter = new NativeEventEmitter( - MapLibreGLOfflineManager, + MLRNOfflineModule, ); export type OfflineProgressStatus = { @@ -110,8 +110,7 @@ class OfflineManager { } this.subscribe(packOptions.name, progressListener, errorListener); - const nativeOfflinePack = - await MapLibreGLOfflineManager.createPack(packOptions); + const nativeOfflinePack = await MLRNOfflineModule.createPack(packOptions); this._offlinePacks[packOptions.name] = new OfflinePack(nativeOfflinePack); } @@ -135,7 +134,7 @@ class OfflineManager { const offlinePack = this._offlinePacks[name]; if (offlinePack) { - await MapLibreGLOfflineManager.invalidatePack(name); + await MLRNOfflineModule.invalidatePack(name); } } @@ -157,7 +156,7 @@ class OfflineManager { const offlinePack = this._offlinePacks[name]; if (offlinePack) { - await MapLibreGLOfflineManager.deletePack(name); + await MLRNOfflineModule.deletePack(name); delete this._offlinePacks[name]; } } @@ -175,7 +174,7 @@ class OfflineManager { */ async invalidateAmbientCache(): Promise { await this._initialize(); - await MapLibreGLOfflineManager.invalidateAmbientCache(); + await MLRNOfflineModule.invalidateAmbientCache(); } /** @@ -189,7 +188,7 @@ class OfflineManager { */ async clearAmbientCache(): Promise { await this._initialize(); - await MapLibreGLOfflineManager.clearAmbientCache(); + await MLRNOfflineModule.clearAmbientCache(); } /** @@ -204,7 +203,7 @@ class OfflineManager { */ async setMaximumAmbientCacheSize(size: number): Promise { await this._initialize(); - await MapLibreGLOfflineManager.setMaximumAmbientCacheSize(size); + await MLRNOfflineModule.setMaximumAmbientCacheSize(size); } /** @@ -217,7 +216,7 @@ class OfflineManager { */ async resetDatabase(): Promise { await this._initialize(); - await MapLibreGLOfflineManager.resetDatabase(); + await MLRNOfflineModule.resetDatabase(); } /** @@ -261,7 +260,7 @@ class OfflineManager { */ async mergeOfflineRegions(path: string): Promise { await this._initialize(); - return MapLibreGLOfflineManager.mergeOfflineRegions(path); + return MLRNOfflineModule.mergeOfflineRegions(path); } /** @@ -275,7 +274,7 @@ class OfflineManager { * @return {void} */ setTileCountLimit(limit: number): void { - MapLibreGLOfflineManager.setTileCountLimit(limit); + MLRNOfflineModule.setTileCountLimit(limit); } /** @@ -289,7 +288,7 @@ class OfflineManager { * @return {void} */ setProgressEventThrottle(throttleValue: number): void { - MapLibreGLOfflineManager.setProgressEventThrottle(throttleValue); + MLRNOfflineModule.setProgressEventThrottle(throttleValue); } /** @@ -315,7 +314,7 @@ class OfflineManager { if (isFunction(progressListener)) { if (totalProgressListeners === 0) { this.subscriptionProgress = OfflineModuleEventEmitter.addListener( - MapLibreGL.OfflineCallbackName.Progress, + MapLibreRN.OfflineCallbackName.Progress, this._onProgress, ); } @@ -326,7 +325,7 @@ class OfflineManager { if (isFunction(errorListener)) { if (totalErrorListeners === 0) { this.subscriptionError = OfflineModuleEventEmitter.addListener( - MapLibreGL.OfflineCallbackName.Error, + MapLibreRN.OfflineCallbackName.Error, this._onError, ); } @@ -338,7 +337,7 @@ class OfflineManager { if (isAndroid() && this._offlinePacks[packName]) { try { // manually set a listener, since listeners are only set on create flow - await MapLibreGLOfflineManager.setPackObserver(packName); + await MLRNOfflineModule.setPackObserver(packName); } catch (e) { console.log("Unable to set pack observer", e); } @@ -379,7 +378,7 @@ class OfflineManager { return true; } - const nativeOfflinePacks = await MapLibreGLOfflineManager.getPacks(); + const nativeOfflinePacks = await MLRNOfflineModule.getPacks(); for (const nativeOfflinePack of nativeOfflinePacks) { const offlinePack = new OfflinePack(nativeOfflinePack); @@ -405,7 +404,7 @@ class OfflineManager { } // cleanup listeners now that they are no longer needed - if (state === MapLibreGL.OfflinePackDownloadState.Complete) { + if (state === MapLibreRN.OfflinePackDownloadState.Complete) { this.unsubscribe(name); } } diff --git a/src/modules/snapshot/SnapshotOptions.ts b/src/modules/snapshot/SnapshotOptions.ts index c65b2f302..c1f76c824 100644 --- a/src/modules/snapshot/SnapshotOptions.ts +++ b/src/modules/snapshot/SnapshotOptions.ts @@ -3,7 +3,7 @@ import { NativeModules } from "react-native"; import { toJSONString } from "../../utils"; -const MapLibreGL = NativeModules.MLNModule; +const MapLibreRN = NativeModules.MLRNModule; export interface SnapshotInputOptions { centerCoordinate?: GeoJSON.Position; @@ -50,7 +50,7 @@ export class SnapshotOptions { ); } - this.styleURL = options.styleURL || MapLibreGL.StyleURL.Default; + this.styleURL = options.styleURL || MapLibreRN.StyleURL.Default; this.heading = options.heading || 0.0; this.pitch = options.pitch || 0.0; this.zoomLevel = options.zoomLevel || 16.0; diff --git a/src/modules/snapshot/snapshotManager.ts b/src/modules/snapshot/snapshotManager.ts index 8bea9586a..d005ff7cb 100644 --- a/src/modules/snapshot/snapshotManager.ts +++ b/src/modules/snapshot/snapshotManager.ts @@ -2,7 +2,7 @@ import { NativeModules } from "react-native"; import SnapshotOptions, { type SnapshotInputOptions } from "./SnapshotOptions"; -const MapLibreGLSnapshotManger = NativeModules.MLNSnapshotModule; +const MLRNSnapshotModule = NativeModules.MLRNSnapshotModule; /** * The snapshotManager generates static raster images of the map. @@ -53,7 +53,7 @@ class SnapshotManager { async takeSnap(options: SnapshotInputOptions = {}): Promise { const snapshotOptions = new SnapshotOptions(options); - const uri = await MapLibreGLSnapshotManger.takeSnap(snapshotOptions); + const uri = await MLRNSnapshotModule.takeSnap(snapshotOptions); return uri; } } From becda5f772462e93e5ce2f1b31fc06ee95624a62 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 08:05:29 +0100 Subject: [PATCH 4/9] fix: remove unused ios files --- .../MLNFaux3DUserLocationAnnotationView.h | 23 - .../MLNFaux3DUserLocationAnnotationView.m | 474 ------------------ ios/MLRN/MLNUserLocationHeadingArrowLayer.h | 11 - ios/MLRN/MLNUserLocationHeadingArrowLayer.m | 57 --- ios/MLRN/MLNUserLocationHeadingBeamLayer.h | 11 - ios/MLRN/MLNUserLocationHeadingBeamLayer.m | 102 ---- ios/MLRN/MLNUserLocationHeadingIndicator.h | 10 - ios/MLRN/RCTConvert+Mapbox.h | 16 - ios/MLRN/RCTConvert+Mapbox.m | 32 -- 9 files changed, 736 deletions(-) delete mode 100644 ios/MLRN/MLNFaux3DUserLocationAnnotationView.h delete mode 100644 ios/MLRN/MLNFaux3DUserLocationAnnotationView.m delete mode 100644 ios/MLRN/MLNUserLocationHeadingArrowLayer.h delete mode 100644 ios/MLRN/MLNUserLocationHeadingArrowLayer.m delete mode 100644 ios/MLRN/MLNUserLocationHeadingBeamLayer.h delete mode 100644 ios/MLRN/MLNUserLocationHeadingBeamLayer.m delete mode 100644 ios/MLRN/MLNUserLocationHeadingIndicator.h delete mode 100644 ios/MLRN/RCTConvert+Mapbox.h delete mode 100644 ios/MLRN/RCTConvert+Mapbox.m diff --git a/ios/MLRN/MLNFaux3DUserLocationAnnotationView.h b/ios/MLRN/MLNFaux3DUserLocationAnnotationView.h deleted file mode 100644 index 4ae5ed95b..000000000 --- a/ios/MLRN/MLNFaux3DUserLocationAnnotationView.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// MLNFaux3DUserLocationAnnotationView.h -// MLRN -// -// Created by Nick Italiano on 12/20/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import -@import MapLibre; - -extern const CGFloat MLNUserLocationAnnotationDotSize; -extern const CGFloat MLNUserLocationAnnotationHaloSize; - -extern const CGFloat MLNUserLocationAnnotationPuckSize; -extern const CGFloat MLNUserLocationAnnotationArrowSize; - -// Threshold in radians between heading indicator rotation updates. -extern const CGFloat MLNUserLocationHeadingUpdateThreshold; - -@interface MLNFaux3DUserLocationAnnotationView : MLNUserLocationAnnotationView - -@end diff --git a/ios/MLRN/MLNFaux3DUserLocationAnnotationView.m b/ios/MLRN/MLNFaux3DUserLocationAnnotationView.m deleted file mode 100644 index 02ef665be..000000000 --- a/ios/MLRN/MLNFaux3DUserLocationAnnotationView.m +++ /dev/null @@ -1,474 +0,0 @@ -// -// https://github.com/mapbox/mapbox-gl-native/blob/master/platform/ios/src/MLNFaux3DUserLocationAnnotationView.m -// - -#import "MLNFaux3DUserLocationAnnotationView.h" - -#import "MLNUserLocationHeadingIndicator.h" -#import "MLNUserLocationHeadingArrowLayer.h" -#import "MLNUserLocationHeadingBeamLayer.h" - -#import "MLRNMapView.h" - -const CGFloat MLNUserLocationAnnotationDotSize = 22.0; -const CGFloat MLNUserLocationAnnotationHaloSize = 115.0; - -const CGFloat MLNUserLocationAnnotationPuckSize = 45.0; -const CGFloat MLNUserLocationAnnotationArrowSize = MLNUserLocationAnnotationPuckSize * 0.5; - -const CGFloat MLNUserLocationHeadingUpdateThreshold = 0.01; - -@implementation MLNFaux3DUserLocationAnnotationView -{ - BOOL _puckModeActivated; - - CALayer *_puckDot; - CAShapeLayer *_puckArrow; - - CALayer *_headingIndicatorLayer; - CALayer *_accuracyRingLayer; - CALayer *_dotBorderLayer; - CALayer *_dotLayer; - CALayer *_haloLayer; - - CLLocationDirection _oldHeadingAccuracy; - CLLocationAccuracy _oldHorizontalAccuracy; - double _oldZoom; - double _oldPitch; -} - -- (CALayer *)hitTestLayer -{ - // Only the main dot should be interactive (i.e., exclude the accuracy ring and halo). - return _dotBorderLayer ?: _puckDot; -} - -- (void)update -{ - if (CGSizeEqualToSize(self.frame.size, CGSizeZero)) - { - CGFloat frameSize = (self.mapView.userTrackingMode == MLNUserTrackingModeFollowWithCourse) ? MLNUserLocationAnnotationPuckSize : MLNUserLocationAnnotationDotSize; - [self updateFrameWithSize:frameSize]; - } - - if (CLLocationCoordinate2DIsValid(self.userLocation.coordinate)) - { - MLRNMapView *reactMapView = (MLRNMapView *)self.mapView; - // FM - TODO - (reactMapView.userTrackingMode == MLNUserTrackingModeFollowWithCourse) ? [self drawPuck] : [self drawDot]; - [self updatePitch]; - } - - _haloLayer.hidden = ! CLLocationCoordinate2DIsValid(self.mapView.userLocation.coordinate) || self.mapView.userLocation.location.horizontalAccuracy > 10; -} - -- (void)setTintColor:(UIColor *)tintColor -{ - CGColorRef newTintColor = [tintColor CGColor]; - - if (_puckModeActivated) - { - _puckArrow.fillColor = newTintColor; - } - else - { - _accuracyRingLayer.backgroundColor = newTintColor; - _haloLayer.backgroundColor = newTintColor; - _dotLayer.backgroundColor = newTintColor; - [_headingIndicatorLayer updateTintColor:newTintColor]; - } -} - -- (void)updatePitch -{ - if (self.mapView.camera.pitch != _oldPitch) - { - // disable implicit animation - [CATransaction begin]; - [CATransaction setDisableActions:YES]; - - CATransform3D t = CATransform3DRotate(CATransform3DIdentity, MLNRadiansFromDegrees(self.mapView.camera.pitch), 1.0, 0, 0); - self.layer.sublayerTransform = t; - - [self updateFaux3DEffect]; - - [CATransaction commit]; - - _oldPitch = self.mapView.camera.pitch; - } -} - -- (void)updateFaux3DEffect -{ - CGFloat pitch = MLNRadiansFromDegrees(self.mapView.camera.pitch); - - if (_puckDot) - { - _puckDot.shadowOffset = CGSizeMake(0, fmaxf(pitch * 10.f, 1.f)); - _puckDot.shadowRadius = fmaxf(pitch * 5.f, 0.75f); - } - - if (_dotBorderLayer) - { - _dotBorderLayer.shadowOffset = CGSizeMake(0.f, pitch * 10.f); - _dotBorderLayer.shadowRadius = fmaxf(pitch * 5.f, 3.f); - } - - if (_dotLayer) - { - _dotLayer.zPosition = pitch * 2.f; - } -} - -- (void)updateFrameWithSize:(CGFloat)size -{ - CGSize newSize = CGSizeMake(size, size); - if (CGSizeEqualToSize(self.frame.size, newSize)) - { - return; - } - - // Update frame size, keeping the existing center point. - CGPoint oldCenter = self.center; - CGRect newFrame = self.frame; - newFrame.size = newSize; - [self setFrame:newFrame]; - [self setCenter:oldCenter]; -} - -- (void)drawPuck -{ - if ( ! _puckModeActivated) - { - self.layer.sublayers = nil; - - _headingIndicatorLayer = nil; - _accuracyRingLayer = nil; - _haloLayer = nil; - _dotBorderLayer = nil; - _dotLayer = nil; - - [self updateFrameWithSize:MLNUserLocationAnnotationPuckSize]; - } - - // background dot (white with black shadow) - // - if ( ! _puckDot) - { - _puckDot = [self circleLayerWithSize:MLNUserLocationAnnotationPuckSize]; - _puckDot.backgroundColor = [[UIColor whiteColor] CGColor]; - _puckDot.shadowColor = [[UIColor blackColor] CGColor]; - _puckDot.shadowOpacity = 0.25; - _puckDot.shadowPath = [[UIBezierPath bezierPathWithOvalInRect:_puckDot.bounds] CGPath]; - - if (self.mapView.camera.pitch) - { - [self updateFaux3DEffect]; - } - else - { - _puckDot.shadowOffset = CGSizeMake(0, 1); - _puckDot.shadowRadius = 0.75; - } - - [self.layer addSublayer:_puckDot]; - } - - // arrow - // - if ( ! _puckArrow) - { - _puckArrow = [CAShapeLayer layer]; - _puckArrow.path = [[self puckArrow] CGPath]; - _puckArrow.fillColor = [self.mapView.tintColor CGColor]; - _puckArrow.bounds = CGRectMake(0, 0, round(MLNUserLocationAnnotationArrowSize), round(MLNUserLocationAnnotationArrowSize)); - _puckArrow.position = CGPointMake(CGRectGetMidX(super.bounds), CGRectGetMidY(super.bounds)); - _puckArrow.shouldRasterize = YES; - _puckArrow.rasterizationScale = [UIScreen mainScreen].scale; - _puckArrow.drawsAsynchronously = YES; - - _puckArrow.lineJoin = @"round"; - _puckArrow.lineWidth = 1.f; - _puckArrow.strokeColor = _puckArrow.fillColor; - - [self.layer addSublayer:_puckArrow]; - } - if (self.userLocation.location.course >= 0) - { - _puckArrow.affineTransform = CGAffineTransformRotate(CGAffineTransformIdentity, -MLNRadiansFromDegrees(self.mapView.direction - self.userLocation.location.course)); - } - - if ( ! _puckModeActivated) - { - _puckModeActivated = YES; - - [self updateFaux3DEffect]; - } -} - -- (UIBezierPath *)puckArrow -{ - CGFloat max = MLNUserLocationAnnotationArrowSize; - - UIBezierPath *bezierPath = UIBezierPath.bezierPath; - [bezierPath moveToPoint: CGPointMake(max * 0.5, 0)]; - [bezierPath addLineToPoint: CGPointMake(max * 0.1, max)]; - [bezierPath addLineToPoint: CGPointMake(max * 0.5, max * 0.65)]; - [bezierPath addLineToPoint: CGPointMake(max * 0.9, max)]; - [bezierPath addLineToPoint: CGPointMake(max * 0.5, 0)]; - [bezierPath closePath]; - - return bezierPath; -} - -- (void)drawDot -{ - if (_puckModeActivated) - { - self.layer.sublayers = nil; - - _puckDot = nil; - _puckArrow = nil; - - [self updateFrameWithSize:MLNUserLocationAnnotationDotSize]; - } - - // heading indicator (tinted, beam or arrow) - MLRNMapView *reactMapView = (MLRNMapView *)self.mapView; - BOOL headingTrackingModeEnabled = reactMapView.userTrackingMode == MLNUserTrackingModeFollowWithHeading; - BOOL showHeadingIndicator = self.mapView.showsUserHeadingIndicator || headingTrackingModeEnabled; - - if (showHeadingIndicator) - { - _headingIndicatorLayer.hidden = NO; - CLLocationDirection headingAccuracy = self.userLocation.heading.headingAccuracy; - - if (([_headingIndicatorLayer isMemberOfClass:[MLNUserLocationHeadingBeamLayer class]] && ! headingTrackingModeEnabled) || - ([_headingIndicatorLayer isMemberOfClass:[MLNUserLocationHeadingArrowLayer class]] && headingTrackingModeEnabled)) - { - [_headingIndicatorLayer removeFromSuperlayer]; - _headingIndicatorLayer = nil; - _oldHeadingAccuracy = -1; - } - - if ( ! _headingIndicatorLayer && headingAccuracy) - { - if (headingTrackingModeEnabled) - { - _headingIndicatorLayer = [[MLNUserLocationHeadingBeamLayer alloc] initWithUserLocationAnnotationView:self]; - [self.layer insertSublayer:_headingIndicatorLayer below:_dotBorderLayer]; - } - else - { - _headingIndicatorLayer = [[MLNUserLocationHeadingArrowLayer alloc] initWithUserLocationAnnotationView:self]; - [self.layer addSublayer:_headingIndicatorLayer]; - _headingIndicatorLayer.zPosition = 1; - } - } - - if (_oldHeadingAccuracy != headingAccuracy) - { - [_headingIndicatorLayer updateHeadingAccuracy:headingAccuracy]; - _oldHeadingAccuracy = headingAccuracy; - } - - if (self.userLocation.heading.trueHeading >= 0) - { - CGFloat rotation = -MLNRadiansFromDegrees(self.mapView.direction - self.userLocation.heading.trueHeading); - - // Don't rotate if the change is imperceptible. - if (fabs(rotation) > MLNUserLocationHeadingUpdateThreshold) - { - [CATransaction begin]; - [CATransaction setDisableActions:YES]; - - _headingIndicatorLayer.affineTransform = CGAffineTransformRotate(CGAffineTransformIdentity, rotation); - - [CATransaction commit]; - } - } - } - else - { - [_headingIndicatorLayer removeFromSuperlayer]; - _headingIndicatorLayer = nil; - } - - // update accuracy ring (if zoom or horizontal accuracy have changed) - // - if (_accuracyRingLayer && (_oldZoom != self.mapView.zoomLevel || _oldHorizontalAccuracy != self.userLocation.location.horizontalAccuracy)) - { - CGFloat accuracyRingSize = [self calculateAccuracyRingSize]; - - // only show the accuracy ring if it won't be obscured by the location dot - if (accuracyRingSize > MLNUserLocationAnnotationDotSize + 15) - { - _accuracyRingLayer.hidden = NO; - - // disable implicit animation of the accuracy ring, unless triggered by a change in accuracy - BOOL shouldDisableActions = _oldHorizontalAccuracy == self.userLocation.location.horizontalAccuracy; - - [CATransaction begin]; - [CATransaction setDisableActions:shouldDisableActions]; - - _accuracyRingLayer.bounds = CGRectMake(0, 0, accuracyRingSize, accuracyRingSize); - _accuracyRingLayer.cornerRadius = accuracyRingSize / 2.0; - - // match the halo to the accuracy ring - _haloLayer.bounds = _accuracyRingLayer.bounds; - _haloLayer.cornerRadius = _accuracyRingLayer.cornerRadius; - _haloLayer.shouldRasterize = NO; - - [CATransaction commit]; - } - else - { - _accuracyRingLayer.hidden = YES; - - _haloLayer.bounds = CGRectMake(0, 0, MLNUserLocationAnnotationHaloSize, MLNUserLocationAnnotationHaloSize); - _haloLayer.cornerRadius = MLNUserLocationAnnotationHaloSize / 2.0; - _haloLayer.shouldRasterize = YES; - _haloLayer.rasterizationScale = [UIScreen mainScreen].scale; - } - - // store accuracy and zoom so we're not redrawing unchanged location updates - _oldHorizontalAccuracy = self.userLocation.location.horizontalAccuracy; - _oldZoom = self.mapView.zoomLevel; - } - - // accuracy ring (circular, tinted, mostly-transparent) - // - if ( ! _accuracyRingLayer && self.userLocation.location.horizontalAccuracy) - { - CGFloat accuracyRingSize = [self calculateAccuracyRingSize]; - _accuracyRingLayer = [self circleLayerWithSize:accuracyRingSize]; - _accuracyRingLayer.backgroundColor = [self.mapView.tintColor CGColor]; - _accuracyRingLayer.opacity = 0.1; - _accuracyRingLayer.shouldRasterize = NO; - _accuracyRingLayer.allowsGroupOpacity = NO; - - [self.layer addSublayer:_accuracyRingLayer]; - } - - // expanding sonar-like pulse (circular, tinted, fades out) - // - if ( ! _haloLayer) - { - _haloLayer = [self circleLayerWithSize:MLNUserLocationAnnotationHaloSize]; - _haloLayer.backgroundColor = [self.mapView.tintColor CGColor]; - _haloLayer.allowsGroupOpacity = NO; - _haloLayer.zPosition = -0.1f; - - // set defaults for the animations - CAAnimationGroup *animationGroup = [self loopingAnimationGroupWithDuration:3.0]; - - // scale out radially with initial acceleration - CAKeyframeAnimation *boundsAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale.xy"]; - boundsAnimation.values = @[@0, @0.35, @1]; - boundsAnimation.keyTimes = @[@0, @0.2, @1]; - - // go transparent as scaled out, start semi-opaque - CAKeyframeAnimation *opacityAnimation = [CAKeyframeAnimation animationWithKeyPath:@"opacity"]; - opacityAnimation.values = @[@0.4, @0.4, @0]; - opacityAnimation.keyTimes = @[@0, @0.2, @1]; - - animationGroup.animations = @[boundsAnimation, opacityAnimation]; - - [_haloLayer addAnimation:animationGroup forKey:@"animateTransformAndOpacity"]; - - [self.layer addSublayer:_haloLayer]; - } - - // background dot (white with black shadow) - // - if ( ! _dotBorderLayer) - { - _dotBorderLayer = [self circleLayerWithSize:MLNUserLocationAnnotationDotSize]; - _dotBorderLayer.backgroundColor = [[UIColor whiteColor] CGColor]; - _dotBorderLayer.shadowColor = [[UIColor blackColor] CGColor]; - _dotBorderLayer.shadowOpacity = 0.25; - _dotBorderLayer.shadowPath = [[UIBezierPath bezierPathWithOvalInRect:_dotBorderLayer.bounds] CGPath]; - - if (self.mapView.camera.pitch) - { - [self updateFaux3DEffect]; - } - else - { - _dotBorderLayer.shadowOffset = CGSizeMake(0, 0); - _dotBorderLayer.shadowRadius = 3; - } - - [self.layer addSublayer:_dotBorderLayer]; - } - - // inner dot (pulsing, tinted) - // - if ( ! _dotLayer) - { - _dotLayer = [self circleLayerWithSize:MLNUserLocationAnnotationDotSize * 0.75]; - _dotLayer.backgroundColor = [self.mapView.tintColor CGColor]; - - // set defaults for the animations - CAAnimationGroup *animationGroup = [self loopingAnimationGroupWithDuration:1.5]; - animationGroup.autoreverses = YES; - animationGroup.fillMode = kCAFillModeBoth; - - // scale the dot up and down - CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale.xy"]; - pulseAnimation.fromValue = @0.8; - pulseAnimation.toValue = @1; - - // fade opacity in and out, subtly - CABasicAnimation *opacityAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; - opacityAnimation.fromValue = @0.8; - opacityAnimation.toValue = @1; - - animationGroup.animations = @[pulseAnimation, opacityAnimation]; - - [_dotLayer addAnimation:animationGroup forKey:@"animateTransformAndOpacity"]; - - [self.layer addSublayer:_dotLayer]; - } - - if (_puckModeActivated) - { - _puckModeActivated = NO; - - [self updateFaux3DEffect]; - } -} - -- (CALayer *)circleLayerWithSize:(CGFloat)layerSize -{ - layerSize = round(layerSize); - - CALayer *circleLayer = [CALayer layer]; - circleLayer.bounds = CGRectMake(0, 0, layerSize, layerSize); - circleLayer.position = CGPointMake(CGRectGetMidX(super.bounds), CGRectGetMidY(super.bounds)); - circleLayer.cornerRadius = layerSize / 2.0; - circleLayer.shouldRasterize = YES; - circleLayer.rasterizationScale = [UIScreen mainScreen].scale; - circleLayer.drawsAsynchronously = YES; - - return circleLayer; -} - -- (CAAnimationGroup *)loopingAnimationGroupWithDuration:(CGFloat)animationDuration -{ - CAAnimationGroup *animationGroup = [CAAnimationGroup animation]; - animationGroup.duration = animationDuration; - animationGroup.repeatCount = INFINITY; - animationGroup.removedOnCompletion = NO; - animationGroup.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; - - return animationGroup; -} - -- (CGFloat)calculateAccuracyRingSize -{ - // diameter in screen points - return round(self.userLocation.location.horizontalAccuracy / [self.mapView metersPerPointAtLatitude:self.userLocation.coordinate.latitude] * 2.0); -} - -@end diff --git a/ios/MLRN/MLNUserLocationHeadingArrowLayer.h b/ios/MLRN/MLNUserLocationHeadingArrowLayer.h deleted file mode 100644 index 6fad54b12..000000000 --- a/ios/MLRN/MLNUserLocationHeadingArrowLayer.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import "MLNUserLocationHeadingIndicator.h" -@import MapLibre; - -@interface MLNUserLocationHeadingArrowLayer : CAShapeLayer - -- (instancetype)initWithUserLocationAnnotationView:(MLNUserLocationAnnotationView *)userLocationView; -- (void)updateHeadingAccuracy:(CLLocationDirection)accuracy; -- (void)updateTintColor:(CGColorRef)color; - -@end diff --git a/ios/MLRN/MLNUserLocationHeadingArrowLayer.m b/ios/MLRN/MLNUserLocationHeadingArrowLayer.m deleted file mode 100644 index 3f6634873..000000000 --- a/ios/MLRN/MLNUserLocationHeadingArrowLayer.m +++ /dev/null @@ -1,57 +0,0 @@ -#import "MLNUserLocationHeadingArrowLayer.h" -#import "MLNFaux3DUserLocationAnnotationView.h" - -const CGFloat MLNUserLocationHeadingArrowSize = 6; - -@implementation MLNUserLocationHeadingArrowLayer - -- (instancetype)initWithUserLocationAnnotationView:(MLNUserLocationAnnotationView *)userLocationView -{ - CGFloat size = userLocationView.bounds.size.width + MLNUserLocationHeadingArrowSize; - - self = [super init]; - self.bounds = CGRectMake(0, 0, size, size); - self.position = CGPointMake(CGRectGetMidX(userLocationView.bounds), CGRectGetMidY(userLocationView.bounds)); - self.path = [self arrowPath]; - self.fillColor = userLocationView.tintColor.CGColor; - self.shouldRasterize = YES; - self.rasterizationScale = UIScreen.mainScreen.scale; - self.drawsAsynchronously = YES; - - self.strokeColor = UIColor.whiteColor.CGColor; - self.lineWidth = 1.0; - self.lineJoin = kCALineJoinRound; - - return self; -} - -- (void)updateHeadingAccuracy:(CLLocationDirection)accuracy -{ - // unimplemented -} - -- (void)updateTintColor:(CGColorRef)color -{ - self.fillColor = color; -} - -- (CGPathRef)arrowPath { - CGFloat center = roundf(CGRectGetMidX(self.bounds)); - CGFloat size = MLNUserLocationHeadingArrowSize; - - CGPoint top = CGPointMake(center, 0); - CGPoint left = CGPointMake(center - size, size); - CGPoint right = CGPointMake(center + size, size); - CGPoint middle = CGPointMake(center, size / M_PI); - - UIBezierPath *bezierPath = [UIBezierPath bezierPath]; - [bezierPath moveToPoint:top]; - [bezierPath addLineToPoint:left]; - [bezierPath addQuadCurveToPoint:right controlPoint:middle]; - [bezierPath addLineToPoint:top]; - [bezierPath closePath]; - - return bezierPath.CGPath; -} - -@end diff --git a/ios/MLRN/MLNUserLocationHeadingBeamLayer.h b/ios/MLRN/MLNUserLocationHeadingBeamLayer.h deleted file mode 100644 index d5a4ed1aa..000000000 --- a/ios/MLRN/MLNUserLocationHeadingBeamLayer.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import "MLNUserLocationHeadingIndicator.h" -@import MapLibre; - -@interface MLNUserLocationHeadingBeamLayer : CALayer - -- (MLNUserLocationHeadingBeamLayer *)initWithUserLocationAnnotationView:(MLNUserLocationAnnotationView *)userLocationView; -- (void)updateHeadingAccuracy:(CLLocationDirection)accuracy; -- (void)updateTintColor:(CGColorRef)color; - -@end diff --git a/ios/MLRN/MLNUserLocationHeadingBeamLayer.m b/ios/MLRN/MLNUserLocationHeadingBeamLayer.m deleted file mode 100644 index 9ebd48eac..000000000 --- a/ios/MLRN/MLNUserLocationHeadingBeamLayer.m +++ /dev/null @@ -1,102 +0,0 @@ -#import "MLNUserLocationHeadingBeamLayer.h" -#import "MLNFaux3DUserLocationAnnotationView.h" - -@implementation MLNUserLocationHeadingBeamLayer -{ - CAShapeLayer *_maskLayer; -} - -- (instancetype)initWithUserLocationAnnotationView:(MLNUserLocationAnnotationView *)userLocationView -{ - CGFloat size = MLNUserLocationAnnotationHaloSize; - - self = [super init]; - self.bounds = CGRectMake(0, 0, size, size); - self.position = CGPointMake(CGRectGetMidX(userLocationView.bounds), CGRectGetMidY(userLocationView.bounds)); - self.contents = (__bridge id)[self gradientImageWithTintColor:userLocationView.tintColor.CGColor]; - self.contentsGravity = kCAGravityBottom; - self.contentsScale = UIScreen.mainScreen.scale; - self.opacity = 0.4; - self.shouldRasterize = YES; - self.rasterizationScale = UIScreen.mainScreen.scale; - self.drawsAsynchronously = YES; - - _maskLayer = [CAShapeLayer layer]; - _maskLayer.frame = self.bounds; - _maskLayer.path = [self clippingMaskForAccuracy:0]; - self.mask = _maskLayer; - - return self; -} - -- (void)updateHeadingAccuracy:(CLLocationDirection)accuracy -{ - // recalculate the clipping mask based on updated accuracy - _maskLayer.path = [self clippingMaskForAccuracy:accuracy]; -} - -- (void)updateTintColor:(CGColorRef)color -{ - // redraw the raw tinted gradient - self.contents = (__bridge id)[self gradientImageWithTintColor:color]; -} - -- (CGImageRef)gradientImageWithTintColor:(CGColorRef)tintColor -{ - UIImage *image; - - CGFloat haloRadius = MLNUserLocationAnnotationHaloSize / 2.0; - - UIGraphicsBeginImageContextWithOptions(CGSizeMake(MLNUserLocationAnnotationHaloSize, haloRadius), NO, 0); - - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGContextRef context = UIGraphicsGetCurrentContext(); - - // gradient from the tint color to no-alpha tint color - CGFloat gradientLocations[] = {0.0, 1.0}; - CGGradientRef gradient = CGGradientCreateWithColors( - colorSpace, - (__bridge CFArrayRef)@[(__bridge id)tintColor, - (id)CFBridgingRelease(CGColorCreateCopyWithAlpha(tintColor, 0))], - gradientLocations); - - // draw the gradient from the center point to the edge (full halo radius) - CGPoint centerPoint = CGPointMake(haloRadius, haloRadius); - CGContextDrawRadialGradient(context, gradient, - centerPoint, 0.0, - centerPoint, haloRadius, - kNilOptions); - - image = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - - CGGradientRelease(gradient); - CGColorSpaceRelease(colorSpace); - - return image.CGImage; -} - -- (CGPathRef)clippingMaskForAccuracy:(CGFloat)accuracy -{ - // size the mask using accuracy, but keep within a good display range - CGFloat clippingDegrees = 90 - accuracy; - clippingDegrees = fmin(clippingDegrees, 70); // most accurate - clippingDegrees = fmax(clippingDegrees, 10); // least accurate - - CGRect ovalRect = CGRectMake(0, 0, MLNUserLocationAnnotationHaloSize, MLNUserLocationAnnotationHaloSize); - UIBezierPath *ovalPath = UIBezierPath.bezierPath; - - // clip the oval to ± incoming accuracy degrees (converted to radians), from the top - [ovalPath addArcWithCenter:CGPointMake(CGRectGetMidX(ovalRect), CGRectGetMidY(ovalRect)) - radius:CGRectGetWidth(ovalRect) / 2.0 - startAngle:MLNRadiansFromDegrees(-180 + clippingDegrees) - endAngle:MLNRadiansFromDegrees(-clippingDegrees) - clockwise:YES]; - - [ovalPath addLineToPoint:CGPointMake(CGRectGetMidX(ovalRect), CGRectGetMidY(ovalRect))]; - [ovalPath closePath]; - - return ovalPath.CGPath; -} - -@end diff --git a/ios/MLRN/MLNUserLocationHeadingIndicator.h b/ios/MLRN/MLNUserLocationHeadingIndicator.h deleted file mode 100644 index 5b82de93b..000000000 --- a/ios/MLRN/MLNUserLocationHeadingIndicator.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -@import MapLibre; - -@protocol MLNUserLocationHeadingIndicator - -- (instancetype)initWithUserLocationAnnotationView:(MLNUserLocationAnnotationView *)userLocationView; -- (void)updateHeadingAccuracy:(CLLocationDirection)accuracy; -- (void)updateTintColor:(CGColorRef)color; - -@end diff --git a/ios/MLRN/RCTConvert+Mapbox.h b/ios/MLRN/RCTConvert+Mapbox.h deleted file mode 100644 index 5d58465f0..000000000 --- a/ios/MLRN/RCTConvert+Mapbox.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// RCTConvert+Mapbox.h -// MLRN -// -// Created by Nick Italiano on 8/23/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import -#import - -@interface RCTConvert (Mapbox) - -+ (CLLocationCoordinate2D)GeoJSONPoint:(id)json; - -@end diff --git a/ios/MLRN/RCTConvert+Mapbox.m b/ios/MLRN/RCTConvert+Mapbox.m deleted file mode 100644 index 923655a92..000000000 --- a/ios/MLRN/RCTConvert+Mapbox.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// RCTConvert+Mapbox.m -// MLRN -// -// Created by Nick Italiano on 8/23/17. -// Copyright © 2017 Mapbox Inc. All rights reserved. -// - -#import "RCTConvert+Mapbox.h" - -@implementation RCTConvert (Mapbox) - -+ (CLLocationCoordinate2D)GeoJSONPoint:(id)json -{ - NSDictionary *point = [self NSDictionary:json]; - - if (![[point objectForKey:@"type"] isEqual: @"Point"]) { - return CLLocationCoordinate2DMake(0, 0); - } - - NSArray *coords = (NSArray*)[point objectForKey:@"coordinates"]; - if (coords == nil || coords.count < 2) { - return CLLocationCoordinate2DMake(0, 0); - } - - double lat = [[coords objectAtIndex:1] doubleValue]; - double lng = [[coords objectAtIndex:0] doubleValue]; - - return CLLocationCoordinate2DMake(lat, lng); -} - -@end From 5acbdaffb955580d9bd165c9f691ecd361761851 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 08:22:32 +0100 Subject: [PATCH 5/9] refactor: cleanup java component names --- .../mlrn/components/mapview/MLRNMapView.java | 46 +++++++++---------- .../styles/layers/MLRNBackgroundLayer.java | 2 +- .../styles/layers/MLRNCircleLayer.java | 2 +- .../styles/layers/MLRNFillExtrusionLayer.java | 2 +- .../styles/layers/MLRNFillLayer.java | 2 +- .../styles/layers/MLRNHeatmapLayer.java | 2 +- .../layers/{RCTLayer.java => MLRNLayer.java} | 6 +-- .../styles/layers/MLRNLineLayer.java | 2 +- .../styles/layers/MLRNRasterLayer.java | 2 +- .../styles/layers/MLRNSymbolLayer.java | 2 +- .../styles/sources/MLRNImageSource.java | 2 +- .../styles/sources/MLRNShapeSource.java | 2 +- .../sources/MLRNShapeSourceManager.java | 2 +- .../{RCTSource.java => MLRNSource.java} | 30 ++++++------ .../styles/sources/MLRNTileSource.java | 2 +- .../mlrn/events/FeatureClickEvent.java | 8 ++-- .../org/maplibre/mlrn/modules/MLRNModule.java | 4 +- 17 files changed, 59 insertions(+), 59 deletions(-) rename android/src/main/java/org/maplibre/mlrn/components/styles/layers/{RCTLayer.java => MLRNLayer.java} (97%) rename android/src/main/java/org/maplibre/mlrn/components/styles/sources/{RCTSource.java => MLRNSource.java} (88%) diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java index c2fb00e72..15f7aed64 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java +++ b/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java @@ -60,10 +60,10 @@ import org.maplibre.mlrn.components.location.LocationComponentManager; import org.maplibre.mlrn.components.location.MLRNNativeUserLocation; import org.maplibre.mlrn.components.mapview.helpers.CameraChangeTracker; -import org.maplibre.mlrn.components.styles.layers.RCTLayer; +import org.maplibre.mlrn.components.styles.layers.MLRNLayer; import org.maplibre.mlrn.components.styles.light.MLRNLight; import org.maplibre.mlrn.components.styles.sources.MLRNShapeSource; -import org.maplibre.mlrn.components.styles.sources.RCTSource; +import org.maplibre.mlrn.components.styles.sources.MLRNSource; import org.maplibre.mlrn.events.AndroidCallbackEvent; import org.maplibre.mlrn.events.IEvent; import org.maplibre.mlrn.events.MapChangeEvent; @@ -111,7 +111,7 @@ public class MLRNMapView extends MapView implements OnMapReadyCallback, MapLibre private List mFeatures; private List mQueuedFeatures; private Map mPointAnnotations; - private Map mSources; + private Map mSources; private List mImages; private CameraChangeTracker mCameraChangeTracker = new CameraChangeTracker(); @@ -217,8 +217,8 @@ public void enqueuePreRenderMapMethod(Integer methodID, @Nullable ReadableArray public void addFeature(View childView, int childPosition) { AbstractMapFeature feature = null; - if (childView instanceof RCTSource) { - RCTSource source = (RCTSource) childView; + if (childView instanceof MLRNSource) { + MLRNSource source = (MLRNSource) childView; mSources.put(source.getID(), source); feature = (AbstractMapFeature) childView; } else if (childView instanceof MLRNImages) { @@ -239,8 +239,8 @@ public void addFeature(View childView, int childPosition) { } else if (childView instanceof MLRNCamera) { mCamera = (MLRNCamera) childView; feature = (AbstractMapFeature) childView; - } else if (childView instanceof RCTLayer) { - feature = (RCTLayer) childView; + } else if (childView instanceof MLRNLayer) { + feature = (MLRNLayer) childView; } else if (childView instanceof ViewGroup) { ViewGroup children = (ViewGroup) childView; @@ -266,8 +266,8 @@ public void removeFeature(int childPosition) { return; } - if (feature instanceof RCTSource) { - RCTSource source = (RCTSource) feature; + if (feature instanceof MLRNSource) { + MLRNSource source = (MLRNSource) feature; mSources.remove(source.getID()); } else if (feature instanceof MLRNPointAnnotation) { MLRNPointAnnotation annotation = (MLRNPointAnnotation) feature; @@ -615,11 +615,11 @@ public boolean onMapClick(@NonNull LatLng point) { } PointF screenPoint = mMap.getProjection().toScreenLocation(point); - List touchableSources = getAllTouchableSources(); + List touchableSources = getAllTouchableSources(); Map> hits = new HashMap<>(); - List hitTouchableSources = new ArrayList<>(); - for (RCTSource touchableSource : touchableSources) { + List hitTouchableSources = new ArrayList<>(); + for (MLRNSource touchableSource : touchableSources) { Map hitbox = touchableSource.getTouchHitbox(); if (hitbox == null) { continue; @@ -640,9 +640,9 @@ public boolean onMapClick(@NonNull LatLng point) { } if (hits.size() > 0) { - RCTSource source = getTouchableSourceWithHighestZIndex(hitTouchableSources); + MLRNSource source = getTouchableSourceWithHighestZIndex(hitTouchableSources); if (source != null && source.hasPressListener()) { - source.onPress(new RCTSource.OnPressEvent( + source.onPress(new MLRNSource.OnPressEvent( hits.get(source.getID()), point, screenPoint)); @@ -1321,7 +1321,7 @@ private void removeAllSourcesFromMap() { return; } for (String key : mSources.keySet()) { - RCTSource source = mSources.get(key); + MLRNSource source = mSources.get(key); source.removeFromMap(this); } } @@ -1331,16 +1331,16 @@ private void addAllSourcesToMap() { return; } for (String key : mSources.keySet()) { - RCTSource source = mSources.get(key); + MLRNSource source = mSources.get(key); source.addToMap(this); } } - private List getAllTouchableSources() { - List sources = new ArrayList<>(); + private List getAllTouchableSources() { + List sources = new ArrayList<>(); for (String key : mSources.keySet()) { - RCTSource source = mSources.get(key); + MLRNSource source = mSources.get(key); if (source != null && source.hasPressListener()) { sources.add(source); } @@ -1353,7 +1353,7 @@ private List getAllShapeSources() { List shapeSources = new ArrayList<>(); for (String key : mSources.keySet()) { - RCTSource source = mSources.get(key); + MLRNSource source = mSources.get(key); if (source instanceof MLRNShapeSource) { shapeSources.add((MLRNShapeSource) source); @@ -1363,7 +1363,7 @@ private List getAllShapeSources() { return shapeSources; } - private RCTSource getTouchableSourceWithHighestZIndex(List sources) { + private MLRNSource getTouchableSourceWithHighestZIndex(List sources) { if (sources == null || sources.size() == 0) { return null; } @@ -1372,8 +1372,8 @@ private RCTSource getTouchableSourceWithHighestZIndex(List sources) { return sources.get(0); } - Map layerToSourceMap = new HashMap<>(); - for (RCTSource source : sources) { + Map layerToSourceMap = new HashMap<>(); + for (MLRNSource source : sources) { String[] layerIDs = source.getLayerIDs(); for (String layerID : layerIDs) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java index 1be1d4e6e..2264e7ea0 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java @@ -10,7 +10,7 @@ * Created by nickitaliano on 9/25/17. */ -public class MLRNBackgroundLayer extends RCTLayer { +public class MLRNBackgroundLayer extends MLRNLayer { public MLRNBackgroundLayer(Context context) { super(context); } diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java index 0dcf7a4d0..45e92b219 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java @@ -12,7 +12,7 @@ * Created by nickitaliano on 9/18/17. */ -public class MLRNCircleLayer extends RCTLayer { +public class MLRNCircleLayer extends MLRNLayer { private String mSourceLayerID; public MLRNCircleLayer(Context context) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java index 9246d4cb2..98f0f3675 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java @@ -12,7 +12,7 @@ * Created by nickitaliano on 9/15/17. */ -public class MLRNFillExtrusionLayer extends RCTLayer { +public class MLRNFillExtrusionLayer extends MLRNLayer { private String mSourceLayerID; public MLRNFillExtrusionLayer(Context context) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java index 60628eb31..682264a6e 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java @@ -12,7 +12,7 @@ * Created by nickitaliano on 9/8/17. */ -public class MLRNFillLayer extends RCTLayer { +public class MLRNFillLayer extends MLRNLayer { private String mSourceLayerID; public MLRNFillLayer(Context context) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java index 6a05a2a1d..9007803de 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java @@ -12,7 +12,7 @@ * Created by dhee9000 on 6/8/2019 */ -public class MLRNHeatmapLayer extends RCTLayer { +public class MLRNHeatmapLayer extends MLRNLayer { private String mSourceLayerID; public MLRNHeatmapLayer(Context context){ diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/RCTLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLayer.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/RCTLayer.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLayer.java index 3295a304a..f22c4bfb5 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/RCTLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLayer.java @@ -24,8 +24,8 @@ * Created by nickitaliano on 9/7/17. */ -public abstract class RCTLayer extends AbstractMapFeature { - public static final String LOG_TAG = "RCTLayer"; +public abstract class MLRNLayer extends AbstractMapFeature { + public static final String LOG_TAG = "MLRNLayer"; protected String mID; protected String mSourceID; @@ -47,7 +47,7 @@ public abstract class RCTLayer extends AbstractMapFeature { protected boolean mHadFilter; - public RCTLayer(Context context) { + public MLRNLayer(Context context) { super(context); mContext = context; mHadFilter = false; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java index 538d9ec1d..4b15fa9c2 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java @@ -12,7 +12,7 @@ * Created by nickitaliano on 9/18/17. */ -public class MLRNLineLayer extends RCTLayer { +public class MLRNLineLayer extends MLRNLayer { private String mSourceLayerID; public MLRNLineLayer(Context context) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java index f07f03f76..66cdbbb3a 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java @@ -10,7 +10,7 @@ * Created by nickitaliano on 9/25/17. */ -public class MLRNRasterLayer extends RCTLayer { +public class MLRNRasterLayer extends MLRNLayer { public MLRNRasterLayer(Context context) { super(context); } diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java index 4097f8b60..bad6582a8 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java @@ -12,7 +12,7 @@ * Created by nickitaliano on 9/19/17. */ -public class MLRNSymbolLayer extends RCTLayer { +public class MLRNSymbolLayer extends MLRNLayer { private String mSourceLayerID; public MLRNSymbolLayer(Context context) { diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java index b87310081..cb34c4d15 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java @@ -18,7 +18,7 @@ * Created by nickitaliano on 11/29/17. */ -public class MLRNImageSource extends RCTSource { +public class MLRNImageSource extends MLRNSource { public static final String LOG_TAG = "MLRNImageSource"; private URL mURL; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java index 7e70aeaf7..f6f5ae314 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java @@ -36,7 +36,7 @@ * Created by nickitaliano on 9/19/17. */ -public class MLRNShapeSource extends RCTSource { +public class MLRNShapeSource extends MLRNSource { private URL mURL; private MLRNShapeSourceManager mManager; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java index e7165c270..7f771bba6 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java @@ -22,7 +22,7 @@ import org.maplibre.mlrn.components.AbstractEventEmitter; import org.maplibre.mlrn.components.annotation.MLRNCallout; import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.layers.RCTLayer; +import org.maplibre.mlrn.components.styles.layers.MLRNLayer; import org.maplibre.mlrn.events.constants.EventKeys; import org.maplibre.mlrn.utils.ClusterPropertyEntry; import org.maplibre.mlrn.utils.ExpressionParser; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/RCTSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNSource.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/RCTSource.java rename to android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNSource.java index f9143eb25..26d166bf6 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/RCTSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNSource.java @@ -16,7 +16,7 @@ import org.maplibre.android.style.sources.Source; import org.maplibre.mlrn.components.AbstractMapFeature; import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.layers.RCTLayer; +import org.maplibre.mlrn.components.styles.layers.MLRNLayer; import java.util.ArrayList; import java.util.HashMap; @@ -27,9 +27,9 @@ * Created by nickitaliano on 9/7/17. */ -public abstract class RCTSource extends AbstractMapFeature { +public abstract class MLRNSource extends AbstractMapFeature { public static final String DEFAULT_ID = "composite"; - public static final String LOG_TAG = "RCTSource"; + public static final String LOG_TAG = "MLRNSource"; public static final double DEFAULT_HITBOX_WIDTH = 44.0; public static final double DEFAULT_HITBOX_HEIGHT = 44.0; @@ -42,10 +42,10 @@ public abstract class RCTSource extends AbstractMapFeature { protected boolean mHasPressListener; protected Map mTouchHitbox; - protected List mLayers; - private List mQueuedLayers; + protected List mLayers; + private List mQueuedLayers; - public RCTSource(Context context) { + public MLRNSource(Context context) { super(context); mLayers = new ArrayList<>(); mQueuedLayers = new ArrayList<>(); @@ -59,7 +59,7 @@ public String[] getLayerIDs() { List layerIDs = new ArrayList<>(); for (int i = 0; i < mLayers.size(); i++) { - RCTLayer layer = mLayers.get(i); + MLRNLayer layer = mLayers.get(i); layerIDs.add(layer.getID()); } @@ -149,7 +149,7 @@ public void onStyleLoaded(@NonNull Style style) { public void removeFromMap(MLRNMapView mapView) { if (mLayers.size() > 0) { for (int i = 0; i < mLayers.size(); i++) { - RCTLayer layer = mLayers.get(i); + MLRNLayer layer = mLayers.get(i); layer.removeFromMap(mMapView); } } @@ -160,17 +160,17 @@ public void removeFromMap(MLRNMapView mapView) { try { mMap.getStyle().removeSource(mSource); } catch (Throwable ex) { - Logger.w(LOG_TAG, String.format("RCTSource.removeFromMap: %s - %s", mSource, ex.getMessage()), ex); + Logger.w(LOG_TAG, String.format("MLRNSource.removeFromMap: %s - %s", mSource, ex.getMessage()), ex); } } } public void addLayer(View childView, int childPosition) { - if (!(childView instanceof RCTLayer)) { + if (!(childView instanceof MLRNLayer)) { return; } - RCTLayer layer = (RCTLayer) childView; + MLRNLayer layer = (MLRNLayer) childView; if (mMap == null) { mQueuedLayers.add(childPosition, layer); } else { @@ -179,7 +179,7 @@ public void addLayer(View childView, int childPosition) { } public void removeLayer(int childPosition) { - RCTLayer layer; + MLRNLayer layer; if (mQueuedLayers != null && mQueuedLayers.size() > 0) { layer = mQueuedLayers.get(childPosition); } else { @@ -188,14 +188,14 @@ public void removeLayer(int childPosition) { removeLayerFromMap(layer, childPosition); } - public RCTLayer getLayerAt(int childPosition) { + public MLRNLayer getLayerAt(int childPosition) { if (mQueuedLayers != null && mQueuedLayers.size() > 0) { return mQueuedLayers.get(childPosition); } return mLayers.get(childPosition); } - protected void addLayerToMap(RCTLayer layer, int childPosition) { + protected void addLayerToMap(MLRNLayer layer, int childPosition) { if (mMapView == null || layer == null) { return; } @@ -206,7 +206,7 @@ protected void addLayerToMap(RCTLayer layer, int childPosition) { } } - protected void removeLayerFromMap(RCTLayer layer, int childPosition) { + protected void removeLayerFromMap(MLRNLayer layer, int childPosition) { if (mMapView != null && layer != null) { layer.removeFromMap(mMapView); } diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java index ced6f6cbc..9ae1624b5 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java +++ b/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java @@ -8,7 +8,7 @@ import java.util.Collection; @SuppressWarnings("unused") -public abstract class MLRNTileSource extends RCTSource { +public abstract class MLRNTileSource extends MLRNSource { static final String TILE_SPEC_VERSION = "2.1.0"; private String mURL; diff --git a/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java b/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java index b0f5687cd..cbddff6d3 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java +++ b/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java @@ -8,7 +8,7 @@ import com.facebook.react.bridge.WritableMap; import org.maplibre.geojson.Feature; import org.maplibre.android.geometry.LatLng; -import org.maplibre.mlrn.components.styles.sources.RCTSource; +import org.maplibre.mlrn.components.styles.sources.MLRNSource; import org.maplibre.mlrn.events.constants.EventKeys; import org.maplibre.mlrn.events.constants.EventTypes; import org.maplibre.mlrn.utils.ConvertUtils; @@ -62,17 +62,17 @@ public WritableMap getPayload() { return map; } - public static FeatureClickEvent makeShapeSourceEvent(View view, RCTSource.OnPressEvent event) { + public static FeatureClickEvent makeShapeSourceEvent(View view, MLRNSource.OnPressEvent event) { return new FeatureClickEvent(view, EventKeys.SHAPE_SOURCE_LAYER_CLICK, EventTypes.SHAPE_SOURCE_LAYER_CLICK, event.features, event.latLng, event.screenPoint); } - public static FeatureClickEvent makeVectorSourceEvent(View view, RCTSource.OnPressEvent event) { + public static FeatureClickEvent makeVectorSourceEvent(View view, MLRNSource.OnPressEvent event) { return new FeatureClickEvent(view, EventKeys.VECTOR_SOURCE_LAYER_CLICK, EventTypes.VECTOR_SOURCE_LAYER_CLICK, event.features, event.latLng, event.screenPoint); } - public static FeatureClickEvent makeRasterSourceEvent(View view, RCTSource.OnPressEvent event) { + public static FeatureClickEvent makeRasterSourceEvent(View view, MLRNSource.OnPressEvent event) { return new FeatureClickEvent(view, EventKeys.RASTER_SOURCE_LAYER_CLICK, EventTypes.RASTER_SOURCE_LAYER_CLICK, event.features, event.latLng, event.screenPoint); } diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java b/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java index 952a3984d..5bc174237 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java +++ b/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java @@ -14,7 +14,7 @@ import org.maplibre.android.style.layers.Property; import org.maplibre.mlrn.components.camera.constants.CameraMode; import org.maplibre.mlrn.components.styles.MLRNStyleValue; -import org.maplibre.mlrn.components.styles.sources.RCTSource; +import org.maplibre.mlrn.components.styles.sources.MLRNSource; import org.maplibre.mlrn.events.constants.EventTypes; import org.maplibre.mlrn.http.CustomHeadersInterceptor; import org.maplibre.mlrn.location.UserLocationVerticalAlignment; @@ -101,7 +101,7 @@ public Map getConstants() { // style source constants Map styleSourceConsts = new HashMap<>(); - styleSourceConsts.put("DefaultSourceID", RCTSource.DEFAULT_ID); + styleSourceConsts.put("DefaultSourceID", MLRNSource.DEFAULT_ID); // interpolation modes Map interpolationModes = new HashMap<>(); From 66c0e169acd2ca9c18320ac4edaa983f444b2716 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 08:42:47 +0100 Subject: [PATCH 6/9] refactor: use org.maplibre.reactnative package name --- android/settings.gradle | 1 - android/src/main/AndroidManifest.xml | 2 +- .../{mlrn => reactnative}/MLRNPackage.java | 54 +++++++++---------- .../components/AbstractEvent.java | 2 +- .../components/AbstractEventEmitter.java | 6 +-- .../components/AbstractMapFeature.java | 4 +- .../components/annotation/MLRNCallout.java | 2 +- .../annotation/MLRNCalloutManager.java | 2 +- .../components/annotation/MLRNMarkerView.java | 8 +-- .../annotation/MLRNMarkerViewManager.java | 6 +-- .../annotation/MLRNPointAnnotation.java | 16 +++--- .../MLRNPointAnnotationManager.java | 8 +-- .../components/annotation/MarkerView.java | 2 +- .../annotation/MarkerViewManager.java | 2 +- .../components/camera/CameraStop.java | 8 +-- .../components/camera/CameraUpdateItem.java | 4 +- .../components/camera/CameraUpdateQueue.java | 4 +- .../components/camera/MLRNCamera.java | 36 ++++++------- .../components/camera/MLRNCameraManager.java | 6 +-- .../camera/constants/CameraMode.java | 2 +- .../components/images/MLRNImages.java | 14 ++--- .../components/images/MLRNImagesManager.java | 14 ++--- .../location/LocationComponentManager.java | 8 +-- .../location/MLRNNativeUserLocation.java | 6 +-- .../MLRNNativeUserLocationManager.java | 2 +- .../components/mapview/LayerSourceInfo.java | 2 +- .../mapview/MLRNAndroidTextureMapView.java | 2 +- .../MLRNAndroidTextureMapViewManager.java | 2 +- .../components/mapview/MLRNMapView.java | 50 ++++++++--------- .../mapview/MLRNMapViewManager.java | 12 ++--- .../mapview/helpers/CameraChangeTracker.java | 2 +- .../components/styles/MLRNStyle.java | 6 +-- .../components/styles/MLRNStyleFactory.java | 4 +- .../styles/MLRNStyleFunctionParser.java | 2 +- .../components/styles/MLRNStyleValue.java | 8 +-- .../styles/layers/MLRNBackgroundLayer.java | 6 +-- .../layers/MLRNBackgroundLayerManager.java | 2 +- .../styles/layers/MLRNCircleLayer.java | 8 +-- .../styles/layers/MLRNCircleLayerManager.java | 2 +- .../styles/layers/MLRNFillExtrusionLayer.java | 8 +-- .../layers/MLRNFillExtrusionLayerManager.java | 4 +- .../styles/layers/MLRNFillLayer.java | 8 +-- .../styles/layers/MLRNFillLayerManager.java | 4 +- .../styles/layers/MLRNHeatmapLayer.java | 8 +-- .../layers/MLRNHeatmapLayerManager.java | 2 +- .../components/styles/layers/MLRNLayer.java | 8 +-- .../styles/layers/MLRNLineLayer.java | 8 +-- .../styles/layers/MLRNLineLayerManager.java | 6 +-- .../styles/layers/MLRNRasterLayer.java | 6 +-- .../styles/layers/MLRNRasterLayerManager.java | 2 +- .../styles/layers/MLRNSymbolLayer.java | 8 +-- .../styles/layers/MLRNSymbolLayerManager.java | 2 +- .../components/styles/light/MLRNLight.java | 10 ++-- .../styles/light/MLRNLightManager.java | 2 +- .../styles/sources/MLRNImageSource.java | 2 +- .../sources/MLRNImageSourceManager.java | 6 +-- .../styles/sources/MLRNRasterSource.java | 2 +- .../sources/MLRNRasterSourceManager.java | 2 +- .../styles/sources/MLRNShapeSource.java | 16 +++--- .../sources/MLRNShapeSourceManager.java | 20 +++---- .../components/styles/sources/MLRNSource.java | 8 +-- .../styles/sources/MLRNTileSource.java | 2 +- .../styles/sources/MLRNTileSourceManager.java | 4 +- .../styles/sources/MLRNVectorSource.java | 6 +-- .../sources/MLRNVectorSourceManager.java | 8 +-- .../events/AbstractEvent.java | 2 +- .../events/AndroidCallbackEvent.java | 4 +- .../events/EventEmitter.java | 2 +- .../events/FeatureClickEvent.java | 12 ++--- .../{mlrn => reactnative}/events/IEvent.java | 2 +- .../events/ImageMissingEvent.java | 6 +-- .../events/LocationEvent.java | 8 +-- .../events/MapChangeEvent.java | 6 +-- .../events/MapClickEvent.java | 8 +-- .../events/MapUserTrackingModeEvent.java | 8 +-- .../events/OfflineEvent.java | 2 +- .../events/PointAnnotationClickEvent.java | 12 ++--- .../events/PointAnnotationDragEvent.java | 12 ++--- .../events/constants/EventKeys.java | 2 +- .../events/constants/EventTypes.java | 2 +- .../http/CustomHeadersInterceptor.java | 2 +- .../location/LocationManager.java | 2 +- .../location/UserLocation.java | 2 +- .../UserLocationVerticalAlignment.java | 2 +- .../location/UserTrackingMode.java | 2 +- .../location/UserTrackingState.java | 2 +- .../modules/MLRNLocationModule.java | 8 +-- .../modules/MLRNLogging.java | 2 +- .../modules/MLRNModule.java | 16 +++--- .../modules/MLRNOfflineModule.java | 12 ++--- .../modules/MLRNSnapshotModule.java | 6 +-- .../utils/BitmapUtils.java | 2 +- .../utils/ClusterPropertyEntry.java | 2 +- .../utils/ConvertUtils.java | 2 +- .../utils/DownloadMapImageTask.java | 2 +- .../utils/ExpressionParser.java | 2 +- .../utils/GeoJSONUtils.java | 2 +- .../utils/GeoViewport.java | 2 +- .../utils/ImageEntry.java | 2 +- .../utils/ResourceUtils.java | 2 +- .../utils/SimpleEventCallback.java | 6 +-- .../utils/SphericalMercator.java | 2 +- ios/MLRN/MLRNImageQueue.m | 2 +- .../MainApplication.kt | 2 +- scripts/codegen.ts | 2 +- scripts/templates/MLRNStyleFactory.java.ejs | 4 +- 106 files changed, 334 insertions(+), 335 deletions(-) delete mode 100644 android/settings.gradle rename android/src/main/java/org/maplibre/{mlrn => reactnative}/MLRNPackage.java (57%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/AbstractEvent.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/AbstractEventEmitter.java (95%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/AbstractMapFeature.java (78%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MLRNCallout.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MLRNCalloutManager.java (90%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MLRNMarkerView.java (93%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MLRNMarkerViewManager.java (88%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MLRNPointAnnotation.java (95%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MLRNPointAnnotationManager.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MarkerView.java (89%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/annotation/MarkerViewManager.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/camera/CameraStop.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/camera/CameraUpdateItem.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/camera/CameraUpdateQueue.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/camera/MLRNCamera.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/camera/MLRNCameraManager.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/camera/constants/CameraMode.java (88%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/images/MLRNImages.java (95%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/images/MLRNImagesManager.java (88%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/location/LocationComponentManager.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/location/MLRNNativeUserLocation.java (93%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/location/MLRNNativeUserLocationManager.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/mapview/LayerSourceInfo.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/mapview/MLRNAndroidTextureMapView.java (90%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/mapview/MLRNAndroidTextureMapViewManager.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/mapview/MLRNMapView.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/mapview/MLRNMapViewManager.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/mapview/helpers/CameraChangeTracker.java (93%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/MLRNStyle.java (93%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/MLRNStyleFactory.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/MLRNStyleFunctionParser.java (98%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/MLRNStyleValue.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNBackgroundLayer.java (74%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNBackgroundLayerManager.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNCircleLayer.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNCircleLayerManager.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNFillExtrusionLayer.java (83%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNFillExtrusionLayerManager.java (95%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNFillLayer.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNFillLayerManager.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNHeatmapLayer.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNHeatmapLayerManager.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNLayer.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNLineLayer.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNLineLayerManager.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNRasterLayer.java (74%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNRasterLayerManager.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNSymbolLayer.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/layers/MLRNSymbolLayerManager.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/light/MLRNLight.java (82%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/light/MLRNLightManager.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNImageSource.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNImageSourceManager.java (91%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNRasterSource.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNRasterSourceManager.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNShapeSource.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNShapeSourceManager.java (93%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNSource.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNTileSource.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNTileSourceManager.java (94%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNVectorSource.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/components/styles/sources/MLRNVectorSourceManager.java (91%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/AbstractEvent.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/AndroidCallbackEvent.java (90%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/EventEmitter.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/FeatureClickEvent.java (88%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/IEvent.java (88%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/ImageMissingEvent.java (86%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/LocationEvent.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/MapChangeEvent.java (84%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/MapClickEvent.java (86%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/MapUserTrackingModeEvent.java (79%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/OfflineEvent.java (93%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/PointAnnotationClickEvent.java (80%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/PointAnnotationDragEvent.java (81%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/constants/EventKeys.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/events/constants/EventTypes.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/http/CustomHeadersInterceptor.java (96%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/location/LocationManager.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/location/UserLocation.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/location/UserLocationVerticalAlignment.java (83%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/location/UserTrackingMode.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/location/UserTrackingState.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/modules/MLRNLocationModule.java (95%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/modules/MLRNLogging.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/modules/MLRNModule.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/modules/MLRNOfflineModule.java (98%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/modules/MLRNSnapshotModule.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/BitmapUtils.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/ClusterPropertyEntry.java (88%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/ConvertUtils.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/DownloadMapImageTask.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/ExpressionParser.java (98%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/GeoJSONUtils.java (99%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/GeoViewport.java (97%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/ImageEntry.java (92%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/ResourceUtils.java (95%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/SimpleEventCallback.java (79%) rename android/src/main/java/org/maplibre/{mlrn => reactnative}/utils/SphericalMercator.java (98%) diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index b706dfadb..000000000 --- a/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':mlrn' diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 96cc76b7d..605879763 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + diff --git a/android/src/main/java/org/maplibre/mlrn/MLRNPackage.java b/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java similarity index 57% rename from android/src/main/java/org/maplibre/mlrn/MLRNPackage.java rename to android/src/main/java/org/maplibre/reactnative/MLRNPackage.java index ec18ef0f4..db15ceb20 100644 --- a/android/src/main/java/org/maplibre/mlrn/MLRNPackage.java +++ b/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn; +package org.maplibre.reactnative; import com.facebook.react.ReactPackage; import com.facebook.react.bridge.JavaScriptModule; @@ -10,32 +10,32 @@ import java.util.Collections; import java.util.List; -import org.maplibre.mlrn.components.annotation.MLRNCalloutManager; -import org.maplibre.mlrn.components.annotation.MLRNPointAnnotationManager; -import org.maplibre.mlrn.components.annotation.MLRNMarkerViewManager; -import org.maplibre.mlrn.components.camera.MLRNCameraManager; -import org.maplibre.mlrn.components.images.MLRNImagesManager; -import org.maplibre.mlrn.components.location.MLRNNativeUserLocationManager; -import org.maplibre.mlrn.components.mapview.MLRNMapViewManager; -import org.maplibre.mlrn.components.mapview.MLRNAndroidTextureMapViewManager; -import org.maplibre.mlrn.components.styles.layers.MLRNBackgroundLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNCircleLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNFillExtrusionLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNFillLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNHeatmapLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNLineLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNRasterLayerManager; -import org.maplibre.mlrn.components.styles.layers.MLRNSymbolLayerManager; -import org.maplibre.mlrn.components.styles.light.MLRNLightManager; -import org.maplibre.mlrn.components.styles.sources.MLRNImageSourceManager; -import org.maplibre.mlrn.components.styles.sources.MLRNRasterSourceManager; -import org.maplibre.mlrn.components.styles.sources.MLRNShapeSourceManager; -import org.maplibre.mlrn.components.styles.sources.MLRNVectorSourceManager; -import org.maplibre.mlrn.modules.MLRNLocationModule; -import org.maplibre.mlrn.modules.MLRNLogging; -import org.maplibre.mlrn.modules.MLRNModule; -import org.maplibre.mlrn.modules.MLRNOfflineModule; -import org.maplibre.mlrn.modules.MLRNSnapshotModule; +import org.maplibre.reactnative.components.annotation.MLRNCalloutManager; +import org.maplibre.reactnative.components.annotation.MLRNPointAnnotationManager; +import org.maplibre.reactnative.components.annotation.MLRNMarkerViewManager; +import org.maplibre.reactnative.components.camera.MLRNCameraManager; +import org.maplibre.reactnative.components.images.MLRNImagesManager; +import org.maplibre.reactnative.components.location.MLRNNativeUserLocationManager; +import org.maplibre.reactnative.components.mapview.MLRNMapViewManager; +import org.maplibre.reactnative.components.mapview.MLRNAndroidTextureMapViewManager; +import org.maplibre.reactnative.components.styles.layers.MLRNBackgroundLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNCircleLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNFillExtrusionLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNFillLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNHeatmapLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNLineLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNRasterLayerManager; +import org.maplibre.reactnative.components.styles.layers.MLRNSymbolLayerManager; +import org.maplibre.reactnative.components.styles.light.MLRNLightManager; +import org.maplibre.reactnative.components.styles.sources.MLRNImageSourceManager; +import org.maplibre.reactnative.components.styles.sources.MLRNRasterSourceManager; +import org.maplibre.reactnative.components.styles.sources.MLRNShapeSourceManager; +import org.maplibre.reactnative.components.styles.sources.MLRNVectorSourceManager; +import org.maplibre.reactnative.modules.MLRNLocationModule; +import org.maplibre.reactnative.modules.MLRNLogging; +import org.maplibre.reactnative.modules.MLRNModule; +import org.maplibre.reactnative.modules.MLRNOfflineModule; +import org.maplibre.reactnative.modules.MLRNSnapshotModule; /** * Created by nickitaliano on 8/18/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/AbstractEvent.java b/android/src/main/java/org/maplibre/reactnative/components/AbstractEvent.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/components/AbstractEvent.java rename to android/src/main/java/org/maplibre/reactnative/components/AbstractEvent.java index 24dcc6d28..8748e3e75 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/AbstractEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/components/AbstractEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components; +package org.maplibre.reactnative.components; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.events.Event; diff --git a/android/src/main/java/org/maplibre/mlrn/components/AbstractEventEmitter.java b/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java similarity index 95% rename from android/src/main/java/org/maplibre/mlrn/components/AbstractEventEmitter.java rename to android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java index 3bca43a42..31d67dd90 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/AbstractEventEmitter.java +++ b/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java @@ -1,8 +1,8 @@ -package org.maplibre.mlrn.components; +package org.maplibre.reactnative.components; import android.view.ViewGroup; -import org.maplibre.mlrn.BuildConfig; +import org.maplibre.reactnative.BuildConfig; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; @@ -12,7 +12,7 @@ import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.react.uimanager.common.UIManagerType; -import org.maplibre.mlrn.events.IEvent; +import org.maplibre.reactnative.events.IEvent; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/AbstractMapFeature.java b/android/src/main/java/org/maplibre/reactnative/components/AbstractMapFeature.java similarity index 78% rename from android/src/main/java/org/maplibre/mlrn/components/AbstractMapFeature.java rename to android/src/main/java/org/maplibre/reactnative/components/AbstractMapFeature.java index ebfa229e7..9a100cd6e 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/AbstractMapFeature.java +++ b/android/src/main/java/org/maplibre/reactnative/components/AbstractMapFeature.java @@ -1,9 +1,9 @@ -package org.maplibre.mlrn.components; +package org.maplibre.reactnative.components; import android.content.Context; import com.facebook.react.views.view.ReactViewGroup; -import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.mapview.MLRNMapView; /** * Created by nickitaliano on 9/6/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCallout.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCallout.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCallout.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCallout.java index 4bf7232b9..1faadf778 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCallout.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCallout.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import android.content.Context; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCalloutManager.java similarity index 90% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCalloutManager.java index e3a4310e0..c5dd2ae03 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNCalloutManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCalloutManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerView.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerView.java similarity index 93% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerView.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerView.java index 727443fcf..835d96a71 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerView.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerView.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import android.content.Context; import android.graphics.PointF; @@ -9,9 +9,9 @@ import org.maplibre.geojson.Point; import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.OnMapReadyCallback; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.utils.GeoJSONUtils; public class MLRNMarkerView extends AbstractMapFeature implements MarkerView.OnPositionUpdateListener, View.OnLayoutChangeListener { private MLRNMarkerViewManager mManager; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerViewManager.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerViewManager.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerViewManager.java index 7a9a95fdb..fa4ebdc19 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNMarkerViewManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerViewManager.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.utils.GeoJSONUtils; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotation.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java similarity index 95% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotation.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java index 7f7fdd06a..34eabff51 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotation.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import android.content.Context; import android.graphics.PointF; @@ -14,13 +14,13 @@ import org.maplibre.android.plugins.annotation.SymbolOptions; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.events.PointAnnotationClickEvent; -import org.maplibre.mlrn.events.PointAnnotationDragEvent; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.GeoJSONUtils; -import org.maplibre.mlrn.utils.BitmapUtils; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.events.PointAnnotationClickEvent; +import org.maplibre.reactnative.events.PointAnnotationDragEvent; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.GeoJSONUtils; +import org.maplibre.reactnative.utils.BitmapUtils; public class MLRNPointAnnotation extends AbstractMapFeature implements View.OnLayoutChangeListener { private Context mContext; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotationManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotationManager.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotationManager.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotationManager.java index 2a4bdf999..e674bae20 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MLRNPointAnnotationManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotationManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import androidx.annotation.Nullable; @@ -8,9 +8,9 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.utils.GeoJSONUtils; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerView.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerView.java similarity index 89% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerView.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerView.java index e5af580ce..67d670eac 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerView.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerView.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import android.view.View; diff --git a/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerViewManager.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerViewManager.java rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerViewManager.java index 5d627a689..ba73c6478 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/annotation/MarkerViewManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerViewManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.annotation; +package org.maplibre.reactnative.components.annotation; import androidx.annotation.NonNull; diff --git a/android/src/main/java/org/maplibre/mlrn/components/camera/CameraStop.java b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/camera/CameraStop.java rename to android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java index f416fdf02..f0e291b78 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/camera/CameraStop.java +++ b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.camera; +package org.maplibre.reactnative.components.camera; import android.content.Context; import androidx.annotation.NonNull; @@ -13,10 +13,10 @@ import org.maplibre.android.geometry.LatLng; import org.maplibre.android.geometry.LatLngBounds; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.components.camera.constants.CameraMode; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.camera.constants.CameraMode; +import org.maplibre.reactnative.utils.GeoJSONUtils; -import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.mapview.MLRNMapView; diff --git a/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateItem.java b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateItem.java rename to android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.java index c33fe2bdb..1d95bbcf1 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateItem.java +++ b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.java @@ -1,11 +1,11 @@ -package org.maplibre.mlrn.components.camera; +package org.maplibre.reactnative.components.camera; import androidx.annotation.NonNull; import org.maplibre.android.camera.CameraUpdate; import org.maplibre.android.constants.MapLibreConstants; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.components.camera.constants.CameraMode; +import org.maplibre.reactnative.components.camera.constants.CameraMode; import java.lang.ref.WeakReference; import java.util.concurrent.Callable; diff --git a/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateQueue.java b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateQueue.java rename to android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java index 8152be476..1098c6d0b 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/camera/CameraUpdateQueue.java +++ b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java @@ -1,7 +1,7 @@ -package org.maplibre.mlrn.components.camera; +package org.maplibre.reactnative.components.camera; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.mapview.MLRNMapView; import java.util.ArrayList; import java.util.Iterator; diff --git a/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCamera.java b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCamera.java rename to android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java index d0d800e4a..2e6e95d81 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCamera.java +++ b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.camera; +package org.maplibre.reactnative.components.camera; import android.content.Context; import android.location.Location; @@ -18,22 +18,22 @@ import org.maplibre.android.location.LocationComponentOptions; import org.maplibre.android.location.LocationComponentActivationOptions; // import org.maplibre.android.plugins.locationlayer.LocationLayerPlugin; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.location.LocationComponentManager; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.events.IEvent; -import org.maplibre.mlrn.events.MapUserTrackingModeEvent; -import org.maplibre.mlrn.events.MapChangeEvent; -import org.maplibre.mlrn.location.LocationManager; -import org.maplibre.mlrn.location.UserLocation; -import org.maplibre.mlrn.location.UserLocationVerticalAlignment; -import org.maplibre.mlrn.location.UserTrackingMode; -import org.maplibre.mlrn.location.UserTrackingState; -import org.maplibre.mlrn.utils.GeoJSONUtils; - -import org.maplibre.mlrn.R; - -import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.location.LocationComponentManager; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.events.IEvent; +import org.maplibre.reactnative.events.MapUserTrackingModeEvent; +import org.maplibre.reactnative.events.MapChangeEvent; +import org.maplibre.reactnative.location.LocationManager; +import org.maplibre.reactnative.location.UserLocation; +import org.maplibre.reactnative.location.UserLocationVerticalAlignment; +import org.maplibre.reactnative.location.UserTrackingMode; +import org.maplibre.reactnative.location.UserTrackingState; +import org.maplibre.reactnative.utils.GeoJSONUtils; + +import org.maplibre.reactnative.R; + +import org.maplibre.reactnative.events.constants.EventTypes; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; @@ -191,7 +191,7 @@ private void updateMaxMinZoomLevel() { private void setInitialCamera() { if (mDefaultStop != null) { mDefaultStop.setDuration(0); - mDefaultStop.setMode(org.maplibre.mlrn.components.camera.constants.CameraMode.NONE); + mDefaultStop.setMode(org.maplibre.reactnative.components.camera.constants.CameraMode.NONE); CameraUpdateItem item = mDefaultStop.toCameraUpdate(mMapView); item.run(); } diff --git a/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCameraManager.java b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCameraManager.java rename to android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java index a25510787..3f0b17207 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/camera/MLRNCameraManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.camera; +package org.maplibre.reactnative.components.camera; import org.maplibre.geojson.FeatureCollection; import com.facebook.common.logging.FLog; @@ -6,8 +6,8 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.utils.GeoJSONUtils; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/camera/constants/CameraMode.java b/android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraMode.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/components/camera/constants/CameraMode.java rename to android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraMode.java index f04eaf90e..4b2cc1d4c 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/camera/constants/CameraMode.java +++ b/android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraMode.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.camera.constants; +package org.maplibre.reactnative.components.camera.constants; import androidx.annotation.IntDef; diff --git a/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImages.java b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImages.java similarity index 95% rename from android/src/main/java/org/maplibre/mlrn/components/images/MLRNImages.java rename to android/src/main/java/org/maplibre/reactnative/components/images/MLRNImages.java index 8a9092985..25ca6b19b 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImages.java +++ b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImages.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.images; +package org.maplibre.reactnative.components.images; import android.content.Context; import android.graphics.Bitmap; @@ -11,12 +11,12 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; import org.maplibre.android.utils.BitmapUtils; -import org.maplibre.mlrn.R; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.events.ImageMissingEvent; -import org.maplibre.mlrn.utils.DownloadMapImageTask; -import org.maplibre.mlrn.utils.ImageEntry; +import org.maplibre.reactnative.R; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.events.ImageMissingEvent; +import org.maplibre.reactnative.utils.DownloadMapImageTask; +import org.maplibre.reactnative.utils.ImageEntry; import java.util.AbstractMap; import java.util.ArrayList; diff --git a/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImagesManager.java b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImagesManager.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/components/images/MLRNImagesManager.java rename to android/src/main/java/org/maplibre/reactnative/components/images/MLRNImagesManager.java index 904c05b88..f11fa5bd1 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/images/MLRNImagesManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImagesManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.images; +package org.maplibre.reactnative.components.images; import android.graphics.drawable.BitmapDrawable; @@ -11,12 +11,12 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.styles.sources.MLRNShapeSource; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.utils.ImageEntry; -import org.maplibre.mlrn.utils.ResourceUtils; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.styles.sources.MLRNShapeSource; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.utils.ImageEntry; +import org.maplibre.reactnative.utils.ResourceUtils; import java.util.AbstractMap; import java.util.ArrayList; diff --git a/android/src/main/java/org/maplibre/mlrn/components/location/LocationComponentManager.java b/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/location/LocationComponentManager.java rename to android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java index 7c7454863..e7562d898 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/location/LocationComponentManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.location; +package org.maplibre.reactnative.components.location; import android.annotation.SuppressLint; import android.content.Context; @@ -11,9 +11,9 @@ import org.maplibre.android.location.modes.RenderMode; import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; -import org.maplibre.mlrn.R; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.location.LocationManager; +import org.maplibre.reactnative.R; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.location.LocationManager; import androidx.annotation.NonNull; diff --git a/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocation.java b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java similarity index 93% rename from android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocation.java rename to android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java index 4b2b49fb3..18f033b0e 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocation.java +++ b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.location; +package org.maplibre.reactnative.components.location; import android.annotation.SuppressLint; import android.content.Context; @@ -9,8 +9,8 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.OnMapReadyCallback; import org.maplibre.android.maps.Style; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; public class MLRNNativeUserLocation extends AbstractMapFeature implements OnMapReadyCallback, Style.OnStyleLoaded { private boolean mEnabled = true; diff --git a/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocationManager.java b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocationManager.java rename to android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java index 723bfbe0e..a42836cdc 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/location/MLRNNativeUserLocationManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.location; +package org.maplibre.reactnative.components.location; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/LayerSourceInfo.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/LayerSourceInfo.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/mapview/LayerSourceInfo.java rename to android/src/main/java/org/maplibre/reactnative/components/mapview/LayerSourceInfo.java index ecf28a72d..f501be6f8 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/LayerSourceInfo.java +++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/LayerSourceInfo.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.mapview; +package org.maplibre.reactnative.components.mapview; import org.maplibre.android.style.layers.CircleLayer; import org.maplibre.android.style.layers.FillExtrusionLayer; diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.java similarity index 90% rename from android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java rename to android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.java index 2186a33d1..3dbf8744e 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapView.java +++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.mapview; +package org.maplibre.reactnative.components.mapview; import android.content.Context; import org.maplibre.android.maps.MapLibreMapOptions; diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java rename to android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java index d70ffdef7..4c23d4f11 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNAndroidTextureMapViewManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.mapview; +package org.maplibre.reactnative.components.mapview; import com.facebook.react.bridge.ReactApplicationContext; import org.maplibre.android.maps.MapLibreMapOptions; diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java rename to android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java index 15f7aed64..c242d8046 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapView.java +++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.mapview; +package org.maplibre.reactnative.components.mapview; import android.content.Context; import android.graphics.Bitmap; @@ -49,29 +49,29 @@ import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.Layer; import org.maplibre.android.style.layers.Property; -import org.maplibre.mlrn.R; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.annotation.MLRNPointAnnotation; -import org.maplibre.mlrn.components.annotation.MLRNMarkerView; -import org.maplibre.mlrn.components.annotation.MarkerView; -import org.maplibre.mlrn.components.annotation.MarkerViewManager; -import org.maplibre.mlrn.components.camera.MLRNCamera; -import org.maplibre.mlrn.components.images.MLRNImages; -import org.maplibre.mlrn.components.location.LocationComponentManager; -import org.maplibre.mlrn.components.location.MLRNNativeUserLocation; -import org.maplibre.mlrn.components.mapview.helpers.CameraChangeTracker; -import org.maplibre.mlrn.components.styles.layers.MLRNLayer; -import org.maplibre.mlrn.components.styles.light.MLRNLight; -import org.maplibre.mlrn.components.styles.sources.MLRNShapeSource; -import org.maplibre.mlrn.components.styles.sources.MLRNSource; -import org.maplibre.mlrn.events.AndroidCallbackEvent; -import org.maplibre.mlrn.events.IEvent; -import org.maplibre.mlrn.events.MapChangeEvent; -import org.maplibre.mlrn.events.MapClickEvent; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.BitmapUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; -import org.maplibre.mlrn.utils.GeoViewport; +import org.maplibre.reactnative.R; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.annotation.MLRNPointAnnotation; +import org.maplibre.reactnative.components.annotation.MLRNMarkerView; +import org.maplibre.reactnative.components.annotation.MarkerView; +import org.maplibre.reactnative.components.annotation.MarkerViewManager; +import org.maplibre.reactnative.components.camera.MLRNCamera; +import org.maplibre.reactnative.components.images.MLRNImages; +import org.maplibre.reactnative.components.location.LocationComponentManager; +import org.maplibre.reactnative.components.location.MLRNNativeUserLocation; +import org.maplibre.reactnative.components.mapview.helpers.CameraChangeTracker; +import org.maplibre.reactnative.components.styles.layers.MLRNLayer; +import org.maplibre.reactnative.components.styles.light.MLRNLight; +import org.maplibre.reactnative.components.styles.sources.MLRNShapeSource; +import org.maplibre.reactnative.components.styles.sources.MLRNSource; +import org.maplibre.reactnative.events.AndroidCallbackEvent; +import org.maplibre.reactnative.events.IEvent; +import org.maplibre.reactnative.events.MapChangeEvent; +import org.maplibre.reactnative.events.MapClickEvent; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.BitmapUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; +import org.maplibre.reactnative.utils.GeoViewport; import java.util.ArrayList; import java.util.Arrays; @@ -85,7 +85,7 @@ import javax.annotation.Nullable; import static org.maplibre.android.style.layers.PropertyFactory.visibility; -import static org.maplibre.mlrn.modules.MLRNOfflineModule.DEFAULT_STYLE_URL; +import static org.maplibre.reactnative.modules.MLRNOfflineModule.DEFAULT_STYLE_URL; /** * Created by nickitaliano on 8/18/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapViewManager.java rename to android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java index 2c030c32b..d51f3ac79 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/MLRNMapViewManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.mapview; +package org.maplibre.reactnative.components.mapview; import android.util.Log; import android.view.Gravity; @@ -14,11 +14,11 @@ import org.maplibre.android.geometry.LatLngBounds; import org.maplibre.android.log.Logger; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.ExpressionParser; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.ExpressionParser; +import org.maplibre.reactnative.utils.GeoJSONUtils; import org.maplibre.geojson.FeatureCollection; import org.maplibre.geojson.Point; diff --git a/android/src/main/java/org/maplibre/mlrn/components/mapview/helpers/CameraChangeTracker.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.java similarity index 93% rename from android/src/main/java/org/maplibre/mlrn/components/mapview/helpers/CameraChangeTracker.java rename to android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.java index 9d1350e18..3b552acdc 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/mapview/helpers/CameraChangeTracker.java +++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.mapview.helpers; +package org.maplibre.reactnative.components.mapview.helpers; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyle.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java similarity index 93% rename from android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyle.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java index 71b571faa..d8836781f 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyle.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles; +package org.maplibre.reactnative.components.styles; import android.content.Context; import androidx.annotation.NonNull; @@ -6,8 +6,8 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.utils.DownloadMapImageTask; -import org.maplibre.mlrn.utils.ImageEntry; +import org.maplibre.reactnative.utils.DownloadMapImageTask; +import org.maplibre.reactnative.utils.ImageEntry; import java.util.AbstractMap; import java.util.ArrayList; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFactory.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFactory.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java index 0d229281a..010493296 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFactory.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java @@ -1,7 +1,7 @@ // DO NOT MODIFY // This file is auto-generated from scripts/templates/MLRNStyleFactory.java.ejs -package org.maplibre.mlrn.components.styles; +package org.maplibre.reactnative.components.styles; import org.maplibre.android.style.layers.BackgroundLayer; import org.maplibre.android.style.layers.CircleLayer; @@ -17,7 +17,7 @@ import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import org.maplibre.mlrn.utils.DownloadMapImageTask; +import org.maplibre.reactnative.utils.DownloadMapImageTask; import java.util.List; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFunctionParser.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFunctionParser.java similarity index 98% rename from android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFunctionParser.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFunctionParser.java index f753c1b6d..f2bd50ffb 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleFunctionParser.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFunctionParser.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles; +package org.maplibre.reactnative.components.styles; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleValue.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleValue.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleValue.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleValue.java index 187c370dc..582241073 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/MLRNStyleValue.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleValue.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles; +package org.maplibre.reactnative.components.styles; import androidx.annotation.NonNull; @@ -10,9 +10,9 @@ import com.google.gson.JsonArray; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.TransitionOptions; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.ExpressionParser; -import org.maplibre.mlrn.utils.ImageEntry; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.ExpressionParser; +import org.maplibre.reactnative.utils.ImageEntry; /** * Created by nickitaliano on 9/12/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayer.java similarity index 74% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayer.java index 2264e7ea0..9c2892af1 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayer.java @@ -1,10 +1,10 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.layers.BackgroundLayer; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/25/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayerManager.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayerManager.java index a67b6a073..689f087c2 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNBackgroundLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayer.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayer.java index 45e92b219..a576da673 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayer.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.CircleLayer; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/18/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayerManager.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayerManager.java index 39b6ab006..d9029224f 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNCircleLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayer.java similarity index 83% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayer.java index 98f0f3675..e42a2b475 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayer.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.FillExtrusionLayer; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/15/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayerManager.java similarity index 95% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayerManager.java index 3d5d2ded8..0771125d8 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillExtrusionLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.reactnative.components.AbstractEventEmitter; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayer.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayer.java index 682264a6e..303ebd445 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayer.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.FillLayer; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/8/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayerManager.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayerManager.java index 653228707..81649d427 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNFillLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableArray; @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.reactnative.components.AbstractEventEmitter; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayer.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayer.java index 9007803de..7d1d160a7 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayer.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.HeatmapLayer; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by dhee9000 on 6/8/2019 diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayerManager.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayerManager.java index 4024e809b..c2972fd2d 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNHeatmapLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java index f22c4bfb5..9e302928d 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; @@ -12,9 +12,9 @@ import org.maplibre.android.style.layers.Layer; import org.maplibre.android.style.layers.Property; import org.maplibre.android.style.layers.PropertyFactory; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.utils.ExpressionParser; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.utils.ExpressionParser; import java.util.Arrays; import java.util.HashSet; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayer.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayer.java index 4b15fa9c2..8f1d643a8 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayer.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.LineLayer; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/18/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayerManager.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayerManager.java index 6e0e1c358..18f22cb93 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNLineLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayerManager.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.components.AbstractMapFeature; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.components.AbstractMapFeature; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayer.java similarity index 74% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayer.java index 66cdbbb3a..e8e94b8bd 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayer.java @@ -1,10 +1,10 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.layers.RasterLayer; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/25/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayerManager.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayerManager.java index 69875ed37..823e75660 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNRasterLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayer.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayer.java index bad6582a8..650dc71b1 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayer.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayer.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import android.content.Context; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.layers.SymbolLayer; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; /** * Created by nickitaliano on 9/19/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayerManager.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayerManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayerManager.java index bd3fbdd98..c154a044c 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/layers/MLRNSymbolLayerManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayerManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.layers; +package org.maplibre.reactnative.components.styles.layers; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLight.java b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java similarity index 82% rename from android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLight.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java index 0de9039e1..27124a3bc 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLight.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.light; +package org.maplibre.reactnative.components.styles.light; import android.content.Context; @@ -8,10 +8,10 @@ import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.MLRNStyle; -import org.maplibre.mlrn.components.styles.MLRNStyleFactory; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.MLRNStyle; +import org.maplibre.reactnative.components.styles.MLRNStyleFactory; import java.util.HashMap; import java.util.Map; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLightManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLightManager.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLightManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLightManager.java index d6fd391e3..c38ca0da9 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/light/MLRNLightManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLightManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.light; +package org.maplibre.reactnative.components.styles.light; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSource.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSource.java index cb34c4d15..d4aae2dd6 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSource.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSource.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSourceManager.java similarity index 91% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSourceManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSourceManager.java index 2800f6b04..2c367be1b 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNImageSourceManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; import android.view.View; @@ -9,8 +9,8 @@ import com.facebook.react.uimanager.annotations.ReactProp; import com.facebook.react.views.imagehelper.ImageSource; import org.maplibre.android.geometry.LatLngQuad; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; /** * Created by nickitaliano on 11/29/17. diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSource.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSource.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSource.java index 2b9c26a76..d68ab9745 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSource.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSource.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSourceManager.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSourceManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSourceManager.java index dafc9350a..ec186dba3 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNRasterSourceManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ThemedReactContext; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java index f6f5ae314..156bf7508 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSource.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; import android.graphics.Bitmap; @@ -18,13 +18,13 @@ import org.maplibre.android.style.sources.GeoJsonOptions; import org.maplibre.android.style.sources.GeoJsonSource; import org.maplibre.android.utils.BitmapUtils; -import org.maplibre.mlrn.R; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.events.AndroidCallbackEvent; -import org.maplibre.mlrn.events.FeatureClickEvent; -import org.maplibre.mlrn.utils.ClusterPropertyEntry; -import org.maplibre.mlrn.utils.DownloadMapImageTask; -import org.maplibre.mlrn.utils.ImageEntry; +import org.maplibre.reactnative.R; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.events.AndroidCallbackEvent; +import org.maplibre.reactnative.events.FeatureClickEvent; +import org.maplibre.reactnative.utils.ClusterPropertyEntry; +import org.maplibre.reactnative.utils.DownloadMapImageTask; +import org.maplibre.reactnative.utils.ImageEntry; import java.net.URL; import java.util.ArrayList; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java similarity index 93% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java index 7f771bba6..1eb39b406 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNShapeSourceManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; import android.graphics.drawable.BitmapDrawable; @@ -19,15 +19,15 @@ import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; import org.maplibre.android.style.expressions.Expression; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.components.annotation.MLRNCallout; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.layers.MLRNLayer; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.utils.ClusterPropertyEntry; -import org.maplibre.mlrn.utils.ExpressionParser; -import org.maplibre.mlrn.utils.ImageEntry; -import org.maplibre.mlrn.utils.ResourceUtils; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.components.annotation.MLRNCallout; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.layers.MLRNLayer; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.utils.ClusterPropertyEntry; +import org.maplibre.reactnative.utils.ExpressionParser; +import org.maplibre.reactnative.utils.ImageEntry; +import org.maplibre.reactnative.utils.ResourceUtils; import java.net.MalformedURLException; import java.net.URL; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNSource.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java index 26d166bf6..5b22b35dd 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNSource.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; import androidx.annotation.NonNull; @@ -14,9 +14,9 @@ import org.maplibre.android.maps.MapLibreMap; import org.maplibre.android.maps.Style; import org.maplibre.android.style.sources.Source; -import org.maplibre.mlrn.components.AbstractMapFeature; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.components.styles.layers.MLRNLayer; +import org.maplibre.reactnative.components.AbstractMapFeature; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.components.styles.layers.MLRNLayer; import java.util.ArrayList; import java.util.HashMap; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSource.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSource.java index 9ae1624b5..9c836ae60 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSource.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSource.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSourceManager.java similarity index 94% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSourceManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSourceManager.java index b01073ba2..d4e0d7e93 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNTileSourceManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.view.View; @@ -6,7 +6,7 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableType; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.components.AbstractEventEmitter; +import org.maplibre.reactnative.components.AbstractEventEmitter; import java.util.ArrayList; import java.util.List; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSource.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSource.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSource.java index 91016e6d2..0b512e06b 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSource.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSource.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import android.content.Context; import androidx.annotation.Nullable; @@ -10,8 +10,8 @@ import org.maplibre.geojson.FeatureCollection; import org.maplibre.android.style.expressions.Expression; import org.maplibre.android.style.sources.VectorSource; -import org.maplibre.mlrn.events.AndroidCallbackEvent; -import org.maplibre.mlrn.events.FeatureClickEvent; +import org.maplibre.reactnative.events.AndroidCallbackEvent; +import org.maplibre.reactnative.events.FeatureClickEvent; import java.util.List; diff --git a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSourceManager.java similarity index 91% rename from android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSourceManager.java rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSourceManager.java index fa84de3aa..b0c893edb 100644 --- a/android/src/main/java/org/maplibre/mlrn/components/styles/sources/MLRNVectorSourceManager.java +++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSourceManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.components.styles.sources; +package org.maplibre.reactnative.components.styles.sources; import androidx.annotation.Nullable; @@ -8,9 +8,9 @@ import com.facebook.react.common.MapBuilder; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.ExpressionParser; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.ExpressionParser; import javax.annotation.Nonnull; diff --git a/android/src/main/java/org/maplibre/mlrn/events/AbstractEvent.java b/android/src/main/java/org/maplibre/reactnative/events/AbstractEvent.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/events/AbstractEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/AbstractEvent.java index 62eb72b96..e9b07eec0 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/AbstractEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/AbstractEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.view.View; diff --git a/android/src/main/java/org/maplibre/mlrn/events/AndroidCallbackEvent.java b/android/src/main/java/org/maplibre/reactnative/events/AndroidCallbackEvent.java similarity index 90% rename from android/src/main/java/org/maplibre/mlrn/events/AndroidCallbackEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/AndroidCallbackEvent.java index d55b39954..5618872fe 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/AndroidCallbackEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/AndroidCallbackEvent.java @@ -1,10 +1,10 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.view.View; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; -import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventKeys; /** * Created by nickitaliano on 10/3/17. diff --git a/android/src/main/java/org/maplibre/mlrn/events/EventEmitter.java b/android/src/main/java/org/maplibre/reactnative/events/EventEmitter.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/events/EventEmitter.java rename to android/src/main/java/org/maplibre/reactnative/events/EventEmitter.java index 08708fb79..379b72f6a 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/EventEmitter.java +++ b/android/src/main/java/org/maplibre/reactnative/events/EventEmitter.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java b/android/src/main/java/org/maplibre/reactnative/events/FeatureClickEvent.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/FeatureClickEvent.java index cbddff6d3..a9660e690 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/FeatureClickEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/FeatureClickEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.graphics.PointF; import android.view.View; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableMap; import org.maplibre.geojson.Feature; import org.maplibre.android.geometry.LatLng; -import org.maplibre.mlrn.components.styles.sources.MLRNSource; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.styles.sources.MLRNSource; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; import java.util.List; diff --git a/android/src/main/java/org/maplibre/mlrn/events/IEvent.java b/android/src/main/java/org/maplibre/reactnative/events/IEvent.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/events/IEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/IEvent.java index 2967990f2..88c7cb29d 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/IEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/IEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import com.facebook.react.bridge.WritableMap; diff --git a/android/src/main/java/org/maplibre/mlrn/events/ImageMissingEvent.java b/android/src/main/java/org/maplibre/reactnative/events/ImageMissingEvent.java similarity index 86% rename from android/src/main/java/org/maplibre/mlrn/events/ImageMissingEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/ImageMissingEvent.java index c53f8ea4f..8afdc91e3 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/ImageMissingEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/ImageMissingEvent.java @@ -1,9 +1,9 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; import android.view.View; diff --git a/android/src/main/java/org/maplibre/mlrn/events/LocationEvent.java b/android/src/main/java/org/maplibre/reactnative/events/LocationEvent.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/events/LocationEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/LocationEvent.java index f754d5ff2..dbee85953 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/LocationEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/LocationEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.location.Location; import androidx.annotation.NonNull; @@ -6,9 +6,9 @@ import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import org.maplibre.mlrn.components.mapview.MLRNMapView; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; +import org.maplibre.reactnative.components.mapview.MLRNMapView; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; import java.util.UUID; diff --git a/android/src/main/java/org/maplibre/mlrn/events/MapChangeEvent.java b/android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java similarity index 84% rename from android/src/main/java/org/maplibre/mlrn/events/MapChangeEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java index 43f2a17b8..943e2bb39 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/MapChangeEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java @@ -1,11 +1,11 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import org.maplibre.mlrn.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventKeys; /** * Created by nickitaliano on 8/27/17. @@ -40,7 +40,7 @@ public WritableMap getPayload() { public boolean canCoalesce() { // Make sure EventDispatcher never merges EventKeys.MAP_ONCHANGE events. // This event name is used to emit events with different - // org.maplibre.mlrn.events.constants.EventTypes which are dispatched separately on + // org.maplibre.reactnative.events.constants.EventTypes which are dispatched separately on // the JS side return false; } diff --git a/android/src/main/java/org/maplibre/mlrn/events/MapClickEvent.java b/android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java similarity index 86% rename from android/src/main/java/org/maplibre/mlrn/events/MapClickEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java index e684c4009..7f0c26bce 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/MapClickEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,9 +8,9 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.geometry.LatLng; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.GeoJSONUtils; /** * Created by nickitaliano on 8/23/17. diff --git a/android/src/main/java/org/maplibre/mlrn/events/MapUserTrackingModeEvent.java b/android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java similarity index 79% rename from android/src/main/java/org/maplibre/mlrn/events/MapUserTrackingModeEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java index a90d8067b..fc74ed989 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/MapUserTrackingModeEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java @@ -1,12 +1,12 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.view.View; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.location.UserTrackingMode; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.location.UserTrackingMode; /** * Created by nickitaliano on 12/19/17. diff --git a/android/src/main/java/org/maplibre/mlrn/events/OfflineEvent.java b/android/src/main/java/org/maplibre/reactnative/events/OfflineEvent.java similarity index 93% rename from android/src/main/java/org/maplibre/mlrn/events/OfflineEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/OfflineEvent.java index 0dcdc8b50..f4d8913dc 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/OfflineEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/OfflineEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableMap; diff --git a/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationClickEvent.java b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationClickEvent.java similarity index 80% rename from android/src/main/java/org/maplibre/mlrn/events/PointAnnotationClickEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/PointAnnotationClickEvent.java index 383da106c..03fc1947f 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationClickEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationClickEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.plugins.markerview.MarkerView; import org.maplibre.android.geometry.LatLng; -import org.maplibre.mlrn.components.annotation.MLRNPointAnnotation; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.annotation.MLRNPointAnnotation; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; /** * Created by nickitaliano on 10/11/17. diff --git a/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationDragEvent.java b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationDragEvent.java similarity index 81% rename from android/src/main/java/org/maplibre/mlrn/events/PointAnnotationDragEvent.java rename to android/src/main/java/org/maplibre/reactnative/events/PointAnnotationDragEvent.java index 63b618218..473e8fb37 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/PointAnnotationDragEvent.java +++ b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationDragEvent.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events; +package org.maplibre.reactnative.events; import android.graphics.PointF; import androidx.annotation.NonNull; @@ -8,11 +8,11 @@ import com.facebook.react.bridge.WritableNativeMap; import org.maplibre.android.plugins.markerview.MarkerView; import org.maplibre.android.geometry.LatLng; -import org.maplibre.mlrn.components.annotation.MLRNPointAnnotation; -import org.maplibre.mlrn.events.constants.EventKeys; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.components.annotation.MLRNPointAnnotation; +import org.maplibre.reactnative.events.constants.EventKeys; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; public class PointAnnotationDragEvent extends MapClickEvent { MLRNPointAnnotation mView; diff --git a/android/src/main/java/org/maplibre/mlrn/events/constants/EventKeys.java b/android/src/main/java/org/maplibre/reactnative/events/constants/EventKeys.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/events/constants/EventKeys.java rename to android/src/main/java/org/maplibre/reactnative/events/constants/EventKeys.java index bed42d190..ffa213d6c 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/constants/EventKeys.java +++ b/android/src/main/java/org/maplibre/reactnative/events/constants/EventKeys.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events.constants; +package org.maplibre.reactnative.events.constants; /** * Created by nickitaliano on 8/27/17. diff --git a/android/src/main/java/org/maplibre/mlrn/events/constants/EventTypes.java b/android/src/main/java/org/maplibre/reactnative/events/constants/EventTypes.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/events/constants/EventTypes.java rename to android/src/main/java/org/maplibre/reactnative/events/constants/EventTypes.java index 69373aaa2..1e042ce73 100644 --- a/android/src/main/java/org/maplibre/mlrn/events/constants/EventTypes.java +++ b/android/src/main/java/org/maplibre/reactnative/events/constants/EventTypes.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.events.constants; +package org.maplibre.reactnative.events.constants; /** * Created by nickitaliano on 8/24/17. diff --git a/android/src/main/java/org/maplibre/mlrn/http/CustomHeadersInterceptor.java b/android/src/main/java/org/maplibre/reactnative/http/CustomHeadersInterceptor.java similarity index 96% rename from android/src/main/java/org/maplibre/mlrn/http/CustomHeadersInterceptor.java rename to android/src/main/java/org/maplibre/reactnative/http/CustomHeadersInterceptor.java index 9025cc514..fee0a1340 100644 --- a/android/src/main/java/org/maplibre/mlrn/http/CustomHeadersInterceptor.java +++ b/android/src/main/java/org/maplibre/reactnative/http/CustomHeadersInterceptor.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.http; +package org.maplibre.reactnative.http; import android.util.Log; diff --git a/android/src/main/java/org/maplibre/mlrn/location/LocationManager.java b/android/src/main/java/org/maplibre/reactnative/location/LocationManager.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/location/LocationManager.java rename to android/src/main/java/org/maplibre/reactnative/location/LocationManager.java index 0a2759764..b0eb961ad 100644 --- a/android/src/main/java/org/maplibre/mlrn/location/LocationManager.java +++ b/android/src/main/java/org/maplibre/reactnative/location/LocationManager.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.location; +package org.maplibre.reactnative.location; import android.content.Context; import android.location.Location; diff --git a/android/src/main/java/org/maplibre/mlrn/location/UserLocation.java b/android/src/main/java/org/maplibre/reactnative/location/UserLocation.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/location/UserLocation.java rename to android/src/main/java/org/maplibre/reactnative/location/UserLocation.java index da8780f4b..687249ab7 100644 --- a/android/src/main/java/org/maplibre/mlrn/location/UserLocation.java +++ b/android/src/main/java/org/maplibre/reactnative/location/UserLocation.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.location; +package org.maplibre.reactnative.location; import android.location.Location; diff --git a/android/src/main/java/org/maplibre/mlrn/location/UserLocationVerticalAlignment.java b/android/src/main/java/org/maplibre/reactnative/location/UserLocationVerticalAlignment.java similarity index 83% rename from android/src/main/java/org/maplibre/mlrn/location/UserLocationVerticalAlignment.java rename to android/src/main/java/org/maplibre/reactnative/location/UserLocationVerticalAlignment.java index 1e3c433b0..2a339bccc 100644 --- a/android/src/main/java/org/maplibre/mlrn/location/UserLocationVerticalAlignment.java +++ b/android/src/main/java/org/maplibre/reactnative/location/UserLocationVerticalAlignment.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.location; +package org.maplibre.reactnative.location; /** * Created by nickitaliano on 12/13/17. diff --git a/android/src/main/java/org/maplibre/mlrn/location/UserTrackingMode.java b/android/src/main/java/org/maplibre/reactnative/location/UserTrackingMode.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/location/UserTrackingMode.java rename to android/src/main/java/org/maplibre/reactnative/location/UserTrackingMode.java index f0b86392d..eb4685c78 100644 --- a/android/src/main/java/org/maplibre/mlrn/location/UserTrackingMode.java +++ b/android/src/main/java/org/maplibre/reactnative/location/UserTrackingMode.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.location; +package org.maplibre.reactnative.location; /* import org.maplibre.android.plugins.locationlayer.modes.RenderMode; diff --git a/android/src/main/java/org/maplibre/mlrn/location/UserTrackingState.java b/android/src/main/java/org/maplibre/reactnative/location/UserTrackingState.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/location/UserTrackingState.java rename to android/src/main/java/org/maplibre/reactnative/location/UserTrackingState.java index 01c12519b..56fb61945 100644 --- a/android/src/main/java/org/maplibre/mlrn/location/UserTrackingState.java +++ b/android/src/main/java/org/maplibre/reactnative/location/UserTrackingState.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.location; +package org.maplibre.reactnative.location; /** * Created by nickitaliano on 12/13/17. diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.java similarity index 95% rename from android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.java index afa9c8cff..faec41147 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLocationModule.java +++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.modules; +package org.maplibre.reactnative.modules; import android.location.Location; import androidx.annotation.NonNull; @@ -12,9 +12,9 @@ import com.facebook.react.modules.core.RCTNativeAppEventEmitter; import org.maplibre.android.location.engine.LocationEngineCallback; import org.maplibre.android.location.engine.LocationEngineResult; -import org.maplibre.mlrn.events.EventEmitter; -import org.maplibre.mlrn.events.LocationEvent; -import org.maplibre.mlrn.location.LocationManager; +import org.maplibre.reactnative.events.EventEmitter; +import org.maplibre.reactnative.events.LocationEvent; +import org.maplibre.reactnative.location.LocationManager; @ReactModule(name = MLRNLocationModule.REACT_CLASS) public class MLRNLocationModule extends ReactContextBaseJavaModule { diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java index 56baf59e5..91c5bf978 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNLogging.java +++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.modules; +package org.maplibre.reactnative.modules; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactApplicationContext; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java index 5bc174237..e70303677 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNModule.java +++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.modules; +package org.maplibre.reactnative.modules; import android.os.Handler; import android.util.Log; @@ -12,13 +12,13 @@ import org.maplibre.android.MapLibre; import org.maplibre.android.WellKnownTileServer; import org.maplibre.android.style.layers.Property; -import org.maplibre.mlrn.components.camera.constants.CameraMode; -import org.maplibre.mlrn.components.styles.MLRNStyleValue; -import org.maplibre.mlrn.components.styles.sources.MLRNSource; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.http.CustomHeadersInterceptor; -import org.maplibre.mlrn.location.UserLocationVerticalAlignment; -import org.maplibre.mlrn.location.UserTrackingMode; +import org.maplibre.reactnative.components.camera.constants.CameraMode; +import org.maplibre.reactnative.components.styles.MLRNStyleValue; +import org.maplibre.reactnative.components.styles.sources.MLRNSource; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.http.CustomHeadersInterceptor; +import org.maplibre.reactnative.location.UserLocationVerticalAlignment; +import org.maplibre.reactnative.location.UserTrackingMode; import okhttp3.Dispatcher; import okhttp3.OkHttpClient; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java similarity index 98% rename from android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java index d5f1149dd..96f19b1c0 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNOfflineModule.java +++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.modules; +package org.maplibre.reactnative.modules; import android.content.Context; import android.os.Handler; @@ -18,11 +18,11 @@ import org.maplibre.android.offline.OfflineRegionStatus; import org.maplibre.android.offline.OfflineTilePyramidRegionDefinition; import org.maplibre.android.storage.FileSource; -import org.maplibre.mlrn.events.IEvent; -import org.maplibre.mlrn.events.OfflineEvent; -import org.maplibre.mlrn.events.constants.EventTypes; -import org.maplibre.mlrn.utils.ConvertUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.events.IEvent; +import org.maplibre.reactnative.events.OfflineEvent; +import org.maplibre.reactnative.events.constants.EventTypes; +import org.maplibre.reactnative.utils.ConvertUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; import org.maplibre.android.maps.Style; import org.json.JSONException; diff --git a/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java index 12f9faf45..cf0079cad 100644 --- a/android/src/main/java/org/maplibre/mlrn/modules/MLRNSnapshotModule.java +++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.modules; +package org.maplibre.reactnative.modules; import android.content.Context; import android.content.pm.PackageManager; @@ -23,8 +23,8 @@ import org.maplibre.android.snapshotter.MapSnapshot; import org.maplibre.android.snapshotter.MapSnapshotter; import org.maplibre.android.storage.FileSource; -import org.maplibre.mlrn.utils.BitmapUtils; -import org.maplibre.mlrn.utils.GeoJSONUtils; +import org.maplibre.reactnative.utils.BitmapUtils; +import org.maplibre.reactnative.utils.GeoJSONUtils; import java.io.IOException; import java.io.OutputStream; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/BitmapUtils.java b/android/src/main/java/org/maplibre/reactnative/utils/BitmapUtils.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/utils/BitmapUtils.java rename to android/src/main/java/org/maplibre/reactnative/utils/BitmapUtils.java index 6de7b2581..eec229da8 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/BitmapUtils.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/BitmapUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/ClusterPropertyEntry.java b/android/src/main/java/org/maplibre/reactnative/utils/ClusterPropertyEntry.java similarity index 88% rename from android/src/main/java/org/maplibre/mlrn/utils/ClusterPropertyEntry.java rename to android/src/main/java/org/maplibre/reactnative/utils/ClusterPropertyEntry.java index 78c07f4c8..50eb00dba 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/ClusterPropertyEntry.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/ClusterPropertyEntry.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import org.maplibre.android.style.expressions.Expression; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/ConvertUtils.java b/android/src/main/java/org/maplibre/reactnative/utils/ConvertUtils.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/utils/ConvertUtils.java rename to android/src/main/java/org/maplibre/reactnative/utils/ConvertUtils.java index 6b1d54fee..5faaa05a5 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/ConvertUtils.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/ConvertUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import android.graphics.PointF; import android.graphics.RectF; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/DownloadMapImageTask.java b/android/src/main/java/org/maplibre/reactnative/utils/DownloadMapImageTask.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/utils/DownloadMapImageTask.java rename to android/src/main/java/org/maplibre/reactnative/utils/DownloadMapImageTask.java index 62840bd6d..ebd5ac798 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/DownloadMapImageTask.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/DownloadMapImageTask.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/ExpressionParser.java b/android/src/main/java/org/maplibre/reactnative/utils/ExpressionParser.java similarity index 98% rename from android/src/main/java/org/maplibre/mlrn/utils/ExpressionParser.java rename to android/src/main/java/org/maplibre/reactnative/utils/ExpressionParser.java index 59012240c..f42e4dd8d 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/ExpressionParser.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/ExpressionParser.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import com.facebook.react.bridge.Dynamic; import com.facebook.react.bridge.ReadableArray; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/GeoJSONUtils.java b/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java similarity index 99% rename from android/src/main/java/org/maplibre/mlrn/utils/GeoJSONUtils.java rename to android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java index c5c48c661..c1532af2b 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/GeoJSONUtils.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReadableArray; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/GeoViewport.java b/android/src/main/java/org/maplibre/reactnative/utils/GeoViewport.java similarity index 97% rename from android/src/main/java/org/maplibre/mlrn/utils/GeoViewport.java rename to android/src/main/java/org/maplibre/reactnative/utils/GeoViewport.java index 35386990c..da7787dbf 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/GeoViewport.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/GeoViewport.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import android.graphics.PointF; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/ImageEntry.java b/android/src/main/java/org/maplibre/reactnative/utils/ImageEntry.java similarity index 92% rename from android/src/main/java/org/maplibre/mlrn/utils/ImageEntry.java rename to android/src/main/java/org/maplibre/reactnative/utils/ImageEntry.java index 742c0d78f..cb9a3367e 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/ImageEntry.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/ImageEntry.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; public class ImageEntry { public String uri; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/ResourceUtils.java b/android/src/main/java/org/maplibre/reactnative/utils/ResourceUtils.java similarity index 95% rename from android/src/main/java/org/maplibre/mlrn/utils/ResourceUtils.java rename to android/src/main/java/org/maplibre/reactnative/utils/ResourceUtils.java index 1433e6823..792daee95 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/ResourceUtils.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/ResourceUtils.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import android.content.Context; import android.content.res.Resources; diff --git a/android/src/main/java/org/maplibre/mlrn/utils/SimpleEventCallback.java b/android/src/main/java/org/maplibre/reactnative/utils/SimpleEventCallback.java similarity index 79% rename from android/src/main/java/org/maplibre/mlrn/utils/SimpleEventCallback.java rename to android/src/main/java/org/maplibre/reactnative/utils/SimpleEventCallback.java index c9ace3801..806a66d01 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/SimpleEventCallback.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/SimpleEventCallback.java @@ -1,9 +1,9 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import org.maplibre.android.maps.MapLibreMap; -import org.maplibre.mlrn.components.AbstractEventEmitter; -import org.maplibre.mlrn.events.IEvent; +import org.maplibre.reactnative.components.AbstractEventEmitter; +import org.maplibre.reactnative.events.IEvent; /** * Created by nickitaliano on 8/31/17. diff --git a/android/src/main/java/org/maplibre/mlrn/utils/SphericalMercator.java b/android/src/main/java/org/maplibre/reactnative/utils/SphericalMercator.java similarity index 98% rename from android/src/main/java/org/maplibre/mlrn/utils/SphericalMercator.java rename to android/src/main/java/org/maplibre/reactnative/utils/SphericalMercator.java index de361a0d3..71bb96c2f 100644 --- a/android/src/main/java/org/maplibre/mlrn/utils/SphericalMercator.java +++ b/android/src/main/java/org/maplibre/reactnative/utils/SphericalMercator.java @@ -1,4 +1,4 @@ -package org.maplibre.mlrn.utils; +package org.maplibre.reactnative.utils; import android.graphics.Point; import android.graphics.PointF; diff --git a/ios/MLRN/MLRNImageQueue.m b/ios/MLRN/MLRNImageQueue.m index 12238e87d..6f7d247d3 100644 --- a/ios/MLRN/MLRNImageQueue.m +++ b/ios/MLRN/MLRNImageQueue.m @@ -19,7 +19,7 @@ - (id)init { if (self = [super init]) { imageQueue = [[NSOperationQueue alloc] init]; - imageQueue.name = @"org.maplibre.mlrn.DownloadImageQueue"; + imageQueue.name = @"org.maplibre.reactnative.DownloadImageQueue"; } return self; } diff --git a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt index a26c5cf35..6dc8a933e 100644 --- a/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt +++ b/packages/react-native-app/android/app/src/main/java/com/maplibrereactnativeexample/MainApplication.kt @@ -11,7 +11,7 @@ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.soloader.SoLoader -import org.maplibre.mlrn.MLRNPackage; +import org.maplibre.reactnative.MLRNPackage; class MainApplication : Application(), ReactApplication { diff --git a/scripts/codegen.ts b/scripts/codegen.ts index efd377651..7cdb633d3 100644 --- a/scripts/codegen.ts +++ b/scripts/codegen.ts @@ -27,7 +27,7 @@ const ANDROID_OUTPUT_PATH = path.join( "java", "org", "maplibre", - "mlrn", + "reactnative", "components", "styles", ); diff --git a/scripts/templates/MLRNStyleFactory.java.ejs b/scripts/templates/MLRNStyleFactory.java.ejs index cce75ad5f..4a692ab25 100644 --- a/scripts/templates/MLRNStyleFactory.java.ejs +++ b/scripts/templates/MLRNStyleFactory.java.ejs @@ -5,7 +5,7 @@ // <%= helpers.autoGeneratedHeader.doNotModify %> // <%= helpers.autoGeneratedHeader.generatedFrom(locals.filePath) %> -package org.maplibre.mlrn.components.styles; +package org.maplibre.reactnative.components.styles; import org.maplibre.android.style.layers.BackgroundLayer; import org.maplibre.android.style.layers.CircleLayer; @@ -21,7 +21,7 @@ import org.maplibre.android.style.layers.HillshadeLayer; import org.maplibre.android.style.layers.TransitionOptions; import org.maplibre.android.style.light.Light; import org.maplibre.android.style.light.Position; -import org.maplibre.mlrn.utils.DownloadMapImageTask; +import org.maplibre.reactnative.utils.DownloadMapImageTask; import java.util.List; From b91518b570cca3569921b94887f7d323aade6671 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 09:31:32 +0100 Subject: [PATCH 7/9] refactor: remove getIOSModuleName --- src/utils/index.ts | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 902b82bf0..6352dcbcd 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -8,14 +8,6 @@ import { UIManager, } from "react-native"; -function getAndroidManagerInstance(module: string) { - return UIManager.getViewManagerConfig(module); -} - -function getIosManagerInstance(module: string): any { - return NativeModules[getIOSModuleName(module)]; -} - export function isAndroid(): boolean { return Platform.OS === "android"; } @@ -73,8 +65,8 @@ export function runNativeCommand( } const managerInstance = isAndroid() - ? getAndroidManagerInstance(module) - : getIosManagerInstance(module); + ? UIManager.getViewManagerConfig(module) + : NativeModules[module]; if (!managerInstance) { throw new Error(`Could not find ${module}`); @@ -121,14 +113,6 @@ export function resolveImagePath(imageRef: ImageSourcePropType): string { return res.uri; } -export function getIOSModuleName(moduleName: string): string { - if (moduleName.startsWith("RCT")) { - return moduleName.substring(3); - } - - return moduleName; -} - export function toJSONString(json: object | string = ""): string { return JSON.stringify(json); } From c57b99a0d1ede3e05c31f7fcfb80345b6134264d Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 09:46:07 +0100 Subject: [PATCH 8/9] test: update expo sync fingerprint --- .../__tests__/__snapshots__/withMapLibre-test.ts.snap | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap b/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap index 17094b7e3..84caa9b32 100644 --- a/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap +++ b/plugin/__tests__/__snapshots__/withMapLibre-test.ts.snap @@ -14,7 +14,7 @@ target 'HelloWorld' do # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-4092f82b887b5b9edb84642c2a56984d69b9a403 post_install do |installer| -# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be +# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-6e76c80af0d70c0003d06822dd59b7c729fca472 $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer end @@ -47,7 +47,7 @@ target 'HelloWorld' do # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-4092f82b887b5b9edb84642c2a56984d69b9a403 post_install do |installer| -# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be +# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-6e76c80af0d70c0003d06822dd59b7c729fca472 $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer end @@ -97,7 +97,7 @@ target 'HelloWorld' do use_flipper!() post_install do |installer| -# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be +# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-6e76c80af0d70c0003d06822dd59b7c729fca472 $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer react_native_post_install(installer) @@ -125,7 +125,7 @@ target 'HelloWorld' do # if !ENV['CI'] # use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1') # post_install do |installer| -# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be +# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-6e76c80af0d70c0003d06822dd59b7c729fca472 $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer # flipper_post_install(installer) @@ -171,7 +171,7 @@ end # @generated end pre_installer # @generated begin post_installer - expo prebuild (DO NOT MODIFY) sync-4092f82b887b5b9edb84642c2a56984d69b9a403 post_install do |installer| -# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-72b8976cc2231a4441a5b54389fb6e10bd42a1be +# @generated begin @maplibre/maplibre-react-native-post_installer - expo prebuild (DO NOT MODIFY) sync-6e76c80af0d70c0003d06822dd59b7c729fca472 $MLRN.post_install(installer) # @generated end @maplibre/maplibre-react-native-post_installer end From d89dcef929b0295b891f8c04cc2e532822980451 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Wed, 27 Nov 2024 11:22:22 +0100 Subject: [PATCH 9/9] refactor: rename MLRNImageUtils --- ios/MLRN/{RNMBImageUtils.h => MLRNImageUtils.h} | 2 +- ios/MLRN/{RNMBImageUtils.m => MLRNImageUtils.m} | 6 +++--- ios/MLRN/MLRNMapView.m | 4 ++-- ios/MLRN/MLRNSnapshotModule.m | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) rename ios/MLRN/{RNMBImageUtils.h => MLRNImageUtils.h} (88%) rename ios/MLRN/{RNMBImageUtils.m => MLRNImageUtils.m} (91%) diff --git a/ios/MLRN/RNMBImageUtils.h b/ios/MLRN/MLRNImageUtils.h similarity index 88% rename from ios/MLRN/RNMBImageUtils.h rename to ios/MLRN/MLRNImageUtils.h index 1ae751a53..4dce55952 100644 --- a/ios/MLRN/RNMBImageUtils.h +++ b/ios/MLRN/MLRNImageUtils.h @@ -9,7 +9,7 @@ #import #import -@interface RNMBImageUtils : NSObject +@interface MLRNImageUtils : NSObject +(NSString *)createTempFile:(UIImage *)image; +(NSString *)createBase64:(UIImage *)image; diff --git a/ios/MLRN/RNMBImageUtils.m b/ios/MLRN/MLRNImageUtils.m similarity index 91% rename from ios/MLRN/RNMBImageUtils.m rename to ios/MLRN/MLRNImageUtils.m index 6f5bc622c..ca48b15f8 100644 --- a/ios/MLRN/RNMBImageUtils.m +++ b/ios/MLRN/MLRNImageUtils.m @@ -1,14 +1,14 @@ // -// RNMBImageUtils.m +// MLRNImageUtils.m // MLRN // // Created by Nick Italiano on 1/18/18. // Copyright © 2018 Mapbox Inc. All rights reserved. // -#import "RNMBImageUtils.h" +#import "MLRNImageUtils.h" -@implementation RNMBImageUtils +@implementation MLRNImageUtils + (NSString *)createTempFile:(UIImage *)image { diff --git a/ios/MLRN/MLRNMapView.m b/ios/MLRN/MLRNMapView.m index 3bdb29680..b846a2253 100644 --- a/ios/MLRN/MLRNMapView.m +++ b/ios/MLRN/MLRNMapView.m @@ -9,7 +9,7 @@ #import "MLRNMapView.h" #import "CameraUpdateQueue.h" #import "MLRNUtils.h" -#import "RNMBImageUtils.h" +#import "MLRNImageUtils.h" #import "MLRNImages.h" #import #import "MLRNNativeUserLocation.h" @@ -403,7 +403,7 @@ - (NSString *)takeSnap:(BOOL)writeToDisk [self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES]; UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); - return writeToDisk ? [RNMBImageUtils createTempFile:snapshot] : [RNMBImageUtils createBase64:snapshot]; + return writeToDisk ? [MLRNImageUtils createTempFile:snapshot] : [MLRNImageUtils createBase64:snapshot]; } - (CLLocationDistance)getMetersPerPixelAtLatitude:(double)latitude withZoom:(double)zoomLevel diff --git a/ios/MLRN/MLRNSnapshotModule.m b/ios/MLRN/MLRNSnapshotModule.m index e96e65f60..b90d38cad 100644 --- a/ios/MLRN/MLRNSnapshotModule.m +++ b/ios/MLRN/MLRNSnapshotModule.m @@ -8,7 +8,7 @@ #import "MLRNSnapshotModule.h" #import "MLRNUtils.h" -#import "RNMBImageUtils.h" +#import "MLRNImageUtils.h" @import MapLibre; @implementation MLRNSnapshotModule @@ -37,9 +37,9 @@ + (BOOL)requiresMainQueueSetup NSString *result = nil; if ([jsOptions[@"writeToDisk"] boolValue]) { - result = [RNMBImageUtils createTempFile:snapshot.image]; + result = [MLRNImageUtils createTempFile:snapshot.image]; } else { - result = [RNMBImageUtils createBase64:snapshot.image]; + result = [MLRNImageUtils createBase64:snapshot.image]; } resolve(result);