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/__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/settings.gradle b/android/settings.gradle
deleted file mode 100644
index 87270ab06..000000000
--- a/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':rctmln'
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 335fa4c02..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/com/maplibre/rctmln/RCTMLNPackage.java b/android/src/main/java/com/maplibre/rctmln/RCTMLNPackage.java
deleted file mode 100644
index cf02f0b8b..000000000
--- a/android/src/main/java/com/maplibre/rctmln/RCTMLNPackage.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package com.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 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;
-
-/**
- * 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/com/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java b/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java
deleted file mode 100644
index 0ed63f22e..000000000
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCalloutManager.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.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/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java b/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java
deleted file mode 100644
index edf93b99a..000000000
--- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.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/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java b/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java
deleted file mode 100644
index da0095245..000000000
--- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.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/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java b/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java
deleted file mode 100644
index c8a3066c3..000000000
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.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;
-
-/**
- * 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/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java b/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java
deleted file mode 100644
index 8c9811351..000000000
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.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;
-
-/**
- * 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/java/org/maplibre/reactnative/MLRNPackage.java b/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java
new file mode 100644
index 000000000..db15ceb20
--- /dev/null
+++ b/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java
@@ -0,0 +1,99 @@
+package org.maplibre.reactnative;
+
+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.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.
+ */
+
+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/com/maplibre/rctmln/components/AbstractEvent.java b/android/src/main/java/org/maplibre/reactnative/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/reactnative/components/AbstractEvent.java
index d212d106e..8748e3e75 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/AbstractEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/AbstractEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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/com/maplibre/rctmln/components/AbstractEventEmitter.java b/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java
similarity index 95%
rename from android/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java
rename to android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java
index 68acb699d..31d67dd90 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/AbstractEventEmitter.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/AbstractEventEmitter.java
@@ -1,8 +1,8 @@
-package com.maplibre.rctmln.components;
+package org.maplibre.reactnative.components;
import android.view.ViewGroup;
-import com.maplibre.rctmln.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 com.maplibre.rctmln.events.IEvent;
+import org.maplibre.reactnative.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/reactnative/components/AbstractMapFeature.java
similarity index 55%
rename from android/src/main/java/com/maplibre/rctmln/components/AbstractMapFeature.java
rename to android/src/main/java/org/maplibre/reactnative/components/AbstractMapFeature.java
index 5b5ced450..9a100cd6e 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/AbstractMapFeature.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/AbstractMapFeature.java
@@ -1,9 +1,9 @@
-package com.maplibre.rctmln.components;
+package org.maplibre.reactnative.components;
import android.content.Context;
import com.facebook.react.views.view.ReactViewGroup;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/annotation/RCTMLNCallout.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCallout.java
similarity index 53%
rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCallout.java
rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCallout.java
index 3c9b48e73..1faadf778 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNCallout.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCallout.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.annotation;
+package org.maplibre.reactnative.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/reactnative/components/annotation/MLRNCalloutManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCalloutManager.java
new file mode 100644
index 000000000..c5dd2ae03
--- /dev/null
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNCalloutManager.java
@@ -0,0 +1,22 @@
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerView.java
similarity index 77%
rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java
rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerView.java
index 488e3899f..835d96a71 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerView.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.annotation;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.components.AbstractMapFeature;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.utils.GeoJSONUtils;
+import org.maplibre.reactnative.components.AbstractMapFeature;
+import org.maplibre.reactnative.components.mapview.MLRNMapView;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerViewManager.java
similarity index 54%
rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerViewManager.java
index 3504dafa1..fa4ebdc19 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerViewManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNMarkerViewManager.java
@@ -1,19 +1,19 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractEventEmitter;
-import com.maplibre.rctmln.utils.GeoJSONUtils;
+import org.maplibre.reactnative.components.AbstractEventEmitter;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java
similarity index 91%
rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java
rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java
index c353408eb..34eabff51 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotation.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.annotation;
+package org.maplibre.reactnative.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 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.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 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/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotationManager.java
similarity index 65%
rename from android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotationManager.java
index 5afae0f0b..e674bae20 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotationManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MLRNPointAnnotationManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractEventEmitter;
-import com.maplibre.rctmln.events.constants.EventKeys;
-import com.maplibre.rctmln.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;
@@ -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/com/maplibre/rctmln/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/com/maplibre/rctmln/components/annotation/MarkerView.java
rename to android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerView.java
index 42704bad7..67d670eac 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerView.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.annotation;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/components/annotation/MarkerViewManager.java
index bab8eb92c..ba73c6478 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/annotation/MarkerViewManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.annotation;
+package org.maplibre.reactnative.components.annotation;
import androidx.annotation.NonNull;
diff --git a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java
similarity index 95%
rename from android/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java
rename to android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java
index a04c4f800..f0e291b78 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraStop.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.camera.constants.CameraMode;
-import com.maplibre.rctmln.utils.GeoJSONUtils;
+import org.maplibre.reactnative.components.camera.constants.CameraMode;
+import org.maplibre.reactnative.utils.GeoJSONUtils;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/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/com/maplibre/rctmln/components/camera/CameraUpdateItem.java
rename to android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.java
index d51aa1471..1d95bbcf1 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateItem.java
@@ -1,11 +1,11 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.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/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java
similarity index 90%
rename from android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java
rename to android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java
index f9729e087..1098c6d0b 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/camera/CameraUpdateQueue.java
@@ -1,7 +1,7 @@
-package com.maplibre.rctmln.components.camera;
+package org.maplibre.reactnative.components.camera;
import org.maplibre.android.maps.MapLibreMap;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/camera/RCTMLNCamera.java b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java
similarity index 93%
rename from android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java
rename to android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java
index bfd30e4b4..2e6e95d81 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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(com.maplibre.rctmln.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/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java
similarity index 62%
rename from android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java
index cf1c58577..3f0b17207 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.camera;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.components.AbstractEventEmitter;
-import com.maplibre.rctmln.utils.GeoJSONUtils;
+import org.maplibre.reactnative.components.AbstractEventEmitter;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/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/com/maplibre/rctmln/components/camera/constants/CameraMode.java
rename to android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraMode.java
index 4df0b19d5..4b2cc1d4c 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/camera/constants/CameraMode.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/camera/constants/CameraMode.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.camera.constants;
+package org.maplibre.reactnative.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/reactnative/components/images/MLRNImages.java
similarity index 90%
rename from android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java
rename to android/src/main/java/org/maplibre/reactnative/components/images/MLRNImages.java
index 90ce599f8..25ca6b19b 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImages.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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/com/maplibre/rctmln/components/images/RCTMLNImagesManager.java b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImagesManager.java
similarity index 72%
rename from android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImagesManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/images/MLRNImagesManager.java
index 616b1d9e5..f11fa5bd1 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImagesManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/images/MLRNImagesManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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/com/maplibre/rctmln/components/location/LocationComponentManager.java b/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java
similarity index 93%
rename from android/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java
index 49a83209e..e7562d898 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.R;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.location.LocationManager;
+import org.maplibre.reactnative.R;
+import org.maplibre.reactnative.components.mapview.MLRNMapView;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java
similarity index 81%
rename from android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java
rename to android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java
index 7a3651195..18f033b0e 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.location;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.components.AbstractMapFeature;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
+import org.maplibre.reactnative.components.AbstractMapFeature;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java
similarity index 59%
rename from android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java
index 2d7674876..a42836cdc 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.location;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/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/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java
rename to android/src/main/java/org/maplibre/reactnative/components/mapview/LayerSourceInfo.java
index 7076094a4..f501be6f8 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/LayerSourceInfo.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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/reactnative/components/mapview/MLRNAndroidTextureMapView.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.java
new file mode 100644
index 000000000..3dbf8744e
--- /dev/null
+++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapView.java
@@ -0,0 +1,16 @@
+package org.maplibre.reactnative.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/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java
new file mode 100644
index 000000000..4c23d4f11
--- /dev/null
+++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.java
@@ -0,0 +1,31 @@
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java
similarity index 90%
rename from android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
rename to android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java
index fc9526077..c242d8046 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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,34 +85,34 @@
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.reactnative.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 mSources;
- private List mImages;
+ private Map mPointAnnotations;
+ private Map mSources;
+ 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;
@@ -217,30 +217,30 @@ 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 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;
+ } else if (childView instanceof MLRNLayer) {
+ feature = (MLRNLayer) childView;
} else if (childView instanceof ViewGroup) {
ViewGroup children = (ViewGroup) childView;
@@ -266,19 +266,19 @@ 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 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();
@@ -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));
@@ -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);
}
});
@@ -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);
}
@@ -1349,21 +1349,21 @@ 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);
+ MLRNSource source = mSources.get(key);
- if (source instanceof RCTMLNShapeSource) {
- shapeSources.add((RCTMLNShapeSource) source);
+ if (source instanceof MLRNShapeSource) {
+ shapeSources.add((MLRNShapeSource) source);
}
}
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/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java
similarity index 77%
rename from android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java
index 664c7812c..d51f3ac79 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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 extends LayoutShadowNode> 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/com/maplibre/rctmln/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/com/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java
rename to android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.java
index ea8013969..3b552acdc 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/mapview/helpers/CameraChangeTracker.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/mapview/helpers/CameraChangeTracker.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.mapview.helpers;
+package org.maplibre.reactnative.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/reactnative/components/styles/MLRNStyle.java
similarity index 74%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java
index f1e8d9361..d8836781f 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.utils.DownloadMapImageTask;
-import com.maplibre.rctmln.utils.ImageEntry;
+import org.maplibre.reactnative.utils.DownloadMapImageTask;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java
similarity index 72%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java
index ab4f82a2b..010493296 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.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/RCTMLNStyleFactory.java.ejs
+// This file is auto-generated from scripts/templates/MLRNStyleFactory.java.ejs
-package com.maplibre.rctmln.components.styles;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.utils.DownloadMapImageTask;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFunctionParser.java
similarity index 89%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFunctionParser.java
index f01ebea9f..f2bd50ffb 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFunctionParser.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleValue.java
similarity index 94%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleValue.java
index 853285290..582241073 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleValue.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.utils.ConvertUtils;
-import com.maplibre.rctmln.utils.ExpressionParser;
-import com.maplibre.rctmln.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.
*/
-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/reactnative/components/styles/layers/MLRNBackgroundLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayer.java
new file mode 100644
index 000000000..9c2892af1
--- /dev/null
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayer.java
@@ -0,0 +1,27 @@
+package org.maplibre.reactnative.components.styles.layers;
+
+import android.content.Context;
+
+import org.maplibre.android.style.layers.BackgroundLayer;
+import org.maplibre.reactnative.components.styles.MLRNStyle;
+import org.maplibre.reactnative.components.styles.MLRNStyleFactory;
+
+/**
+ * Created by nickitaliano on 9/25/17.
+ */
+
+public class MLRNBackgroundLayer extends MLRNLayer {
+ 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/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayerManager.java
similarity index 50%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayerManager.java
index 6b61a3b95..689f087c2 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNBackgroundLayerManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.layers;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayer.java
similarity index 64%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayer.java
index 88d34e178..a576da673 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayer.java
@@ -1,21 +1,21 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.RCTMLNStyle;
-import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory;
+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.
*/
-public class RCTMLNCircleLayer extends RCTLayer {
+public class MLRNCircleLayer extends MLRNLayer {
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/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayerManager.java
similarity index 55%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayerManager.java
index 505a1d139..d9029224f 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNCircleLayerManager.java
@@ -1,21 +1,19 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractEventEmitter;
-import com.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/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayer.java
similarity index 63%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayer.java
index 45bad41d0..e42a2b475 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayer.java
@@ -1,21 +1,21 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.RCTMLNStyle;
-import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory;
+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.
*/
-public class RCTMLNFillExtrusionLayer extends RCTLayer {
+public class MLRNFillExtrusionLayer extends MLRNLayer {
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/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayerManager.java
similarity index 51%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayerManager.java
index 79545d447..0771125d8 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillExtrusionLayerManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractEventEmitter;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayer.java
similarity index 64%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayer.java
index d9effc30a..303ebd445 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayer.java
@@ -1,21 +1,21 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.RCTMLNStyle;
-import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory;
+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.
*/
-public class RCTMLNFillLayer extends RCTLayer {
+public class MLRNFillLayer extends MLRNLayer {
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/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayerManager.java
similarity index 54%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayerManager.java
index 48974e150..81649d427 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNFillLayerManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractEventEmitter;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayer.java
similarity index 64%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayer.java
index ce8512af6..7d1d160a7 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayer.java
@@ -1,21 +1,21 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.RCTMLNStyle;
-import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory;
+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
*/
-public class RCTMLNHeatmapLayer extends RCTLayer {
+public class MLRNHeatmapLayer extends MLRNLayer {
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/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayerManager.java
similarity index 51%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayerManager.java
index d64c0d554..c2972fd2d 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNHeatmapLayerManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.layers;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/layers/RCTLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java
similarity index 90%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java
index 1a84c0c86..9e302928d 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLayer.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractMapFeature;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.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;
@@ -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;
@@ -43,11 +43,11 @@ public abstract class RCTLayer extends AbstractMapFeature {
protected T mLayer;
protected Context mContext;
- protected RCTMLNMapView mMapView;
+ protected MLRNMapView mMapView;
protected boolean mHadFilter;
- public RCTLayer(Context context) {
+ public MLRNLayer(Context context) {
super(context);
mContext = context;
mHadFilter = false;
@@ -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/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayer.java
similarity index 64%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayer.java
index 4644a818e..8f1d643a8 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayer.java
@@ -1,21 +1,21 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.RCTMLNStyle;
-import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory;
+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.
*/
-public class RCTMLNLineLayer extends RCTLayer {
+public class MLRNLineLayer extends MLRNLayer {
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/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayerManager.java
similarity index 50%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayerManager.java
index 5adf1624c..18f22cb93 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNLineLayerManager.java
@@ -1,19 +1,21 @@
-package com.maplibre.rctmln.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.reactnative.components.AbstractEventEmitter;
+import org.maplibre.reactnative.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/reactnative/components/styles/layers/MLRNRasterLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayer.java
new file mode 100644
index 000000000..e8e94b8bd
--- /dev/null
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayer.java
@@ -0,0 +1,27 @@
+package org.maplibre.reactnative.components.styles.layers;
+
+import android.content.Context;
+
+import org.maplibre.android.style.layers.RasterLayer;
+import org.maplibre.reactnative.components.styles.MLRNStyle;
+import org.maplibre.reactnative.components.styles.MLRNStyleFactory;
+
+/**
+ * Created by nickitaliano on 9/25/17.
+ */
+
+public class MLRNRasterLayer extends MLRNLayer {
+ 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/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayerManager.java
similarity index 51%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayerManager.java
index a5a7a76a6..823e75660 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNRasterLayerManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.layers;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayer.java
similarity index 64%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayer.java
index cc2929e71..650dc71b1 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayer.java
@@ -1,21 +1,21 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.RCTMLNStyle;
-import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory;
+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.
*/
-public class RCTMLNSymbolLayer extends RCTLayer {
+public class MLRNSymbolLayer extends MLRNLayer {
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/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayerManager.java
similarity index 52%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayerManager.java
index c3254b0fc..c154a044c 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayerManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/layers/MLRNSymbolLayerManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.layers;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java
similarity index 65%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java
index ff41974df..27124a3bc 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLight.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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/com/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLightManager.java
similarity index 53%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLightManager.java
index 265e19468..c38ca0da9 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLightManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/light/MLRNLightManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.light;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSource.java
similarity index 89%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSource.java
index 60b05eeff..d4aae2dd6 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSource.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.sources;
+package org.maplibre.reactnative.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 MLRNSource {
+ 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/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSourceManager.java
similarity index 55%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSourceManager.java
index 7a359487e..2c367be1b 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNImageSourceManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.sources;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.utils.ConvertUtils;
-import com.maplibre.rctmln.utils.GeoJSONUtils;
+import org.maplibre.reactnative.utils.ConvertUtils;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSource.java
similarity index 84%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSource.java
index 18d66e3a5..d68ab9745 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSource.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.sources;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSourceManager.java
similarity index 54%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSourceManager.java
index 8fa5751d2..ec186dba3 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSourceManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNRasterSourceManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.sources;
+package org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java
similarity index 93%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java
index ebb0edf0f..156bf7508 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -36,9 +36,9 @@
* Created by nickitaliano on 9/19/17.
*/
-public class RCTMLNShapeSource extends RCTSource {
+public class MLRNShapeSource extends MLRNSource {
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/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java
similarity index 74%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java
index bdba4df7c..1eb39b406 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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/com/maplibre/rctmln/components/styles/sources/RCTSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java
similarity index 83%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java
index 501574633..5b22b35dd 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNSource.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.components.AbstractMapFeature;
-import com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.components.styles.layers.RCTLayer;
+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;
@@ -27,14 +27,14 @@
* 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;
- protected RCTMLNMapView mMapView;
+ protected MLRNMapView mMapView;
protected MapLibreMap mMap;
protected String mID;
@@ -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());
}
@@ -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,10 +146,10 @@ 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);
+ MLRNLayer layer = mLayers.get(i);
layer.removeFromMap(mMapView);
}
}
@@ -160,17 +160,17 @@ public void removeFromMap(RCTMLNMapView 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/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSource.java
similarity index 92%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSource.java
index 3a512d8d5..9c836ae60 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSource.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.sources;
+package org.maplibre.reactnative.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 MLRNSource {
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/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSourceManager.java
similarity index 86%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSourceManager.java
index a2160da30..d4e0d7e93 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSourceManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNTileSourceManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.components.styles.sources;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.components.AbstractEventEmitter;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSource.java
similarity index 84%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSource.java
index 288dd2669..0b512e06b 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSource.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.events.AndroidCallbackEvent;
-import com.maplibre.rctmln.events.FeatureClickEvent;
+import org.maplibre.reactnative.events.AndroidCallbackEvent;
+import org.maplibre.reactnative.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/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSourceManager.java
similarity index 66%
rename from android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java
rename to android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSourceManager.java
index ce1531a4d..b0c893edb 100644
--- a/android/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSourceManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNVectorSourceManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.events.constants.EventKeys;
-import com.maplibre.rctmln.utils.ConvertUtils;
-import com.maplibre.rctmln.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;
@@ -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/com/maplibre/rctmln/events/AbstractEvent.java b/android/src/main/java/org/maplibre/reactnative/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/reactnative/events/AbstractEvent.java
index e9c1e3dc5..e9b07eec0 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/AbstractEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/AbstractEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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/reactnative/events/AndroidCallbackEvent.java
similarity index 90%
rename from android/src/main/java/com/maplibre/rctmln/events/AndroidCallbackEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/AndroidCallbackEvent.java
index 858ed28cc..5618872fe 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/AndroidCallbackEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/AndroidCallbackEvent.java
@@ -1,10 +1,10 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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.reactnative.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/reactnative/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/reactnative/events/EventEmitter.java
index 48899805e..379b72f6a 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/EventEmitter.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/EventEmitter.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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/reactnative/events/FeatureClickEvent.java
similarity index 84%
rename from android/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/FeatureClickEvent.java
index f5a0d1265..a9660e690 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/FeatureClickEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -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/com/maplibre/rctmln/events/IEvent.java b/android/src/main/java/org/maplibre/reactnative/events/IEvent.java
similarity index 88%
rename from android/src/main/java/com/maplibre/rctmln/events/IEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/IEvent.java
index 6b11619d0..88c7cb29d 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/IEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/IEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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/reactnative/events/ImageMissingEvent.java
similarity index 86%
rename from android/src/main/java/com/maplibre/rctmln/events/ImageMissingEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/ImageMissingEvent.java
index d678d73d8..8afdc91e3 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/ImageMissingEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/ImageMissingEvent.java
@@ -1,9 +1,9 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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.reactnative.events.constants.EventKeys;
+import org.maplibre.reactnative.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/reactnative/events/LocationEvent.java
similarity index 88%
rename from android/src/main/java/com/maplibre/rctmln/events/LocationEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/LocationEvent.java
index de23160d2..dbee85953 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/LocationEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/LocationEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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 com.maplibre.rctmln.components.mapview.RCTMLNMapView;
-import com.maplibre.rctmln.events.constants.EventKeys;
-import com.maplibre.rctmln.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;
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/com/maplibre/rctmln/events/MapChangeEvent.java b/android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java
similarity index 84%
rename from android/src/main/java/com/maplibre/rctmln/events/MapChangeEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java
index 4e5c037dc..943e2bb39 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/MapChangeEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/MapChangeEvent.java
@@ -1,11 +1,11 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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.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
- // com.maplibre.rctmln.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/com/maplibre/rctmln/events/MapClickEvent.java b/android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java
similarity index 86%
rename from android/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java
index b8447fee6..7f0c26bce 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/MapClickEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.events.constants.EventKeys;
-import com.maplibre.rctmln.events.constants.EventTypes;
-import com.maplibre.rctmln.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/com/maplibre/rctmln/events/MapUserTrackingModeEvent.java b/android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java
similarity index 79%
rename from android/src/main/java/com/maplibre/rctmln/events/MapUserTrackingModeEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java
index cd1a57e1a..fc74ed989 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/MapUserTrackingModeEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/MapUserTrackingModeEvent.java
@@ -1,12 +1,12 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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.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/com/maplibre/rctmln/events/OfflineEvent.java b/android/src/main/java/org/maplibre/reactnative/events/OfflineEvent.java
similarity index 93%
rename from android/src/main/java/com/maplibre/rctmln/events/OfflineEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/OfflineEvent.java
index 9047625a3..f4d8913dc 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/OfflineEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/OfflineEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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/com/maplibre/rctmln/events/PointAnnotationClickEvent.java b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationClickEvent.java
similarity index 69%
rename from android/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/PointAnnotationClickEvent.java
index d4b5f7c36..03fc1947f 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationClickEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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 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.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.
*/
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/com/maplibre/rctmln/events/PointAnnotationDragEvent.java b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationDragEvent.java
similarity index 72%
rename from android/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java
rename to android/src/main/java/org/maplibre/reactnative/events/PointAnnotationDragEvent.java
index 4bbcde463..473e8fb37 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/PointAnnotationDragEvent.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events;
+package org.maplibre.reactnative.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 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.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 {
- 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/com/maplibre/rctmln/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/com/maplibre/rctmln/events/constants/EventKeys.java
rename to android/src/main/java/org/maplibre/reactnative/events/constants/EventKeys.java
index d5eba78d4..ffa213d6c 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/constants/EventKeys.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/constants/EventKeys.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events.constants;
+package org.maplibre.reactnative.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/reactnative/events/constants/EventTypes.java
similarity index 97%
rename from android/src/main/java/com/maplibre/rctmln/events/constants/EventTypes.java
rename to android/src/main/java/org/maplibre/reactnative/events/constants/EventTypes.java
index a2926055a..1e042ce73 100644
--- a/android/src/main/java/com/maplibre/rctmln/events/constants/EventTypes.java
+++ b/android/src/main/java/org/maplibre/reactnative/events/constants/EventTypes.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.events.constants;
+package org.maplibre.reactnative.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/reactnative/http/CustomHeadersInterceptor.java
similarity index 96%
rename from android/src/main/java/com/maplibre/rctmln/http/CustomHeadersInterceptor.java
rename to android/src/main/java/org/maplibre/reactnative/http/CustomHeadersInterceptor.java
index a91a87a0f..fee0a1340 100644
--- a/android/src/main/java/com/maplibre/rctmln/http/CustomHeadersInterceptor.java
+++ b/android/src/main/java/org/maplibre/reactnative/http/CustomHeadersInterceptor.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.http;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/location/LocationManager.java
index bc5c44420..b0eb961ad 100644
--- a/android/src/main/java/com/maplibre/rctmln/location/LocationManager.java
+++ b/android/src/main/java/org/maplibre/reactnative/location/LocationManager.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.location;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/location/UserLocation.java
index e4e415458..687249ab7 100644
--- a/android/src/main/java/com/maplibre/rctmln/location/UserLocation.java
+++ b/android/src/main/java/org/maplibre/reactnative/location/UserLocation.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.location;
+package org.maplibre.reactnative.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/reactnative/location/UserLocationVerticalAlignment.java
similarity index 83%
rename from android/src/main/java/com/maplibre/rctmln/location/UserLocationVerticalAlignment.java
rename to android/src/main/java/org/maplibre/reactnative/location/UserLocationVerticalAlignment.java
index c25c5dc68..2a339bccc 100644
--- a/android/src/main/java/com/maplibre/rctmln/location/UserLocationVerticalAlignment.java
+++ b/android/src/main/java/org/maplibre/reactnative/location/UserLocationVerticalAlignment.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.location;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/location/UserTrackingMode.java
index dd003f71d..eb4685c78 100644
--- a/android/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java
+++ b/android/src/main/java/org/maplibre/reactnative/location/UserTrackingMode.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.location;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/location/UserTrackingState.java
index 304a8e897..56fb61945 100644
--- a/android/src/main/java/com/maplibre/rctmln/location/UserTrackingState.java
+++ b/android/src/main/java/org/maplibre/reactnative/location/UserTrackingState.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.location;
+package org.maplibre.reactnative.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/reactnative/modules/MLRNLocationModule.java
similarity index 90%
rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java
rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.java
index df753e27e..faec41147 100644
--- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java
+++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.modules;
+package org.maplibre.reactnative.modules;
import android.location.Location;
import androidx.annotation.NonNull;
@@ -12,13 +12,13 @@
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.reactnative.events.EventEmitter;
+import org.maplibre.reactnative.events.LocationEvent;
+import org.maplibre.reactnative.location.LocationManager;
-@ReactModule(name = RCTMLNLocationModule.REACT_CLASS)
-public class RCTMLNLocationModule extends ReactContextBaseJavaModule {
- public static final String REACT_CLASS = "MLNLocationModule";
+@ReactModule(name = MLRNLocationModule.REACT_CLASS)
+public class MLRNLocationModule extends ReactContextBaseJavaModule {
+ public static final String REACT_CLASS = "MLRNLocationModule";
public static final String LOCATION_UPDATE = "MapboxUserLocationUpdate";
private boolean isEnabled;
@@ -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/com/maplibre/rctmln/modules/RCTMLNLogging.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java
similarity index 93%
rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java
rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java
index 2057ebb7e..91c5bf978 100644
--- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java
+++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.modules;
+package org.maplibre.reactnative.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 {
- public static final String REACT_CLASS = "MLNLogging";
+@ReactModule(name = MLRNLogging.REACT_CLASS)
+public class MLRNLogging extends ReactContextBaseJavaModule {
+ public static final String REACT_CLASS = "MLRNLogging";
private ReactApplicationContext mReactContext;
- public RCTMLNLogging(ReactApplicationContext reactApplicationContext) {
+ public MLRNLogging(ReactApplicationContext reactApplicationContext) {
super(reactApplicationContext);
mReactContext = reactApplicationContext;
diff --git a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java
similarity index 89%
rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java
rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java
index 5c55315b8..e70303677 100644
--- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java
+++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -34,16 +34,16 @@
* Created by nickitaliano on 8/18/17.
*/
-@ReactModule(name = RCTMLNModule.REACT_CLASS)
-public class RCTMLNModule extends ReactContextBaseJavaModule {
- public static final String REACT_CLASS = "MLNModule";
+@ReactModule(name = MLRNModule.REACT_CLASS)
+public class MLRNModule extends ReactContextBaseJavaModule {
+ public static final String REACT_CLASS = "MLRNModule";
private static boolean customHeaderInterceptorAdded = false;
private Handler mUiThreadHandler;
private ReactApplicationContext mReactContext;
- public RCTMLNModule(ReactApplicationContext reactApplicationContext) {
+ public MLRNModule(ReactApplicationContext reactApplicationContext) {
super(reactApplicationContext);
mReactContext = reactApplicationContext;
}
@@ -101,14 +101,14 @@ 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<>();
- 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/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java
similarity index 97%
rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java
rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java
index 3e73bd619..96f19b1c0 100644
--- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java
+++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 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.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;
@@ -36,9 +36,9 @@
* Created by nickitaliano on 10/24/17.
*/
-@ReactModule(name = RCTMLNOfflineModule.REACT_CLASS)
-public class RCTMLNOfflineModule extends ReactContextBaseJavaModule {
- public static final String REACT_CLASS = "MLNOfflineModule";
+@ReactModule(name = MLRNOfflineModule.REACT_CLASS)
+public class MLRNOfflineModule extends ReactContextBaseJavaModule {
+ 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;
@@ -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/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java b/android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java
similarity index 92%
rename from android/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java
rename to android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java
index 35b0185dc..cf0079cad 100644
--- a/android/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java
+++ b/android/src/main/java/org/maplibre/reactnative/modules/MLRNSnapshotModule.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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 com.maplibre.rctmln.utils.BitmapUtils;
-import com.maplibre.rctmln.utils.GeoJSONUtils;
+import org.maplibre.reactnative.utils.BitmapUtils;
+import org.maplibre.reactnative.utils.GeoJSONUtils;
import java.io.IOException;
import java.io.OutputStream;
@@ -38,16 +38,16 @@
* Created by nickitaliano on 11/30/17.
*/
-@ReactModule(name = RCTMLNSnapshotModule.REACT_CLASS)
-public class RCTMLNSnapshotModule extends ReactContextBaseJavaModule {
- public static final String REACT_CLASS = "MLNSnapshotModule";
+@ReactModule(name = MLRNSnapshotModule.REACT_CLASS)
+public class MLRNSnapshotModule extends ReactContextBaseJavaModule {
+ public static final String REACT_CLASS = "MLRNSnapshotModule";
private ReactApplicationContext mContext;
// 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/com/maplibre/rctmln/utils/BitmapUtils.java b/android/src/main/java/org/maplibre/reactnative/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/reactnative/utils/BitmapUtils.java
index f8a93ab56..eec229da8 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/BitmapUtils.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/BitmapUtils.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/utils/ClusterPropertyEntry.java
similarity index 88%
rename from android/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java
rename to android/src/main/java/org/maplibre/reactnative/utils/ClusterPropertyEntry.java
index ef285776d..50eb00dba 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/ClusterPropertyEntry.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/utils/ConvertUtils.java
index 7aa042aa8..5faaa05a5 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/ConvertUtils.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/ConvertUtils.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/utils/DownloadMapImageTask.java
index ea454b239..ebd5ac798 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/DownloadMapImageTask.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/utils/ExpressionParser.java
index 27b5b5ee7..f42e4dd8d 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/ExpressionParser.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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/com/maplibre/rctmln/utils/GeoJSONUtils.java b/android/src/main/java/org/maplibre/reactnative/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/reactnative/utils/GeoJSONUtils.java
index 5c206f961..c1532af2b 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.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/com/maplibre/rctmln/utils/GeoViewport.java b/android/src/main/java/org/maplibre/reactnative/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/reactnative/utils/GeoViewport.java
index 9463340e1..da7787dbf 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/GeoViewport.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/utils/ImageEntry.java
similarity index 92%
rename from android/src/main/java/com/maplibre/rctmln/utils/ImageEntry.java
rename to android/src/main/java/org/maplibre/reactnative/utils/ImageEntry.java
index 917f81c0d..cb9a3367e 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/ImageEntry.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/ImageEntry.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/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/reactnative/utils/ResourceUtils.java
index d4bec0ce4..792daee95 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/ResourceUtils.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/ResourceUtils.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.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/reactnative/utils/SimpleEventCallback.java
similarity index 79%
rename from android/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java
rename to android/src/main/java/org/maplibre/reactnative/utils/SimpleEventCallback.java
index 805e3ba10..806a66d01 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/SimpleEventCallback.java
@@ -1,9 +1,9 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.utils;
import org.maplibre.android.maps.MapLibreMap;
-import com.maplibre.rctmln.components.AbstractEventEmitter;
-import com.maplibre.rctmln.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/com/maplibre/rctmln/utils/SphericalMercator.java b/android/src/main/java/org/maplibre/reactnative/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/reactnative/utils/SphericalMercator.java
index 5cc931fd3..71bb96c2f 100644
--- a/android/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java
+++ b/android/src/main/java/org/maplibre/reactnative/utils/SphericalMercator.java
@@ -1,4 +1,4 @@
-package com.maplibre.rctmln.utils;
+package org.maplibre.reactnative.utils;
import android.graphics.Point;
import android.graphics.PointF;
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/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/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/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 d7f926fb1..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"
}
],
@@ -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",
@@ -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/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/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/MLNCustomHeaders.h b/ios/MLRN/MLRNCustomHeaders.h
similarity index 82%
rename from ios/RCTMLN/MLNCustomHeaders.h
rename to ios/MLRN/MLRNCustomHeaders.h
index 8fd40bcb6..543bdc881 100644
--- a/ios/RCTMLN/MLNCustomHeaders.h
+++ b/ios/MLRN/MLRNCustomHeaders.h
@@ -1,6 +1,6 @@
//
-// MLNCustomHeaders.h
-// RCTMLN
+// MLRNCustomHeaders.h
+// MLRN
//
#import
@@ -8,7 +8,7 @@
@interface NSMutableURLRequest (CustomHeaders)
@end
-@interface MLNCustomHeaders : NSObject
+@interface MLRNCustomHeaders : NSObject
@property (nonatomic, strong) NSMutableDictionary *currentHeaders;
diff --git a/ios/RCTMLN/MLNCustomHeaders.m b/ios/MLRN/MLRNCustomHeaders.m
similarity index 90%
rename from ios/RCTMLN/MLNCustomHeaders.m
rename to ios/MLRN/MLRNCustomHeaders.m
index 4328a56f0..a6f82fa61 100644
--- a/ios/RCTMLN/MLNCustomHeaders.m
+++ b/ios/MLRN/MLRNCustomHeaders.m
@@ -1,11 +1,11 @@
//
-// MLNCustomHeaders.h
-// RCTMLN
+// 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/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 282bbede6..6f7d247d3 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 = @"com.maplibre.rctmln.DownloadImageQueue";
+ imageQueue.name = @"org.maplibre.reactnative.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/RNMBImageUtils.h b/ios/MLRN/MLRNImageUtils.h
similarity index 85%
rename from ios/RCTMLN/RNMBImageUtils.h
rename to ios/MLRN/MLRNImageUtils.h
index 1f095ec6f..4dce55952 100644
--- a/ios/RCTMLN/RNMBImageUtils.h
+++ b/ios/MLRN/MLRNImageUtils.h
@@ -1,6 +1,6 @@
//
// RNMBImageUtils.h
-// RCTMLN
+// MLRN
//
// Created by Nick Italiano on 1/18/18.
// Copyright © 2018 Mapbox Inc. All rights reserved.
@@ -9,7 +9,7 @@
#import
#import
-@interface RNMBImageUtils : NSObject
+@interface MLRNImageUtils : NSObject
+(NSString *)createTempFile:(UIImage *)image;
+(NSString *)createBase64:(UIImage *)image;
diff --git a/ios/RCTMLN/RNMBImageUtils.m b/ios/MLRN/MLRNImageUtils.m
similarity index 84%
rename from ios/RCTMLN/RNMBImageUtils.m
rename to ios/MLRN/MLRNImageUtils.m
index 12a280949..ca48b15f8 100644
--- a/ios/RCTMLN/RNMBImageUtils.m
+++ b/ios/MLRN/MLRNImageUtils.m
@@ -1,19 +1,19 @@
//
-// RNMBImageUtils.m
-// RCTMLN
+// 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
{
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/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/RCTMLNCircleLayerManager.h b/ios/MLRN/MLRNLineLayerManager.h
similarity index 59%
rename from ios/RCTMLN/RCTMLNCircleLayerManager.h
rename to ios/MLRN/MLRNLineLayerManager.h
index e18234dad..5d3bd8df4 100644
--- a/ios/RCTMLN/RCTMLNCircleLayerManager.h
+++ b/ios/MLRN/MLRNLineLayerManager.h
@@ -1,6 +1,6 @@
//
-// RCTMLNCircleLayerManager.h
-// RCTMLN
+// MLRNLineLayerManager.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 RCTMLNCircleLayerManager : 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