diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-09-05 14:30:36 +0200 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-09-12 13:59:11 +0200 |
commit | 907612e93d8a2b156d4604fda348707ccb347836 (patch) | |
tree | 830bc854430f31e5f688d3d849fbb81599ea0ce0 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps | |
parent | cf7752c80c1dab6a818fb5093bee5cd964990525 (diff) | |
download | qtlocation-mapboxgl-907612e93d8a2b156d4604fda348707ccb347836.tar.gz |
[android] updated naming scheme and packages structure for LocationLayerPlugin, now called LocationComponent
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps')
2 files changed, 17 insertions, 17 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index 83a0ef0e62..60cf9bb31d 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -44,7 +44,7 @@ import com.mapbox.mapboxsdk.net.ConnectivityReceiver; import com.mapbox.mapboxsdk.offline.OfflineGeometryRegionDefinition; import com.mapbox.mapboxsdk.offline.OfflineRegionDefinition; import com.mapbox.mapboxsdk.offline.OfflineTilePyramidRegionDefinition; -import com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin; +import com.mapbox.mapboxsdk.location.LocationComponent; import com.mapbox.mapboxsdk.storage.FileSource; import com.mapbox.mapboxsdk.utils.BitmapUtils; @@ -199,8 +199,8 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { compassView.injectCompassAnimationListener(createCompassAnimationListener(cameraChangeDispatcher)); compassView.setOnClickListener(createCompassClickListener(cameraChangeDispatcher)); - // LocationLayerPlugin - mapboxMap.injectLocationLayerPlugin(new LocationLayerPlugin(context, mapboxMap)); + // LocationComponent + mapboxMap.injectLocationComponent(new LocationComponent(context, mapboxMap)); // inject widgets with MapboxMap attrView.setOnClickListener(new AttributionClickListener(context, mapboxMap)); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index 7dddcae993..688b90eb8e 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -43,7 +43,7 @@ import com.mapbox.mapboxsdk.constants.Style; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.geometry.LatLngBounds; import com.mapbox.mapboxsdk.log.Logger; -import com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin; +import com.mapbox.mapboxsdk.location.LocationComponent; import com.mapbox.mapboxsdk.style.expressions.Expression; import com.mapbox.mapboxsdk.style.layers.Layer; import com.mapbox.mapboxsdk.style.light.Light; @@ -76,7 +76,7 @@ public final class MapboxMap { private final OnGesturesManagerInteractionListener onGesturesManagerInteractionListener; - private LocationLayerPlugin locationLayerPlugin; + private LocationComponent locationComponent; private MapboxMap.OnFpsChangedListener onFpsChangedListener; MapboxMap(NativeMapView map, Transform transform, UiSettings ui, Projection projection, @@ -112,14 +112,14 @@ public final class MapboxMap { // if user hasn't loaded a Style yet nativeMapView.setStyleUrl(Style.MAPBOX_STREETS); } - locationLayerPlugin.onStart(); + locationComponent.onStart(); } /** * Called when the hosting Activity/Fragment onStop() method is called. */ void onStop() { - locationLayerPlugin.onStop(); + locationComponent.onStop(); } /** @@ -132,7 +132,7 @@ public final class MapboxMap { outState.putBoolean(MapboxConstants.STATE_DEBUG_ACTIVE, nativeMapView.getDebug()); outState.putString(MapboxConstants.STATE_STYLE_URL, nativeMapView.getStyleUrl()); uiSettings.onSaveInstanceState(outState); - locationLayerPlugin.onSaveInstanceState(outState); + locationComponent.onSaveInstanceState(outState); } /** @@ -157,14 +157,14 @@ public final class MapboxMap { if (!TextUtils.isEmpty(styleUrl)) { nativeMapView.setStyleUrl(savedInstanceState.getString(MapboxConstants.STATE_STYLE_URL)); } - locationLayerPlugin.onRestoreInstanceState(savedInstanceState); + locationComponent.onRestoreInstanceState(savedInstanceState); } /** * Called when the hosting Activity/Fragment onDestroy()/onDestroyView() method is called. */ void onDestroy() { - locationLayerPlugin.onDestroy(); + locationComponent.onDestroy(); } /** @@ -191,14 +191,14 @@ public final class MapboxMap { * Called when the map will start loading style. */ void onStartLoadingMap() { - locationLayerPlugin.onStartLoadingMap(); + locationComponent.onStartLoadingMap(); } /** * Called the map finished loading style. */ void onFinishLoadingStyle() { - locationLayerPlugin.onFinishLoadingStyle(); + locationComponent.onFinishLoadingStyle(); } /** @@ -2311,11 +2311,11 @@ public final class MapboxMap { } // - // LocationLayerPlugin + // LocationComponent // - void injectLocationLayerPlugin(LocationLayerPlugin locationLayerPlugin) { - this.locationLayerPlugin = locationLayerPlugin; + void injectLocationComponent(LocationComponent locationComponent) { + this.locationComponent = locationComponent; } /** @@ -2323,8 +2323,8 @@ public final class MapboxMap { * @return the location layer */ @NonNull - public LocationLayerPlugin getLocationLayerPlugin() { - return locationLayerPlugin; + public LocationComponent getLocationComponent() { + return locationComponent; } // |