diff --git a/android/build.gradle b/android/build.gradle index bebe8f8be..bc6dd5bcc 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,7 +4,7 @@ buildscript { ext { buildToolsVersion = "33.0.0" minSdkVersion = 16 - compileSdkVersion = 33 + compileSdkVersion = 34 targetSdkVersion = 33 supportLibVersion = "28.0.0" } diff --git a/android/rctmln/build.gradle b/android/rctmln/build.gradle index 8068c9441..7ea3e1d3c 100644 --- a/android/rctmln/build.gradle +++ b/android/rctmln/build.gradle @@ -33,8 +33,8 @@ dependencies { implementation("com.facebook.react:react-android") // MapLibre SDK - implementation "org.maplibre.gl:android-sdk:10.2.0" - implementation "org.maplibre.gl:android-sdk-turf:5.9.0" + implementation "org.maplibre.gl:android-sdk:11.0.1" + implementation "org.maplibre.gl:android-sdk-turf:6.0.1" // Dependencies implementation "androidx.vectordrawable:vectordrawable:1.1.0" @@ -45,9 +45,9 @@ dependencies { // MapLibre plugins - implementation ("org.maplibre.gl:android-plugin-localization-v9:2.0.1") - implementation ("org.maplibre.gl:android-plugin-annotation-v9:2.0.1") - implementation ("org.maplibre.gl:android-plugin-markerview-v9:2.0.1") + implementation ("org.maplibre.gl:android-plugin-localization-v9:3.0.0") + implementation ("org.maplibre.gl:android-plugin-annotation-v9:3.0.0") + implementation ("org.maplibre.gl:android-plugin-markerview-v9:3.0.0") } allprojects { diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java index ff23d28d0..42704bad7 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java @@ -4,12 +4,12 @@ import androidx.annotation.NonNull; -import com.mapbox.mapboxsdk.geometry.LatLng; +import org.maplibre.android.geometry.LatLng; /** * Subclass of MarkerView so we MarkerViewManager can implement remove/restoreViews */ -public class MarkerView extends com.mapbox.mapboxsdk.plugins.markerview.MarkerView { +public class MarkerView extends org.maplibre.android.plugins.markerview.MarkerView { View view; public MarkerView(@NonNull LatLng latLng, @NonNull View view) { diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java index 25b46bfaf..bab8eb92c 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java @@ -2,8 +2,8 @@ import androidx.annotation.NonNull; -import com.mapbox.mapboxsdk.maps.MapView; -import com.mapbox.mapboxsdk.maps.MapboxMap; +import org.maplibre.android.maps.MapView; +import org.maplibre.android.maps.MapLibreMap; import java.util.ArrayList; import java.util.List; @@ -13,15 +13,15 @@ /** * Subclass of MarkerViewManager implementing removeViews and restoreViews */ -public class MarkerViewManager extends com.mapbox.mapboxsdk.plugins.markerview.MarkerViewManager { +public class MarkerViewManager extends org.maplibre.android.plugins.markerview.MarkerViewManager { private final List markers = new ArrayList<>(); private MapView mapView; private java.lang.reflect.Method markerUpdate; - public MarkerViewManager(MapView mapView, MapboxMap mapboxMap) { - super(mapView, mapboxMap); + public MarkerViewManager(MapView mapView, MapLibreMap map) { + super(mapView, map); this.mapView = mapView; - // this.mapboxMap = mapboxMap; + // this.map = map; try { markerUpdate = MarkerView.class.getSuperclass().getDeclaredMethod("update"); diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java index 6e68c9863..488e3899f 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java @@ -6,9 +6,9 @@ import androidx.annotation.NonNull; -import com.mapbox.geojson.Point; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; +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; @@ -65,8 +65,8 @@ public void addToMap(RCTMLNMapView mapView) { mMapView.getMapAsync( new OnMapReadyCallback() { @Override - public void onMapReady(@NonNull MapboxMap mapboxMap) { - mMarkerViewManager = mMapView.getMarkerViewManager(mapboxMap); + public void onMapReady(@NonNull MapLibreMap mapLibreMap) { + mMarkerViewManager = mMapView.getMarkerViewManager(mapLibreMap); if (mChildView != null) { mMarkerView = new MarkerView(GeoJSONUtils.toLatLng(mCoordinate), mChildView); diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java index d4ef17731..c353408eb 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java @@ -6,13 +6,14 @@ import android.view.View; import androidx.annotation.NonNull; -import com.mapbox.geojson.Point; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.plugins.annotation.Symbol; -import com.mapbox.mapboxsdk.plugins.annotation.SymbolManager; -import com.mapbox.mapboxsdk.plugins.annotation.SymbolOptions; -import com.mapbox.mapboxsdk.maps.MapboxMap; +import org.maplibre.geojson.Point; +import org.maplibre.android.geometry.LatLng; +import org.maplibre.android.maps.Style; +import org.maplibre.android.plugins.annotation.Symbol; +import org.maplibre.android.plugins.annotation.SymbolManager; +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; @@ -25,7 +26,7 @@ public class RCTMLNPointAnnotation extends AbstractMapFeature implements View.On private Context mContext; private RCTMLNPointAnnotationManager mManager; private Symbol mAnnotation; - private MapboxMap mMap; + private MapLibreMap mMap; private RCTMLNMapView mMapView; private boolean mHasChildren; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java index 2a4041748..a04c4f800 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java @@ -5,19 +5,21 @@ import android.util.DisplayMetrics; import com.facebook.react.bridge.ReadableMap; -import com.mapbox.geojson.FeatureCollection; -import com.mapbox.geojson.Point; -import com.mapbox.mapboxsdk.camera.CameraPosition; -import com.mapbox.mapboxsdk.camera.CameraUpdate; -import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.geometry.LatLngBounds; -import com.mapbox.mapboxsdk.maps.MapboxMap; +import org.maplibre.geojson.FeatureCollection; +import org.maplibre.geojson.Point; +import org.maplibre.android.camera.CameraPosition; +import org.maplibre.android.camera.CameraUpdate; +import org.maplibre.android.camera.CameraUpdateFactory; +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 com.maplibre.rctmln.components.mapview.RCTMLNMapView; + + /** * Created by nickitaliano on 9/5/17. */ @@ -36,7 +38,7 @@ public class CameraStop { private int mMode = CameraMode.EASE; private int mDuration = 2000; - private MapboxMap.CancelableCallback mCallback; + private MapLibreMap.CancelableCallback mCallback; public CameraStop() { } @@ -61,7 +63,7 @@ public void setDuration(int duration) { mDuration = duration; } - public void setCallback(MapboxMap.CancelableCallback callback) { + public void setCallback(MapLibreMap.CancelableCallback callback) { mCallback = callback; } @@ -81,7 +83,7 @@ public void setMode(@CameraMode.Mode int mode) { } public CameraUpdateItem toCameraUpdate(RCTMLNMapView mapView) { - MapboxMap map = mapView.getMapboxMap(); + MapLibreMap map = mapView.getMapboxMap(); CameraPosition currentCamera = map.getCameraPosition(); CameraPosition.Builder builder = new CameraPosition.Builder(currentCamera); @@ -144,7 +146,7 @@ public CameraUpdateItem toCameraUpdate(RCTMLNMapView mapView) { return new CameraUpdateItem(map, CameraUpdateFactory.newCameraPosition(builder.build()), mDuration, mCallback, mMode); } - public static CameraStop fromReadableMap(Context context, @NonNull ReadableMap readableMap, MapboxMap.CancelableCallback callback) { + public static CameraStop fromReadableMap(Context context, @NonNull ReadableMap readableMap, MapLibreMap.CancelableCallback callback) { CameraStop stop = new CameraStop(); if (readableMap.hasKey("pitch")) { diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java index 4efc29ff1..d51aa1471 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java @@ -2,9 +2,9 @@ import androidx.annotation.NonNull; -import com.mapbox.mapboxsdk.camera.CameraUpdate; -import com.mapbox.mapboxsdk.constants.MapboxConstants; -import com.mapbox.mapboxsdk.maps.MapboxMap; +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 java.lang.ref.WeakReference; @@ -23,16 +23,16 @@ public class CameraUpdateItem implements RunnableFuture { private int mDuration; - private MapboxMap.CancelableCallback mCallback; + private MapLibreMap.CancelableCallback mCallback; private CameraUpdate mCameraUpdate; private int mCameraMode; private boolean isCameraActionFinished; private boolean isCameraActionCancelled; - private WeakReference mMap; + private WeakReference mMap; - public CameraUpdateItem(MapboxMap map, CameraUpdate update, int duration, MapboxMap.CancelableCallback callback, @CameraMode.Mode int cameraMode) { + public CameraUpdateItem(MapLibreMap map, CameraUpdate update, int duration, MapLibreMap.CancelableCallback callback, @CameraMode.Mode int cameraMode) { mCameraUpdate = update; mDuration = duration; mCallback = callback; @@ -46,7 +46,7 @@ public int getDuration() { @Override public void run() { - final MapboxMap.CancelableCallback callback = new MapboxMap.CancelableCallback() { + final MapLibreMap.CancelableCallback callback = new MapLibreMap.CancelableCallback() { @Override public void onCancel() { handleCallbackResponse(true); @@ -58,7 +58,7 @@ public void onFinish() { } }; - MapboxMap map = mMap.get(); + MapLibreMap map = mMap.get(); if (map == null) { isCameraActionCancelled = true; return; @@ -71,8 +71,8 @@ public void onFinish() { } // On iOS a duration of -1 means default or dynamic duration (based on flight-path length) - // On Android we can fallback to Mapbox's default duration as there is no such API - int duration = mDuration < 0 ? MapboxConstants.ANIMATION_DURATION : mDuration; + // On Android we can fallback to MapLibre's default duration as there is no such API + int duration = mDuration < 0 ? MapLibreConstants.ANIMATION_DURATION : mDuration; if (mCameraMode == CameraMode.FLIGHT) { map.animateCamera(mCameraUpdate, duration, callback); diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java index 0afe77840..f9729e087 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java @@ -1,6 +1,6 @@ package com.maplibre.rctmln.components.camera; -import com.mapbox.mapboxsdk.maps.MapboxMap; +import org.maplibre.android.maps.MapLibreMap; import com.maplibre.rctmln.components.mapview.RCTMLNMapView; import java.util.ArrayList; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java index 421f65132..bfd30e4b4 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java @@ -3,21 +3,21 @@ import android.content.Context; import android.location.Location; -import com.mapbox.mapboxsdk.camera.CameraPosition; -import com.mapbox.mapboxsdk.camera.CameraUpdate; -import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.geometry.LatLngBounds; -import com.mapbox.mapboxsdk.geometry.VisibleRegion; -import com.mapbox.mapboxsdk.location.OnCameraTrackingChangedListener; -import com.mapbox.mapboxsdk.location.modes.CameraMode; -import com.mapbox.mapboxsdk.location.modes.RenderMode; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.location.LocationComponent; -import com.mapbox.mapboxsdk.location.LocationComponentOptions; -import com.mapbox.mapboxsdk.location.LocationComponentActivationOptions; -// import com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin; +import org.maplibre.android.camera.CameraPosition; +import org.maplibre.android.camera.CameraUpdate; +import org.maplibre.android.camera.CameraUpdateFactory; +import org.maplibre.android.geometry.LatLng; +import org.maplibre.android.geometry.LatLngBounds; +import org.maplibre.android.geometry.VisibleRegion; +import org.maplibre.android.location.OnCameraTrackingChangedListener; +import org.maplibre.android.location.modes.CameraMode; +import org.maplibre.android.location.modes.RenderMode; +import org.maplibre.android.maps.MapLibreMap; +import org.maplibre.android.maps.Style; +import org.maplibre.android.location.LocationComponent; +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; @@ -38,9 +38,9 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.geojson.Point; +import org.maplibre.geojson.Point; -import com.mapbox.mapboxsdk.location.permissions.PermissionsManager; +import org.maplibre.android.location.permissions.PermissionsManager; import androidx.annotation.NonNull; @@ -96,7 +96,7 @@ public void onLocationChange(Location nextLocation) { } }; - private MapboxMap.CancelableCallback mCameraCallback = new MapboxMap.CancelableCallback() { + private MapLibreMap.CancelableCallback mCameraCallback = new MapLibreMap.CancelableCallback() { @Override public void onCancel() { if (!hasSentFirstRegion) { @@ -170,14 +170,14 @@ public void setMaxBounds(LatLngBounds bounds) { } private void updateMaxBounds() { - MapboxMap map = getMapboxMap(); + MapLibreMap map = getMapboxMap(); if (map != null && mMaxBounds != null) { map.setLatLngBoundsForCameraTarget(mMaxBounds); } } private void updateMaxMinZoomLevel() { - MapboxMap map = getMapboxMap(); + MapLibreMap map = getMapboxMap(); if (map != null) { if (mMinZoomLevel >= 0.0) { map.setMinZoomPreference(mMinZoomLevel); @@ -281,15 +281,15 @@ private void updateUserLocationSignificantly(boolean isAnimated) { double zoom = mZoomLevel; if (zoom < 0) { - double camerZoom = mMapView.getMapboxMap().getCameraPosition().zoom; - if (camerZoom < minimumZoomLevelForUserTracking) { + double cameraZoom = mMapView.getMapboxMap().getCameraPosition().zoom; + if (cameraZoom < minimumZoomLevelForUserTracking) { zoom = defaultZoomLevelForUserTracking; } else { - zoom = camerZoom; + zoom = cameraZoom; } } CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(getUserLocationUpdateCameraPosition(zoom)); - MapboxMap.CancelableCallback cameraCallback = new MapboxMap.CancelableCallback() { + MapLibreMap.CancelableCallback cameraCallback = new MapLibreMap.CancelableCallback() { @Override public void onCancel() { mUserTrackingState = UserTrackingState.CHANGED; @@ -314,7 +314,7 @@ private void updateUserLocationIncrementally(boolean isAnimated) { CameraPosition cameraPosition = mMapView.getCameraPosition(); CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(getUserLocationUpdateCameraPosition(cameraPosition.zoom)); - MapboxMap.CancelableCallback callback = new MapboxMap.CancelableCallback() { + MapLibreMap.CancelableCallback callback = new MapLibreMap.CancelableCallback() { @Override public void onCancel() { mUserTrackingState = UserTrackingState.CHANGED; @@ -497,7 +497,7 @@ private void updatedFollowUserMode() { } } - MapboxMap getMapboxMap() { + MapLibreMap getMapboxMap() { if (mMapView == null) { return null; } diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java index f467c45be..cf1c58577 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java @@ -1,6 +1,6 @@ package com.maplibre.rctmln.components.camera; -import com.mapbox.geojson.FeatureCollection; +import org.maplibre.geojson.FeatureCollection; import com.facebook.common.logging.FLog; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java index 8dcdff45b..90ce599f8 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java @@ -8,9 +8,9 @@ import androidx.annotation.Nullable; import androidx.core.content.res.ResourcesCompat; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.utils.BitmapUtils; +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; @@ -35,7 +35,7 @@ public class RCTMLNImages extends AbstractMapFeature { private Map mNativeImages; private RCTMLNImagesManager mManager; private boolean mSendMissingImageEvents = false; - private MapboxMap mMap; + private MapLibreMap mMap; protected String mID; @@ -132,7 +132,7 @@ static List> entry(K k, V v) { return Collections.singletonList((Map.Entry)new AbstractMap.SimpleEntry(k, v)); } - public boolean addMissingImageToStyle(@NonNull String id, @NonNull MapboxMap map) { + public boolean addMissingImageToStyle(@NonNull String id, @NonNull MapLibreMap map) { if (mNativeImages != null) { BitmapDrawable drawable = mNativeImages.get(id); if (drawable != null) { @@ -151,25 +151,25 @@ public boolean addMissingImageToStyle(@NonNull String id, @NonNull MapboxMap map return false; } - public void addImagesToStyle(Map images, @NonNull MapboxMap map) { + public void addImagesToStyle(Map images, @NonNull MapLibreMap map) { if (images != null) { addRemoteImages(new ArrayList<>(images.entrySet()), map); } } - public void addNativeImagesToStyle(Map images, @NonNull MapboxMap map) { + public void addNativeImagesToStyle(Map images, @NonNull MapLibreMap map) { if (images != null) { addNativeImages(new ArrayList<>(images.entrySet()), map); } } - public void sendImageMissingEvent(@NonNull String id, @NonNull MapboxMap map) { + public void sendImageMissingEvent(@NonNull String id, @NonNull MapLibreMap map) { if (mSendMissingImageEvents) { mManager.handleEvent(ImageMissingEvent.makeImageMissingEvent(this, id)); } } - private boolean hasImage(String imageId, @NonNull MapboxMap map) { + private boolean hasImage(String imageId, @NonNull MapLibreMap map) { Style style = map.getStyle(); return style != null && style.getImage(imageId) != null; } @@ -182,7 +182,7 @@ public void addToMap(final RCTMLNMapView mapView) { mapView.getStyle(new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { - MapboxMap map = mapView.getMapboxMap(); + MapLibreMap map = mapView.getMapboxMap(); mMap = map; addNativeImagesToStyle(mNativeImages, map); addImagesToStyle(mImages, map); @@ -191,7 +191,7 @@ public void onStyleLoaded(@NonNull Style style) { }); } - private void addNativeImages(@Nullable List> imageEntries, @NonNull MapboxMap map) { + private void addNativeImages(@Nullable List> imageEntries, @NonNull MapLibreMap map) { Style style = map.getStyle(); if (style == null || imageEntries == null) return; @@ -203,7 +203,7 @@ private void addNativeImages(@Nullable List> i } } - private void addRemoteImages(@Nullable List> imageEntries, @NonNull MapboxMap map) { + private void addRemoteImages(@Nullable List> imageEntries, @NonNull MapLibreMap map) { Style style = map.getStyle(); if (style == null || imageEntries == null) return; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java index 428f6a4c3..48646284b 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java @@ -3,14 +3,14 @@ import android.annotation.SuppressLint; import android.content.Context; -import com.mapbox.mapboxsdk.location.LocationComponent; -import com.mapbox.mapboxsdk.location.LocationComponentActivationOptions; -import com.mapbox.mapboxsdk.location.LocationComponentOptions; -import com.mapbox.mapboxsdk.location.OnCameraTrackingChangedListener; -import com.mapbox.mapboxsdk.location.modes.CameraMode; -import com.mapbox.mapboxsdk.location.modes.RenderMode; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; +import org.maplibre.android.location.LocationComponent; +import org.maplibre.android.location.LocationComponentActivationOptions; +import org.maplibre.android.location.LocationComponentOptions; +import org.maplibre.android.location.OnCameraTrackingChangedListener; +import org.maplibre.android.location.modes.CameraMode; +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; @@ -24,7 +24,7 @@ */ public class LocationComponentManager { private RCTMLNMapView mMapView = null; - private MapboxMap mMap = null; + private MapLibreMap mMap = null; private LocationManager mLocationManager = null; private LocationComponent mLocationComponent = null; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java index 69cbad2cf..752f7e26d 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java @@ -4,17 +4,17 @@ import android.content.Context; import androidx.annotation.NonNull; -import com.mapbox.mapboxsdk.location.permissions.PermissionsManager; -import com.mapbox.mapboxsdk.location.modes.RenderMode; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; -import com.mapbox.mapboxsdk.maps.Style; +import org.maplibre.android.location.permissions.PermissionsManager; +import org.maplibre.android.location.modes.RenderMode; +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; public class RCTMLNNativeUserLocation extends AbstractMapFeature implements OnMapReadyCallback, Style.OnStyleLoaded { private boolean mEnabled = true; - private MapboxMap mMap; + private MapLibreMap mMap; private RCTMLNMapView mMapView; private @RenderMode.Mode int mRenderMode = RenderMode.COMPASS; @@ -38,7 +38,7 @@ public void removeFromMap(RCTMLNMapView mapView) { @SuppressLint("MissingPermission") @Override - public void onMapReady(@NonNull MapboxMap mapboxMap) { + public void onMapReady(@NonNull MapLibreMap mapboxMap) { mMap = mapboxMap; mapboxMap.getStyle(this); } diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java index ca639e295..f1e32bb98 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java @@ -3,7 +3,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import com.mapbox.mapboxsdk.location.modes.RenderMode; +import org.maplibre.android.location.modes.RenderMode; import javax.annotation.Nonnull; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java index 95d99fdb2..7076094a4 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java @@ -1,14 +1,14 @@ package com.maplibre.rctmln.components.mapview; -import com.mapbox.mapboxsdk.style.layers.CircleLayer; -import com.mapbox.mapboxsdk.style.layers.FillExtrusionLayer; -import com.mapbox.mapboxsdk.style.layers.FillLayer; -import com.mapbox.mapboxsdk.style.layers.HeatmapLayer; -import com.mapbox.mapboxsdk.style.layers.HillshadeLayer; -import com.mapbox.mapboxsdk.style.layers.Layer; -import com.mapbox.mapboxsdk.style.layers.LineLayer; -import com.mapbox.mapboxsdk.style.layers.RasterLayer; -import com.mapbox.mapboxsdk.style.layers.SymbolLayer; +import org.maplibre.android.style.layers.CircleLayer; +import org.maplibre.android.style.layers.FillExtrusionLayer; +import org.maplibre.android.style.layers.FillLayer; +import org.maplibre.android.style.layers.HeatmapLayer; +import org.maplibre.android.style.layers.HillshadeLayer; +import org.maplibre.android.style.layers.Layer; +import org.maplibre.android.style.layers.LineLayer; +import org.maplibre.android.style.layers.RasterLayer; +import org.maplibre.android.style.layers.SymbolLayer; import javax.annotation.Nullable; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java index 0786fd784..edf93b99a 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java @@ -1,7 +1,7 @@ package com.maplibre.rctmln.components.mapview; import android.content.Context; -import com.mapbox.mapboxsdk.maps.MapboxMapOptions; +import org.maplibre.android.maps.MapLibreMapOptions; /** * Created by hernanmateo on 12/11/18. */ @@ -10,7 +10,7 @@ public class RCTMLNAndroidTextureMapView extends RCTMLNMapView { public static final String LOG_TAG = "RCTMLNAndroidTextureMapView"; - public RCTMLNAndroidTextureMapView(Context context, RCTMLNAndroidTextureMapViewManager manager, MapboxMapOptions options) { + public RCTMLNAndroidTextureMapView(Context context, RCTMLNAndroidTextureMapViewManager manager, MapLibreMapOptions options) { super(context, manager, options); } } diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java index 1d6f71181..da0095245 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java @@ -1,7 +1,7 @@ package com.maplibre.rctmln.components.mapview; import com.facebook.react.bridge.ReactApplicationContext; -import com.mapbox.mapboxsdk.maps.MapboxMapOptions; +import org.maplibre.android.maps.MapLibreMapOptions; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; @@ -24,7 +24,7 @@ public String getName() { @Override protected RCTMLNAndroidTextureMapView createViewInstance(ThemedReactContext themedReactContext) { - MapboxMapOptions options = new MapboxMapOptions(); + MapLibreMapOptions options = new MapLibreMapOptions(); options.textureMode(true); return new RCTMLNAndroidTextureMapView(themedReactContext, this, options); } diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java index 1f698be57..76b6538a6 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java @@ -17,7 +17,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; -import com.mapbox.mapboxsdk.log.Logger; +import org.maplibre.android.log.Logger; import com.facebook.react.bridge.LifecycleEventListener; import com.facebook.react.bridge.ReactContext; @@ -28,27 +28,27 @@ import com.facebook.react.bridge.WritableNativeArray; import com.facebook.react.bridge.WritableNativeMap; import com.mapbox.android.gestures.MoveGestureDetector; -import com.mapbox.geojson.Feature; -import com.mapbox.geojson.FeatureCollection; -import com.mapbox.mapboxsdk.camera.CameraPosition; -import com.mapbox.mapboxsdk.camera.CameraUpdate; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.geometry.VisibleRegion; -import com.mapbox.mapboxsdk.maps.AttributionDialogManager; -import com.mapbox.mapboxsdk.maps.MapView; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.MapboxMapOptions; -import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.maps.UiSettings; -import com.mapbox.mapboxsdk.plugins.localization.LocalizationPlugin; -import com.mapbox.mapboxsdk.plugins.annotation.OnSymbolClickListener; -import com.mapbox.mapboxsdk.plugins.annotation.OnSymbolDragListener; -import com.mapbox.mapboxsdk.plugins.annotation.Symbol; -import com.mapbox.mapboxsdk.plugins.annotation.SymbolManager; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.Layer; -import com.mapbox.mapboxsdk.style.layers.Property; +import org.maplibre.geojson.Feature; +import org.maplibre.geojson.FeatureCollection; +import org.maplibre.android.camera.CameraPosition; +import org.maplibre.android.camera.CameraUpdate; +import org.maplibre.android.geometry.LatLng; +import org.maplibre.android.geometry.VisibleRegion; +import org.maplibre.android.maps.AttributionDialogManager; +import org.maplibre.android.maps.MapView; +import org.maplibre.android.maps.MapLibreMap; +import org.maplibre.android.maps.MapLibreMapOptions; +import org.maplibre.android.maps.OnMapReadyCallback; +import org.maplibre.android.maps.Style; +import org.maplibre.android.maps.UiSettings; +import org.maplibre.android.plugins.localization.LocalizationPlugin; +import org.maplibre.android.plugins.annotation.OnSymbolClickListener; +import org.maplibre.android.plugins.annotation.OnSymbolDragListener; +import org.maplibre.android.plugins.annotation.Symbol; +import org.maplibre.android.plugins.annotation.SymbolManager; +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; @@ -84,7 +84,7 @@ import javax.annotation.Nullable; -import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.visibility; +import static org.maplibre.android.style.layers.PropertyFactory.visibility; import static com.maplibre.rctmln.modules.RCTMLNOfflineModule.DEFAULT_STYLE_URL; /** @@ -92,11 +92,11 @@ */ @SuppressWarnings({ "MissingPermission" }) -public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapboxMap.OnMapClickListener, - MapboxMap.OnMapLongClickListener, MapView.OnCameraIsChangingListener, MapView.OnCameraDidChangeListener, +public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLibreMap.OnMapClickListener, + MapLibreMap.OnMapLongClickListener, MapView.OnCameraIsChangingListener, MapView.OnCameraDidChangeListener, MapView.OnDidFailLoadingMapListener, MapView.OnDidFinishLoadingMapListener, - MapView.OnWillStartRenderingFrameListener, MapView.OnDidFinishRenderingFrameListener, - MapView.OnWillStartRenderingMapListener, MapView.OnDidFinishRenderingMapListener, + MapView.OnWillStartRenderingFrameListener, MapView.OnWillStartRenderingMapListener, + MapView.OnDidFinishRenderingFrameListener, MapView.OnDidFinishRenderingMapListener, MapView.OnDidFinishLoadingStyleListener, MapView.OnStyleImageMissingListener { public static final String LOG_TAG = "RCTMLNMapView"; @@ -117,7 +117,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox private CameraChangeTracker mCameraChangeTracker = new CameraChangeTracker(); private List> mPreRenderMethods = new ArrayList<>(); - private MapboxMap mMap; + private MapLibreMap mMap; private LocalizationPlugin mLocalizationPlugin; @@ -156,7 +156,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, Mapbox private @Nullable Integer mTintColor = null; - public RCTMLNMapView(Context context, RCTMLNMapViewManager manager, MapboxMapOptions options) { + public RCTMLNMapView(Context context, RCTMLNMapViewManager manager, MapLibreMapOptions options) { super(context, options); mContext = context; @@ -338,11 +338,11 @@ public CameraPosition getCameraPosition() { return mMap.getCameraPosition(); } - public void animateCamera(CameraUpdate cameraUpdate, MapboxMap.CancelableCallback callback) { + public void animateCamera(CameraUpdate cameraUpdate, MapLibreMap.CancelableCallback callback) { mMap.animateCamera(cameraUpdate, callback); } - public void moveCamera(CameraUpdate cameraUpdate, MapboxMap.CancelableCallback callback) { + public void moveCamera(CameraUpdate cameraUpdate, MapLibreMap.CancelableCallback callback) { mMap.moveCamera(cameraUpdate, callback); } @@ -350,7 +350,7 @@ public void moveCamera(CameraUpdate cameraUpdate) { mMap.moveCamera(cameraUpdate); } - public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator, MapboxMap.CancelableCallback callback) { + public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator, MapLibreMap.CancelableCallback callback) { mMap.easeCamera(cameraUpdate, duration, easingInterpolator, callback); } @@ -386,7 +386,7 @@ public RCTMLNPointAnnotation getPointAnnotationByMarkerID(long markerID) { return null; } - public MapboxMap getMapboxMap() { + public MapLibreMap getMapboxMap() { return mMap; } @@ -437,7 +437,7 @@ public boolean isJSONValid(String test) { @Override - public void onMapReady(final MapboxMap mapboxMap) { + public void onMapReady(final MapLibreMap mapboxMap) { mMap = mapboxMap; if (isJSONValid(mStyleURL)) { @@ -463,14 +463,14 @@ public void onStyleLoaded(@NonNull Style style) { updateInsets(); updateUISettings(); - mMap.addOnCameraIdleListener(new MapboxMap.OnCameraIdleListener() { + mMap.addOnCameraIdleListener(new MapLibreMap.OnCameraIdleListener() { @Override public void onCameraIdle() { sendRegionDidChangeEvent(); } }); - mMap.addOnCameraMoveStartedListener(new MapboxMap.OnCameraMoveStartedListener() { + mMap.addOnCameraMoveStartedListener(new MapLibreMap.OnCameraMoveStartedListener() { @Override public void onCameraMoveStarted(int reason) { mCameraChangeTracker.setReason(reason); @@ -478,7 +478,7 @@ public void onCameraMoveStarted(int reason) { } }); - mMap.addOnCameraMoveListener(new MapboxMap.OnCameraMoveListener() { + mMap.addOnCameraMoveListener(new MapLibreMap.OnCameraMoveListener() { @Override public void onCameraMove() { if (markerViewManager != null) { @@ -487,7 +487,7 @@ public void onCameraMove() { } }); - mMap.addOnMoveListener(new MapboxMap.OnMoveListener() { + mMap.addOnMoveListener(new MapLibreMap.OnMoveListener() { @Override public void onMoveBegin(MoveGestureDetector detector) { mCameraChangeTracker.setReason(CameraChangeTracker.USER_GESTURE); @@ -732,7 +732,7 @@ public void onWillStartRenderingFrame() { } @Override - public void onDidFinishRenderingFrame(boolean fully) { + public void onDidFinishRenderingFrame(boolean fully, double frameEncodingTime, double frameRenderingTime) { if (fully) { handleMapChangedEvent(EventTypes.DID_FINISH_RENDERING_FRAME_FULLY); } else { @@ -848,7 +848,7 @@ public void setReactLogoPosition(ReadableMap position) { if (position == null) { // reset from explicit to default if (mLogoGravity != null) { - MapboxMapOptions defaultOptions = MapboxMapOptions.createFromAttributes(mContext); + MapLibreMapOptions defaultOptions = MapLibreMapOptions.createFromAttributes(mContext); mLogoGravity = defaultOptions.getLogoGravity(); mLogoMargins = Arrays.copyOf(defaultOptions.getLogoMargins(), 4); updateUISettings(); @@ -903,7 +903,7 @@ public void setReactAttributionPosition(ReadableMap position) { if (position == null) { // reset from explicit to default if (mAttributionGravity != null) { - MapboxMapOptions defaultOptions = MapboxMapOptions.createFromAttributes(mContext); + MapLibreMapOptions defaultOptions = MapLibreMapOptions.createFromAttributes(mContext); mAttributionGravity = defaultOptions.getAttributionGravity(); mAttributionMargin = Arrays.copyOf(defaultOptions.getAttributionMargins(), 4); updateUISettings(); @@ -1016,7 +1016,7 @@ public void takeSnap(final String callbackID, final boolean writeToDisk) { throw new Error("takeSnap should only be called after the map has rendered"); } - mMap.snapshot(new MapboxMap.SnapshotReadyCallback() { + mMap.snapshot(new MapLibreMap.SnapshotReadyCallback() { @Override public void onSnapshotReady(Bitmap snapshot) { WritableMap payload = new WritableNativeMap(); @@ -1496,7 +1496,7 @@ public ViewGroup offscreenAnnotationViewContainer() { return mOffscreenAnnotationViewContainer; } - public MarkerViewManager getMarkerViewManager(MapboxMap map) { + public MarkerViewManager getMarkerViewManager(MapLibreMap map) { if (markerViewManager == null) { if (map == null) { throw new Error("makerViewManager should be called one the map has loaded"); diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java index 015ad50c3..664c7812c 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java @@ -11,16 +11,16 @@ import com.facebook.react.uimanager.LayoutShadowNode; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.annotations.ReactProp; -import com.mapbox.mapboxsdk.geometry.LatLngBounds; -import com.mapbox.mapboxsdk.log.Logger; -import com.mapbox.mapboxsdk.maps.MapboxMap; +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 com.mapbox.geojson.FeatureCollection; -import com.mapbox.geojson.Point; +import org.maplibre.geojson.FeatureCollection; +import org.maplibre.geojson.Point; import java.util.ArrayList; import java.util.HashMap; @@ -247,7 +247,7 @@ public Map getCommandsMap() { @Override public void receiveCommand(RCTMLNMapView mapView, int commandID, @Nullable ReadableArray args) { // allows method calls to work with componentDidMount - MapboxMap mapboxMap = mapView.getMapboxMap(); + MapLibreMap mapboxMap = mapView.getMapboxMap(); if (mapboxMap == null) { mapView.enqueuePreRenderMapMethod(commandID, args); return; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java index 5c84894f0..f1e8d9361 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java @@ -5,7 +5,7 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; -import com.mapbox.mapboxsdk.maps.MapboxMap; +import org.maplibre.android.maps.MapLibreMap; import com.maplibre.rctmln.utils.DownloadMapImageTask; import com.maplibre.rctmln.utils.ImageEntry; @@ -21,9 +21,9 @@ public class RCTMLNStyle { private Context mContext; private ReadableMap mReactStyle; - private MapboxMap mMap; + private MapLibreMap mMap; - public RCTMLNStyle(@NonNull Context context, @NonNull ReadableMap reactStyle, @NonNull MapboxMap map) { + public RCTMLNStyle(@NonNull Context context, @NonNull ReadableMap reactStyle, @NonNull MapLibreMap map) { mContext = context; mReactStyle = reactStyle; mMap = map; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java index 9a38946e9..56118a255 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java @@ -3,20 +3,20 @@ package com.maplibre.rctmln.components.styles; -import com.mapbox.mapboxsdk.style.layers.BackgroundLayer; -import com.mapbox.mapboxsdk.style.layers.CircleLayer; -import com.mapbox.mapboxsdk.style.layers.FillExtrusionLayer; -import com.mapbox.mapboxsdk.style.layers.FillLayer; -import com.mapbox.mapboxsdk.style.layers.LineLayer; -import com.mapbox.mapboxsdk.style.layers.PropertyFactory; -import com.mapbox.mapboxsdk.style.layers.PropertyValue; -import com.mapbox.mapboxsdk.style.layers.RasterLayer; -import com.mapbox.mapboxsdk.style.layers.SymbolLayer; -import com.mapbox.mapboxsdk.style.layers.HeatmapLayer; -import com.mapbox.mapboxsdk.style.layers.HillshadeLayer; -import com.mapbox.mapboxsdk.style.layers.TransitionOptions; -import com.mapbox.mapboxsdk.style.light.Light; -import com.mapbox.mapboxsdk.style.light.Position; +import org.maplibre.android.style.layers.BackgroundLayer; +import org.maplibre.android.style.layers.CircleLayer; +import org.maplibre.android.style.layers.FillExtrusionLayer; +import org.maplibre.android.style.layers.FillLayer; +import org.maplibre.android.style.layers.LineLayer; +import org.maplibre.android.style.layers.PropertyFactory; +import org.maplibre.android.style.layers.PropertyValue; +import org.maplibre.android.style.layers.RasterLayer; +import org.maplibre.android.style.layers.SymbolLayer; +import org.maplibre.android.style.layers.HeatmapLayer; +import org.maplibre.android.style.layers.HillshadeLayer; +import org.maplibre.android.style.layers.TransitionOptions; +import org.maplibre.android.style.light.Light; +import org.maplibre.android.style.light.Position; import com.maplibre.rctmln.utils.DownloadMapImageTask; import java.util.List; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java index bd136c598..f01ebea9f 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java @@ -9,8 +9,8 @@ import com.facebook.react.bridge.ReadableMapKeySetIterator; import com.facebook.react.bridge.ReadableNativeArray; import com.facebook.react.bridge.ReadableType; -import com.mapbox.mapboxsdk.style.expressions.Expression.Stop; -import com.mapbox.mapboxsdk.style.layers.PropertyValue; +import org.maplibre.android.style.expressions.Expression.Stop; +import org.maplibre.android.style.layers.PropertyValue; import java.text.NumberFormat; import java.text.ParseException; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java index 4cffa39fc..853285290 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java @@ -8,8 +8,8 @@ import com.facebook.react.bridge.ReadableType; import com.facebook.react.bridge.WritableNativeMap; import com.google.gson.JsonArray; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.TransitionOptions; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java index b7d163a89..1a84c0c86 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java @@ -5,13 +5,13 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.common.logging.FLog; -import com.mapbox.mapboxsdk.location.LocationComponentConstants; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.Layer; -import com.mapbox.mapboxsdk.style.layers.Property; -import com.mapbox.mapboxsdk.style.layers.PropertyFactory; +import org.maplibre.android.location.LocationComponentConstants; +import org.maplibre.android.maps.MapLibreMap; +import org.maplibre.android.maps.Style; +import org.maplibre.android.style.expressions.Expression; +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; @@ -39,7 +39,7 @@ public abstract class RCTLayer extends AbstractMapFeature { protected ReadableMap mReactStyle; protected Expression mFilter; - protected MapboxMap mMap; + protected MapLibreMap mMap; protected T mLayer; protected Context mContext; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java index 3d9ad2507..c8a3066c3 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java @@ -2,7 +2,7 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.layers.BackgroundLayer; +import org.maplibre.android.style.layers.BackgroundLayer; import com.maplibre.rctmln.components.styles.RCTMLNStyle; import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java index b0a3e41a5..88d34e178 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.CircleLayer; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java index 51e30b61c..45bad41d0 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.FillExtrusionLayer; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java index 8d43d5198..d9effc30a 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.FillLayer; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java index 5cec0aafa..ce8512af6 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.HeatmapLayer; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java index 4258a4086..4644a818e 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.LineLayer; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java index 234532fa1..8c9811351 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java @@ -2,7 +2,7 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.layers.RasterLayer; +import org.maplibre.android.style.layers.RasterLayer; import com.maplibre.rctmln.components.styles.RCTMLNStyle; import com.maplibre.rctmln.components.styles.RCTMLNStyleFactory; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java index 76307fe4b..cc2929e71 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.SymbolLayer; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java index 4d48ce6d0..ff41974df 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java @@ -3,11 +3,11 @@ import android.content.Context; import com.facebook.react.bridge.ReadableMap; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.style.layers.TransitionOptions; -import com.mapbox.mapboxsdk.style.light.Light; -import com.mapbox.mapboxsdk.style.light.Position; +import org.maplibre.android.maps.MapLibreMap; +import org.maplibre.android.maps.Style; +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; @@ -21,7 +21,7 @@ */ public class RCTMLNLight extends AbstractMapFeature { - private MapboxMap mMap; + private MapLibreMap mMap; private ReadableMap mReactStyle; public RCTMLNLight(Context context) { diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java index 721b2cbcc..60b05eeff 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java @@ -5,9 +5,9 @@ import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper; -import com.mapbox.geojson.Feature; -import com.mapbox.mapboxsdk.geometry.LatLngQuad; -import com.mapbox.mapboxsdk.style.sources.ImageSource; +import org.maplibre.geojson.Feature; +import org.maplibre.android.geometry.LatLngQuad; +import org.maplibre.android.style.sources.ImageSource; import java.net.MalformedURLException; import java.net.URL; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java index a7046d734..7a359487e 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java @@ -8,7 +8,7 @@ import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; import com.facebook.react.views.imagehelper.ImageSource; -import com.mapbox.mapboxsdk.geometry.LatLngQuad; +import org.maplibre.android.geometry.LatLngQuad; import com.maplibre.rctmln.utils.ConvertUtils; import com.maplibre.rctmln.utils.GeoJSONUtils; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java index b471398c3..18d66e3a5 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java @@ -2,10 +2,10 @@ import android.content.Context; -import com.mapbox.geojson.Feature; -import com.mapbox.mapboxsdk.style.sources.RasterSource; +import org.maplibre.geojson.Feature; +import org.maplibre.android.style.sources.RasterSource; -import static com.mapbox.mapboxsdk.style.sources.RasterSource.DEFAULT_TILE_SIZE; +import static org.maplibre.android.style.sources.RasterSource.DEFAULT_TILE_SIZE; /** * Created by nickitaliano on 9/25/17. diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java index 340e56b38..ebb0edf0f 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java @@ -10,14 +10,14 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.geojson.Feature; -import com.mapbox.geojson.FeatureCollection; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.sources.GeoJsonOptions; -import com.mapbox.mapboxsdk.style.sources.GeoJsonSource; -import com.mapbox.mapboxsdk.utils.BitmapUtils; +import org.maplibre.geojson.Feature; +import org.maplibre.geojson.FeatureCollection; +import org.maplibre.android.maps.MapLibreMap; +import org.maplibre.android.maps.Style; +import org.maplibre.android.style.expressions.Expression; +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; @@ -67,7 +67,7 @@ public void addToMap(final RCTMLNMapView mapView) { mapView.getMapboxMap().getStyle(new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { - MapboxMap map = mapView.getMapboxMap(); + MapLibreMap map = mapView.getMapboxMap(); RCTMLNShapeSource.super.addToMap(mapView); } }); diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java index 157e9b39b..bdba4df7c 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java @@ -18,7 +18,7 @@ import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.uimanager.annotations.ReactProp; -import com.mapbox.mapboxsdk.style.expressions.Expression; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java index bc870884e..3a512d8d5 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java @@ -2,8 +2,8 @@ import android.content.Context; -import com.mapbox.mapboxsdk.style.sources.Source; -import com.mapbox.mapboxsdk.style.sources.TileSet; +import org.maplibre.android.style.sources.Source; +import org.maplibre.android.style.sources.TileSet; import java.util.Collection; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java index 8604b3036..288dd2669 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java @@ -6,10 +6,10 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.geojson.Feature; -import com.mapbox.geojson.FeatureCollection; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.sources.VectorSource; +import org.maplibre.geojson.Feature; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java index b963bca22..501574633 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java @@ -8,12 +8,12 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.common.MapBuilder; -import com.mapbox.geojson.Feature; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.log.Logger; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; -import com.mapbox.mapboxsdk.style.sources.Source; +import org.maplibre.geojson.Feature; +import org.maplibre.android.geometry.LatLng; +import org.maplibre.android.log.Logger; +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; @@ -35,7 +35,7 @@ public abstract class RCTSource extends AbstractMapFeature { public static final double DEFAULT_HITBOX_HEIGHT = 44.0; protected RCTMLNMapView mMapView; - protected MapboxMap mMap; + protected MapLibreMap mMap; protected String mID; protected T mSource; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java b/android/rctmln/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java index e5e5e5cb2..f5a0d1265 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java @@ -6,8 +6,8 @@ import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; -import com.mapbox.geojson.Feature; -import com.mapbox.mapboxsdk.geometry.LatLng; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java b/android/rctmln/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java index 03da64af9..b8447fee6 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java @@ -6,7 +6,7 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.mapboxsdk.geometry.LatLng; +import org.maplibre.android.geometry.LatLng; import com.maplibre.rctmln.events.constants.EventKeys; import com.maplibre.rctmln.events.constants.EventTypes; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java b/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java index 101397c30..d4b5f7c36 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java @@ -6,8 +6,8 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.mapboxsdk.plugins.markerview.MarkerView; -import com.mapbox.mapboxsdk.geometry.LatLng; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java b/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java index b4f2f91b4..4bbcde463 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java @@ -6,8 +6,8 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.mapboxsdk.plugins.markerview.MarkerView; -import com.mapbox.mapboxsdk.geometry.LatLng; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/location/LocationManager.java b/android/rctmln/src/main/java/com/maplibre/rctmln/location/LocationManager.java index e442e3660..bc5c44420 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/location/LocationManager.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/location/LocationManager.java @@ -5,18 +5,18 @@ import android.os.Looper; import android.util.Log; -import com.mapbox.mapboxsdk.location.engine.LocationEngine; -import com.mapbox.mapboxsdk.location.engine.LocationEngineCallback; +import org.maplibre.android.location.engine.LocationEngine; +import org.maplibre.android.location.engine.LocationEngineCallback; /* import com.mapbox.android.core.location.LocationEngineListener; import com.mapbox.android.core.location.LocationEnginePriority; */ -import com.mapbox.mapboxsdk.location.engine.LocationEngineDefault; -import com.mapbox.mapboxsdk.location.engine.LocationEngineRequest; -import com.mapbox.mapboxsdk.location.engine.LocationEngineResult; -import com.mapbox.mapboxsdk.location.permissions.PermissionsManager; +import org.maplibre.android.location.engine.LocationEngineDefault; +import org.maplibre.android.location.engine.LocationEngineRequest; +import org.maplibre.android.location.engine.LocationEngineResult; +import org.maplibre.android.location.permissions.PermissionsManager; import java.lang.ref.WeakReference; import java.util.ArrayList; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserLocation.java b/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserLocation.java index bbe27b4c7..e4e415458 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserLocation.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserLocation.java @@ -2,7 +2,7 @@ import android.location.Location; -import com.mapbox.mapboxsdk.geometry.LatLng; +import org.maplibre.android.geometry.LatLng; /** * Created by nickitaliano on 12/13/17. diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java b/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java index 2bffbabb3..dd003f71d 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java @@ -1,11 +1,11 @@ package com.maplibre.rctmln.location; /* -import com.mapbox.mapboxsdk.plugins.locationlayer.modes.RenderMode; +import org.maplibre.android.plugins.locationlayer.modes.RenderMode; */ -import com.mapbox.mapboxsdk.location.modes.CameraMode; -import com.mapbox.mapboxsdk.location.modes.RenderMode; +import org.maplibre.android.location.modes.CameraMode; +import org.maplibre.android.location.modes.RenderMode; /** * Created by nickitaliano on 12/13/17. diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java index f508b5d96..1e47c4204 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java @@ -10,8 +10,8 @@ import com.facebook.react.bridge.ReactMethod; import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.modules.core.RCTNativeAppEventEmitter; -import com.mapbox.mapboxsdk.location.engine.LocationEngineCallback; -import com.mapbox.mapboxsdk.location.engine.LocationEngineResult; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java index 3adf3219f..7da5a3d2e 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java @@ -7,8 +7,8 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.modules.core.DeviceEventManagerModule; -import com.mapbox.mapboxsdk.log.Logger; -import com.mapbox.mapboxsdk.log.LoggerDefinition; +import org.maplibre.android.log.Logger; +import org.maplibre.android.log.LoggerDefinition; import android.util.Log; @ReactModule(name = RCTMLNLogging.REACT_CLASS) diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java index 84bd2c09f..7fd6a2aed 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java @@ -9,9 +9,9 @@ import com.facebook.react.bridge.ReactMethod; import com.facebook.react.common.MapBuilder; import com.facebook.react.module.annotations.ReactModule; -import com.mapbox.mapboxsdk.Mapbox; -import com.mapbox.mapboxsdk.WellKnownTileServer; -import com.mapbox.mapboxsdk.style.layers.Property; +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; @@ -23,7 +23,7 @@ import okhttp3.Dispatcher; import okhttp3.OkHttpClient; -import com.mapbox.mapboxsdk.module.http.HttpRequestUtil; +import org.maplibre.android.module.http.HttpRequestUtil; import java.util.HashMap; import java.util.Map; @@ -281,9 +281,9 @@ public void setAccessToken(final String accessToken) { @Override public void run() { if (accessToken == null) { - Mapbox.getInstance(getReactApplicationContext()); + MapLibre.getInstance(getReactApplicationContext()); } else { - Mapbox.getInstance(getReactApplicationContext(), accessToken, WellKnownTileServer.Mapbox); + MapLibre.getInstance(getReactApplicationContext(), accessToken, WellKnownTileServer.Mapbox); } } }); @@ -320,7 +320,7 @@ public void run() { // TODO: How to handle this? Underlying API has changed significantly on Android @ReactMethod public void getAccessToken(Promise promise) { - String token = Mapbox.getApiKey(); + String token = MapLibre.getApiKey(); if(token == null) { promise.reject("missing_access_token", "No access token has been set"); } else { @@ -333,7 +333,7 @@ public void setConnected(final boolean connected) { mReactContext.runOnUiQueueThread(new Runnable() { @Override public void run() { - Mapbox.setConnected(connected); + MapLibre.setConnected(connected); } }); } diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java index 2154ad91a..1e0604d07 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java @@ -8,22 +8,22 @@ import com.facebook.react.bridge.*; import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.modules.core.RCTNativeAppEventEmitter; -import com.mapbox.geojson.FeatureCollection; -// import com.mapbox.mapboxsdk.constants.Style; -import com.mapbox.mapboxsdk.geometry.LatLngBounds; -import com.mapbox.mapboxsdk.offline.OfflineManager; -import com.mapbox.mapboxsdk.offline.OfflineRegion; -import com.mapbox.mapboxsdk.offline.OfflineRegionDefinition; -import com.mapbox.mapboxsdk.offline.OfflineRegionError; -import com.mapbox.mapboxsdk.offline.OfflineRegionStatus; -import com.mapbox.mapboxsdk.offline.OfflineTilePyramidRegionDefinition; -import com.mapbox.mapboxsdk.storage.FileSource; +import org.maplibre.geojson.FeatureCollection; +// import org.maplibre.android.constants.Style; +import org.maplibre.android.geometry.LatLngBounds; +import org.maplibre.android.offline.OfflineManager; +import org.maplibre.android.offline.OfflineRegion; +import org.maplibre.android.offline.OfflineRegionDefinition; +import org.maplibre.android.offline.OfflineRegionError; +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 com.mapbox.mapboxsdk.maps.Style; +import org.maplibre.android.maps.Style; import org.json.JSONException; import org.json.JSONObject; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java index 70fa286a7..22e774a43 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java @@ -16,13 +16,13 @@ import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.module.annotations.ReactModule; -import com.mapbox.geojson.Feature; -import com.mapbox.geojson.FeatureCollection; -import com.mapbox.geojson.Point; -import com.mapbox.mapboxsdk.camera.CameraPosition; -import com.mapbox.mapboxsdk.snapshotter.MapSnapshot; -import com.mapbox.mapboxsdk.snapshotter.MapSnapshotter; -import com.mapbox.mapboxsdk.storage.FileSource; +import org.maplibre.geojson.Feature; +import org.maplibre.geojson.FeatureCollection; +import org.maplibre.geojson.Point; +import org.maplibre.android.camera.CameraPosition; +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; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java index a94360d70..ef285776d 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java @@ -1,6 +1,6 @@ package com.maplibre.rctmln.utils; -import com.mapbox.mapboxsdk.style.expressions.Expression; +import org.maplibre.android.style.expressions.Expression; public class ClusterPropertyEntry { public Expression operator; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java index 507935ed8..ea454b239 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java @@ -20,8 +20,8 @@ import com.facebook.imagepipeline.request.ImageRequest; import com.facebook.imagepipeline.request.ImageRequestBuilder; import com.facebook.react.views.imagehelper.ImageSource; -import com.mapbox.mapboxsdk.maps.MapboxMap; -import com.mapbox.mapboxsdk.maps.Style; +import org.maplibre.android.maps.MapLibreMap; +import org.maplibre.android.maps.Style; import java.io.File; import java.lang.ref.WeakReference; @@ -41,12 +41,12 @@ public class DownloadMapImageTask extends AsyncTask mContext; - private WeakReference mMap; + private WeakReference mMap; @Nullable private OnAllImagesLoaded mCallback; private final Object mCallerContext; - public DownloadMapImageTask(Context context, MapboxMap map, @Nullable OnAllImagesLoaded callback) { + public DownloadMapImageTask(Context context, MapLibreMap map, @Nullable OnAllImagesLoaded callback) { mContext = new WeakReference<>(context.getApplicationContext()); mMap = new WeakReference<>(map); mCallback = callback; @@ -130,7 +130,7 @@ protected final List> doInBackground(Map.Entry> images) { - MapboxMap map = mMap.get(); + MapLibreMap map = mMap.get(); if (map != null && images != null && images.size() > 0) { Style style = map.getStyle(); if (style != null) { diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java index d15c5c5ce..27b5b5ee7 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java @@ -4,8 +4,8 @@ import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.google.gson.JsonArray; -import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.expressions.Expression.Converter; +import org.maplibre.android.style.expressions.Expression; +import org.maplibre.android.style.expressions.Expression.Converter; import org.json.JSONArray; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java index d113513dd..5c206f961 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java @@ -6,19 +6,19 @@ import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeArray; import com.facebook.react.bridge.WritableNativeMap; -import com.mapbox.geojson.Feature; -import com.mapbox.geojson.FeatureCollection; -import com.mapbox.geojson.Geometry; -import com.mapbox.geojson.GeometryCollection; -import com.mapbox.geojson.LineString; -import com.mapbox.geojson.MultiPoint; -import com.mapbox.geojson.Point; -import com.mapbox.geojson.Polygon; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.geometry.LatLngBounds; -import com.mapbox.mapboxsdk.geometry.LatLngQuad; -import com.mapbox.mapboxsdk.style.light.Position; -import com.mapbox.turf.TurfMeasurement; +import org.maplibre.geojson.Feature; +import org.maplibre.geojson.FeatureCollection; +import org.maplibre.geojson.Geometry; +import org.maplibre.geojson.GeometryCollection; +import org.maplibre.geojson.LineString; +import org.maplibre.geojson.MultiPoint; +import org.maplibre.geojson.Point; +import org.maplibre.geojson.Polygon; +import org.maplibre.android.geometry.LatLng; +import org.maplibre.android.geometry.LatLngBounds; +import org.maplibre.android.geometry.LatLngQuad; +import org.maplibre.android.style.light.Position; +import org.maplibre.turf.TurfMeasurement; import java.util.ArrayList; import java.util.List; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java index df4c6b592..9463340e1 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java @@ -2,9 +2,9 @@ import android.graphics.PointF; -import com.mapbox.mapboxsdk.geometry.LatLng; -import com.mapbox.mapboxsdk.geometry.LatLngBounds; -import com.mapbox.mapboxsdk.geometry.VisibleRegion; +import org.maplibre.android.geometry.LatLng; +import org.maplibre.android.geometry.LatLngBounds; +import org.maplibre.android.geometry.VisibleRegion; /** * Created by nickitaliano on 1/5/18. diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java index 6fabb91b4..805e3ba10 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java @@ -1,6 +1,6 @@ package com.maplibre.rctmln.utils; -import com.mapbox.mapboxsdk.maps.MapboxMap; +import org.maplibre.android.maps.MapLibreMap; import com.maplibre.rctmln.components.AbstractEventEmitter; import com.maplibre.rctmln.events.IEvent; @@ -9,7 +9,7 @@ * Created by nickitaliano on 8/31/17. */ -public class SimpleEventCallback implements MapboxMap.CancelableCallback { +public class SimpleEventCallback implements MapLibreMap.CancelableCallback { private AbstractEventEmitter mEventEmitter; private IEvent mEvent; diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java index 0eee5ff3d..5cc931fd3 100644 --- a/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java +++ b/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java @@ -3,7 +3,7 @@ import android.graphics.Point; import android.graphics.PointF; -import com.mapbox.mapboxsdk.geometry.LatLng; +import org.maplibre.android.geometry.LatLng; import java.util.ArrayList; import java.util.HashMap; diff --git a/example/android/build.gradle b/example/android/build.gradle index 243858d9b..36af08965 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -4,7 +4,7 @@ buildscript { ext { buildToolsVersion = "33.0.1" minSdkVersion = 21 - compileSdkVersion = 33 + compileSdkVersion = 34 targetSdkVersion = 33 // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" diff --git a/scripts/templates/RCTMLNStyleFactory.java.ejs b/scripts/templates/RCTMLNStyleFactory.java.ejs index 84977407f..4b16efca5 100644 --- a/scripts/templates/RCTMLNStyleFactory.java.ejs +++ b/scripts/templates/RCTMLNStyleFactory.java.ejs @@ -6,20 +6,20 @@ package com.maplibre.rctmln.components.styles; -import com.mapbox.mapboxsdk.style.layers.BackgroundLayer; -import com.mapbox.mapboxsdk.style.layers.CircleLayer; -import com.mapbox.mapboxsdk.style.layers.FillExtrusionLayer; -import com.mapbox.mapboxsdk.style.layers.FillLayer; -import com.mapbox.mapboxsdk.style.layers.LineLayer; -import com.mapbox.mapboxsdk.style.layers.PropertyFactory; -import com.mapbox.mapboxsdk.style.layers.PropertyValue; -import com.mapbox.mapboxsdk.style.layers.RasterLayer; -import com.mapbox.mapboxsdk.style.layers.SymbolLayer; -import com.mapbox.mapboxsdk.style.layers.HeatmapLayer; -import com.mapbox.mapboxsdk.style.layers.HillshadeLayer; -import com.mapbox.mapboxsdk.style.layers.TransitionOptions; -import com.mapbox.mapboxsdk.style.light.Light; -import com.mapbox.mapboxsdk.style.light.Position; +import org.maplibre.android.style.layers.BackgroundLayer; +import org.maplibre.android.style.layers.CircleLayer; +import org.maplibre.android.style.layers.FillExtrusionLayer; +import org.maplibre.android.style.layers.FillLayer; +import org.maplibre.android.style.layers.LineLayer; +import org.maplibre.android.style.layers.PropertyFactory; +import org.maplibre.android.style.layers.PropertyValue; +import org.maplibre.android.style.layers.RasterLayer; +import org.maplibre.android.style.layers.SymbolLayer; +import org.maplibre.android.style.layers.HeatmapLayer; +import org.maplibre.android.style.layers.HillshadeLayer; +import org.maplibre.android.style.layers.TransitionOptions; +import org.maplibre.android.style.light.Light; +import org.maplibre.android.style.light.Position; import com.maplibre.rctmln.utils.DownloadMapImageTask; import java.util.List;