[android] - cleanup old style java constants file, migrate style transition to Style.java
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
package com.mapbox.mapboxsdk.constants;
|
||||
|
||||
import android.support.annotation.StringDef;
|
||||
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Style provides URLs to several professional styles designed by Mapbox.
|
||||
* </p>
|
||||
* These styles are all ready to go in your app. To load one, pass it into {@link MapView#setStyleUrl(String)}
|
||||
*
|
||||
* @see MapView#setStyleUrl(String)
|
||||
*/
|
||||
public class Style {
|
||||
|
||||
/**
|
||||
* Indicates the parameter accepts one of the values from Style. Using one of these
|
||||
* constants means your map style will always use the latest version and may change as we
|
||||
* improve the style
|
||||
*/
|
||||
@StringDef( {MAPBOX_STREETS, OUTDOORS, LIGHT, DARK, SATELLITE, SATELLITE_STREETS, TRAFFIC_DAY, TRAFFIC_NIGHT})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface StyleUrl {
|
||||
}
|
||||
|
||||
// IMPORTANT: If you change any of these you also need to edit them in strings.xml
|
||||
|
||||
/**
|
||||
* Mapbox Streets: A complete basemap, perfect for incorporating your own data. Using this
|
||||
* constant means your map style will always use the latest version and may change as we
|
||||
* improve the style.
|
||||
*/
|
||||
public static final String MAPBOX_STREETS = "mapbox://styles/mapbox/streets-v10";
|
||||
|
||||
/**
|
||||
* Outdoors: A general-purpose style tailored to outdoor activities. Using this constant means
|
||||
* your map style will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String OUTDOORS = "mapbox://styles/mapbox/outdoors-v10";
|
||||
|
||||
/**
|
||||
* Light: Subtle light backdrop for data visualizations. Using this constant means your map
|
||||
* style will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String LIGHT = "mapbox://styles/mapbox/light-v9";
|
||||
|
||||
/**
|
||||
* Dark: Subtle dark backdrop for data visualizations. Using this constant means your map style
|
||||
* will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String DARK = "mapbox://styles/mapbox/dark-v9";
|
||||
|
||||
/**
|
||||
* Satellite: A beautiful global satellite and aerial imagery layer. Using this constant means
|
||||
* your map style will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String SATELLITE = "mapbox://styles/mapbox/satellite-v9";
|
||||
|
||||
/**
|
||||
* Satellite Streets: Global satellite and aerial imagery with unobtrusive labels. Using this
|
||||
* constant means your map style will always use the latest version and may change as we
|
||||
* improve the style.
|
||||
*/
|
||||
public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-streets-v10";
|
||||
|
||||
/**
|
||||
* Traffic Day: Color-coded roads based on live traffic congestion data. Traffic data is currently
|
||||
* available in
|
||||
* <a href="https://www.mapbox.com/api-documentation/pages/traffic-countries.html">these select
|
||||
* countries</a>. Using this constant means your map style will always use the latest version and
|
||||
* may change as we improve the style.
|
||||
*/
|
||||
public static final String TRAFFIC_DAY = "mapbox://styles/mapbox/traffic-day-v2";
|
||||
|
||||
/**
|
||||
* Traffic Night: Color-coded roads based on live traffic congestion data, designed to maximize
|
||||
* legibility in low-light situations. Traffic data is currently available in
|
||||
* <a href="https://www.mapbox.com/api-documentation/pages/traffic-countries.html">these select
|
||||
* countries</a>. Using this constant means your map style will always use the latest version and
|
||||
* may change as we improve the style.
|
||||
*/
|
||||
public static final String TRAFFIC_NIGHT = "mapbox://styles/mapbox/traffic-night-v2";
|
||||
}
|
||||
@@ -28,7 +28,7 @@ import com.mapbox.mapboxsdk.annotations.Annotation;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.MapboxConstants;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.location.LocationComponent;
|
||||
import com.mapbox.mapboxsdk.maps.renderer.MapRenderer;
|
||||
import com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer;
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdate;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.MapboxConstants;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
import com.mapbox.mapboxsdk.location.LocationComponent;
|
||||
@@ -76,13 +76,13 @@ public final class MapboxMap {
|
||||
@Nullable
|
||||
private MapboxMap.OnFpsChangedListener onFpsChangedListener;
|
||||
|
||||
private com.mapbox.mapboxsdk.maps.Style style;
|
||||
private Style style;
|
||||
|
||||
MapboxMap(NativeMapView map, Transform transform, UiSettings ui, Projection projection,
|
||||
OnGesturesManagerInteractionListener listener, AnnotationManager annotations,
|
||||
CameraChangeDispatcher cameraChangeDispatcher, MapChangeReceiver mapChangeReceiver) {
|
||||
this.nativeMapView = map;
|
||||
this.style = new com.mapbox.mapboxsdk.maps.Style(nativeMapView);
|
||||
this.style = new Style(nativeMapView);
|
||||
this.uiSettings = ui;
|
||||
this.projection = projection;
|
||||
this.annotationManager = annotations.bind(this);
|
||||
@@ -104,7 +104,7 @@ public final class MapboxMap {
|
||||
setPrefetchesTiles(options);
|
||||
}
|
||||
|
||||
public com.mapbox.mapboxsdk.maps.Style getStyle(){
|
||||
public Style getStyle(){
|
||||
return style;
|
||||
}
|
||||
|
||||
@@ -212,48 +212,6 @@ public final class MapboxMap {
|
||||
|
||||
// Style
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Get the animation duration for style changes.
|
||||
* </p>
|
||||
* The default value is zero, so any changes take effect without animation.
|
||||
*
|
||||
* @return Duration in milliseconds
|
||||
*/
|
||||
public long getTransitionDuration() {
|
||||
return nativeMapView.getTransitionDuration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the animation duration for style changes.
|
||||
*
|
||||
* @param durationMs Duration in milliseconds
|
||||
*/
|
||||
public void setTransitionDuration(long durationMs) {
|
||||
nativeMapView.setTransitionDuration(durationMs);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Get the animation delay for style changes.
|
||||
* </p>
|
||||
* The default value is zero, so any changes begin to animate immediately.
|
||||
*
|
||||
* @return Delay in milliseconds
|
||||
*/
|
||||
public long getTransitionDelay() {
|
||||
return nativeMapView.getTransitionDelay();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the animation delay for style changes.
|
||||
*
|
||||
* @param delayMs Delay in milliseconds
|
||||
*/
|
||||
public void setTransitionDelay(long delayMs) {
|
||||
nativeMapView.setTransitionDelay(delayMs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tile pre-fetching from MapboxOptions.
|
||||
*
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.mapbox.mapboxsdk.maps;
|
||||
|
||||
import android.support.annotation.StringDef;
|
||||
import com.mapbox.mapboxsdk.style.layers.Layer;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
import com.mapbox.mapboxsdk.style.sources.Source;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Style {
|
||||
@@ -15,7 +19,7 @@ public class Style {
|
||||
this.nativeMapView = nativeMapView;
|
||||
}
|
||||
|
||||
public void loadStyle(@com.mapbox.mapboxsdk.constants.Style.StyleUrl String styleUrl) {
|
||||
public void loadStyle(@StyleUrl String styleUrl) {
|
||||
for (Source source : sources.values()) {
|
||||
if (source != null) {
|
||||
source.setDetached();
|
||||
@@ -67,5 +71,105 @@ public class Style {
|
||||
return layer;
|
||||
}
|
||||
|
||||
//
|
||||
// Transition
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Set the transition duration for style changes.
|
||||
* </p>
|
||||
* The default value for delay and duration is zero, so any changes take effect without animation.
|
||||
*
|
||||
* @param transitionOptions the transition options
|
||||
*/
|
||||
public void setTransition(TransitionOptions transitionOptions) {
|
||||
nativeMapView.setTransitionDuration(transitionOptions.getDuration());
|
||||
nativeMapView.setTransitionDelay(transitionOptions.getDelay());
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Get the transition for style changes.
|
||||
* </p>
|
||||
* The default value for delay and transition is zero, so any changes take effect without animation.
|
||||
*
|
||||
* @return TransitionOptions the transition options
|
||||
*/
|
||||
public TransitionOptions getTransition() {
|
||||
return new TransitionOptions(nativeMapView.getTransitionDuration(), nativeMapView.getTransitionDelay());
|
||||
}
|
||||
|
||||
//
|
||||
// Style constants
|
||||
//
|
||||
|
||||
/**
|
||||
* Indicates the parameter accepts one of the values from Style. Using one of these
|
||||
* constants means your map style will always use the latest version and may change as we
|
||||
* improve the style
|
||||
*/
|
||||
@StringDef( {MAPBOX_STREETS, OUTDOORS, LIGHT, DARK, SATELLITE, SATELLITE_STREETS, TRAFFIC_DAY, TRAFFIC_NIGHT})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface StyleUrl {
|
||||
}
|
||||
|
||||
// IMPORTANT: If you change any of these you also need to edit them in strings.xml
|
||||
|
||||
/**
|
||||
* Mapbox Streets: A complete basemap, perfect for incorporating your own data. Using this
|
||||
* constant means your map style will always use the latest version and may change as we
|
||||
* improve the style.
|
||||
*/
|
||||
public static final String MAPBOX_STREETS = "mapbox://styles/mapbox/streets-v10";
|
||||
|
||||
/**
|
||||
* Outdoors: A general-purpose style tailored to outdoor activities. Using this constant means
|
||||
* your map style will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String OUTDOORS = "mapbox://styles/mapbox/outdoors-v10";
|
||||
|
||||
/**
|
||||
* Light: Subtle light backdrop for data visualizations. Using this constant means your map
|
||||
* style will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String LIGHT = "mapbox://styles/mapbox/light-v9";
|
||||
|
||||
/**
|
||||
* Dark: Subtle dark backdrop for data visualizations. Using this constant means your map style
|
||||
* will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String DARK = "mapbox://styles/mapbox/dark-v9";
|
||||
|
||||
/**
|
||||
* Satellite: A beautiful global satellite and aerial imagery layer. Using this constant means
|
||||
* your map style will always use the latest version and may change as we improve the style.
|
||||
*/
|
||||
public static final String SATELLITE = "mapbox://styles/mapbox/satellite-v9";
|
||||
|
||||
/**
|
||||
* Satellite Streets: Global satellite and aerial imagery with unobtrusive labels. Using this
|
||||
* constant means your map style will always use the latest version and may change as we
|
||||
* improve the style.
|
||||
*/
|
||||
public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-streets-v10";
|
||||
|
||||
/**
|
||||
* Traffic Day: Color-coded roads based on live traffic congestion data. Traffic data is currently
|
||||
* available in
|
||||
* <a href="https://www.mapbox.com/api-documentation/pages/traffic-countries.html">these select
|
||||
* countries</a>. Using this constant means your map style will always use the latest version and
|
||||
* may change as we improve the style.
|
||||
*/
|
||||
public static final String TRAFFIC_DAY = "mapbox://styles/mapbox/traffic-day-v2";
|
||||
|
||||
/**
|
||||
* Traffic Night: Color-coded roads based on live traffic congestion data, designed to maximize
|
||||
* legibility in low-light situations. Traffic data is currently available in
|
||||
* <a href="https://www.mapbox.com/api-documentation/pages/traffic-countries.html">these select
|
||||
* countries</a>. Using this constant means your map style will always use the latest version and
|
||||
* may change as we improve the style.
|
||||
*/
|
||||
public static final String TRAFFIC_NIGHT = "mapbox://styles/mapbox/traffic-night-v2";
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.mapbox.mapboxsdk.attribution.AttributionLayout;
|
||||
import com.mapbox.mapboxsdk.attribution.AttributionMeasure;
|
||||
import com.mapbox.mapboxsdk.attribution.AttributionParser;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
import com.mapbox.mapboxsdk.log.Logger;
|
||||
import com.mapbox.mapboxsdk.maps.TelemetryDefinition;
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.view.Gravity;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.MapboxConstants;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -16,7 +16,7 @@ import android.support.test.runner.AndroidJUnit4
|
||||
import android.support.v4.content.ContextCompat
|
||||
import com.mapbox.geojson.Point
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory
|
||||
import com.mapbox.mapboxsdk.constants.Style
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng
|
||||
import com.mapbox.mapboxsdk.location.LocationComponentConstants.*
|
||||
import com.mapbox.mapboxsdk.location.modes.CameraMode
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.support.test.rule.GrantPermissionRule
|
||||
import android.support.test.rule.GrantPermissionRule.grant
|
||||
import android.support.test.runner.AndroidJUnit4
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory
|
||||
import com.mapbox.mapboxsdk.constants.Style
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng
|
||||
import com.mapbox.mapboxsdk.location.LocationComponentConstants.*
|
||||
import com.mapbox.mapboxsdk.location.modes.RenderMode
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.support.test.espresso.UiController
|
||||
import com.mapbox.geojson.Feature
|
||||
import com.mapbox.geojson.FeatureCollection
|
||||
import com.mapbox.geojson.Point
|
||||
import com.mapbox.mapboxsdk.constants.Style
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap
|
||||
import com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconImage
|
||||
import com.mapbox.mapboxsdk.style.layers.SymbolLayer
|
||||
|
||||
@@ -11,7 +11,7 @@ import android.widget.Toast;
|
||||
import com.mapbox.mapboxsdk.annotations.Polygon;
|
||||
import com.mapbox.mapboxsdk.annotations.PolygonOptions;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.UiSettings;
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapFragment;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapFragment;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
|
||||
import com.mapbox.mapboxsdk.maps.SupportMapFragment;
|
||||
|
||||
@@ -10,7 +10,7 @@ import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
|
||||
@@ -12,12 +12,9 @@ import android.view.MenuItem;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mapbox.android.core.location.LocationEngineRequest;
|
||||
import com.mapbox.android.core.permissions.PermissionsListener;
|
||||
import com.mapbox.android.core.permissions.PermissionsManager;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.location.LocationComponent;
|
||||
import com.mapbox.mapboxsdk.location.LocationComponentOptions;
|
||||
import com.mapbox.mapboxsdk.location.OnCameraTrackingChangedListener;
|
||||
@@ -27,6 +24,7 @@ import com.mapbox.mapboxsdk.location.modes.RenderMode;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.testapp.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mapbox.mapboxsdk.testapp.activity.location;
|
||||
|
||||
import android.location.Location;
|
||||
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -17,7 +17,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
|
||||
@@ -16,7 +16,7 @@ import android.widget.BaseAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
|
||||
@@ -13,7 +13,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.widget.Toast
|
||||
import com.mapbox.mapboxsdk.Mapbox
|
||||
import com.mapbox.mapboxsdk.constants.Style
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import com.mapbox.mapboxsdk.log.Logger
|
||||
import com.mapbox.mapboxsdk.offline.OfflineManager
|
||||
import com.mapbox.mapboxsdk.offline.OfflineRegion
|
||||
|
||||
@@ -11,7 +11,7 @@ import android.widget.Toast;
|
||||
import com.mapbox.mapboxsdk.Mapbox;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
@@ -7,7 +7,7 @@ import android.widget.GridLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
import com.mapbox.mapboxsdk.snapshotter.MapSnapshotter;
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.snapshotter.MapSnapshot;
|
||||
import com.mapbox.mapboxsdk.snapshotter.MapSnapshotter;
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
import com.mapbox.mapboxsdk.snapshotter.MapSnapshot;
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.support.v4.content.res.ResourcesCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
|
||||
@@ -93,8 +93,8 @@ public class RuntimeStyleActivity extends AppCompatActivity {
|
||||
// Center and Zoom (Amsterdam, zoomed to streets)
|
||||
mapboxMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(52.379189, 4.899431), 14));
|
||||
|
||||
mapboxMap.setTransitionDuration(250);
|
||||
mapboxMap.setTransitionDelay(50);
|
||||
// set custom transition
|
||||
mapboxMap.getStyle().setTransition(new TransitionOptions(250, 50));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
|
||||
Reference in New Issue
Block a user