diff --git a/CHANGELOG.md b/CHANGELOG.md index 24613f723..b2ce6d52d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ Mapbox welcomes participation and contributions from everyone. +## 7.3.0 + +* Multiple text field format +* Symbol listener +* Click to add image +* Symbol switch based on zoom level +* Rotating map camera +* Animated SymbolLayer icon + ## 7.2.0 diff --git a/MapboxAndroidDemo/build.gradle b/MapboxAndroidDemo/build.gradle index 03d11643a..2f3db239a 100644 --- a/MapboxAndroidDemo/build.gradle +++ b/MapboxAndroidDemo/build.gradle @@ -119,6 +119,7 @@ dependencies { implementation dependenciesList.supportCustomTabs implementation dependenciesList.supportV4 implementation dependenciesList.supportConstraintLayout + implementation dependenciesList.supportAnimation // Mapbox dependencies chinaImplementation dependenciesList.mapboxChinaPlugin diff --git a/MapboxAndroidDemo/src/global/java/com/mapbox/mapboxandroiddemo/MainActivity.java b/MapboxAndroidDemo/src/global/java/com/mapbox/mapboxandroiddemo/MainActivity.java index cdfb9612d..6522453e1 100644 --- a/MapboxAndroidDemo/src/global/java/com/mapbox/mapboxandroiddemo/MainActivity.java +++ b/MapboxAndroidDemo/src/global/java/com/mapbox/mapboxandroiddemo/MainActivity.java @@ -37,6 +37,7 @@ import com.mapbox.mapboxandroiddemo.examples.camera.AnimateMapCameraActivity; import com.mapbox.mapboxandroiddemo.examples.camera.BoundingBoxCameraActivity; import com.mapbox.mapboxandroiddemo.examples.camera.RestrictCameraActivity; +import com.mapbox.mapboxandroiddemo.examples.camera.SlowlyRotatingCameraActivity; import com.mapbox.mapboxandroiddemo.examples.dds.AddRainFallStyleActivity; import com.mapbox.mapboxandroiddemo.examples.dds.BathymetryActivity; import com.mapbox.mapboxandroiddemo.examples.dds.ChoroplethJsonVectorMixActivity; @@ -57,6 +58,7 @@ import com.mapbox.mapboxandroiddemo.examples.dds.SatelliteLandSelectActivity; import com.mapbox.mapboxandroiddemo.examples.dds.StyleCirclesCategoricallyActivity; import com.mapbox.mapboxandroiddemo.examples.dds.StyleLineIdentityPropertyActivity; +import com.mapbox.mapboxandroiddemo.examples.dds.SymbolSwitchOnZoomActivity; import com.mapbox.mapboxandroiddemo.examples.extrusions.AdjustExtrusionLightActivity; import com.mapbox.mapboxandroiddemo.examples.extrusions.Indoor3DMapActivity; import com.mapbox.mapboxandroiddemo.examples.extrusions.MarathonExtrusionActivity; @@ -83,6 +85,7 @@ import com.mapbox.mapboxandroiddemo.examples.labs.MarkerFollowingRouteActivity; import com.mapbox.mapboxandroiddemo.examples.labs.MovingIconWithTrailingLineActivity; import com.mapbox.mapboxandroiddemo.examples.labs.PictureInPictureActivity; +import com.mapbox.mapboxandroiddemo.examples.labs.ValueAnimatorIconAnimationActivity; import com.mapbox.mapboxandroiddemo.examples.labs.PulsingLayerOpacityColorActivity; import com.mapbox.mapboxandroiddemo.examples.labs.RecyclerViewOnMapActivity; import com.mapbox.mapboxandroiddemo.examples.labs.SnakingDirectionsRouteActivity; @@ -557,6 +560,14 @@ private void initializeModels() { null, R.string.activity_style_image_source_url, false, BuildConfig.MIN_SDK_VERSION )); + exampleItemModels.add(new ExampleItemModel( + R.id.nav_styles, + R.string.activity_styles_click_to_add_image_title, + R.string.activity_styles_click_to_add_image_description, + new Intent(MainActivity.this, ClickToAddImageActivity.class), + null, + R.string.activity_styles_click_to_add_image_url, false, BuildConfig.MIN_SDK_VERSION + )); exampleItemModels.add(new ExampleItemModel( R.id.nav_styles, R.string.activity_style_image_source_time_lapse_title, @@ -759,6 +770,14 @@ private void initializeModels() { null, R.string.activity_camera_restrict_url, false, BuildConfig.MIN_SDK_VERSION)); + exampleItemModels.add(new ExampleItemModel( + R.id.nav_camera, + R.string.activity_camera_slowly_rotating_title, + R.string.activity_camera_slowly_rotating_description, + new Intent(MainActivity.this, SlowlyRotatingCameraActivity.class), + null, + R.string.activity_camera_slowly_rotating_url, false, BuildConfig.MIN_SDK_VERSION)); + exampleItemModels.add(new ExampleItemModel( R.id.nav_offline, R.string.activity_offline_simple_title, @@ -1060,6 +1079,15 @@ private void initializeModels() { null, R.string.activity_lab_moving_icon_with_trailing_line_url, true, BuildConfig.MIN_SDK_VERSION)); + exampleItemModels.add(new ExampleItemModel( + R.id.nav_lab, + R.string.activity_lab_animated_interpolator_icon_drop_title, + R.string.activity_lab_animated_interpolator_icon_drop_description, + new Intent(MainActivity.this, ValueAnimatorIconAnimationActivity.class), + null, + R.string.activity_lab_animated_interpolator_icon_drop_url, false, BuildConfig.MIN_SDK_VERSION + )); + exampleItemModels.add(new ExampleItemModel( R.id.nav_dds, R.string.activity_dds_geojson_line_title, @@ -1215,6 +1243,14 @@ private void initializeModels() { null, R.string.activity_dds_satellite_land_select_url, true, BuildConfig.MIN_SDK_VERSION)); + exampleItemModels.add(new ExampleItemModel( + R.id.nav_dds, + R.string.activity_dds_symbol_zoom_switch_title, + R.string.activity_dds_symbol_zoom_switch_description, + new Intent(MainActivity.this, SymbolSwitchOnZoomActivity.class), + null, + R.string.activity_dds_symbol_zoom_switch_url, true, BuildConfig.MIN_SDK_VERSION)); + exampleItemModels.add(new ExampleItemModel( R.id.nav_basics, R.string.activity_basic_simple_mapview_title, diff --git a/MapboxAndroidDemo/src/global/play/en-US/whatsnew b/MapboxAndroidDemo/src/global/play/en-US/whatsnew index 217389719..79a1ed763 100644 --- a/MapboxAndroidDemo/src/global/play/en-US/whatsnew +++ b/MapboxAndroidDemo/src/global/play/en-US/whatsnew @@ -1 +1,8 @@ -This update is in line with the 7.2.0 release of the Mapbox Maps SDK for Android and includes several improvements. \ No newline at end of file +This update is in line with the 7.3.0 release of the Mapbox Maps SDK for Android and includes several improvements and new examples: + +•Multiple text field format +•Symbol listener +•Click to add image +•Symbol switch based on zoom level +•Rotating map camera +•Animated SymbolLayer icon diff --git a/MapboxAndroidDemo/src/main/AndroidManifest.xml b/MapboxAndroidDemo/src/main/AndroidManifest.xml index 1bd49697f..5ee2b3d30 100644 --- a/MapboxAndroidDemo/src/main/AndroidManifest.xml +++ b/MapboxAndroidDemo/src/main/AndroidManifest.xml @@ -635,6 +635,13 @@ android:name="android.support.PARENT_ACTIVITY" android:value="com.mapbox.mapboxandroiddemo.MainActivity" /> + + + @@ -642,6 +649,13 @@ android:name="android.support.PARENT_ACTIVITY" android:value="com.mapbox.mapboxandroiddemo.MainActivity" /> + + + @@ -738,6 +752,15 @@ + + + + * More info about https://developer.android.com/reference/android/view/animation/Interpolator + */ +public class ValueAnimatorIconAnimationActivity extends AppCompatActivity implements + OnMapReadyCallback, MapView.OnDidFinishRenderingMapListener { + + private static final String ICON_ID = "red-pin-icon-id"; + + // This float's actual value will depend on the height of the SymbolLayer icon + private static final float DEFAULT_DESIRED_ICON_OFFSET = -16; + private static final float STARTING_DROP_HEIGHT = -100; + private static final long DROP_SPEED_MILLISECONDS = 1200; + private static final String SYMBOL_LAYER_ID = "symbol-layer-id"; + private MapView mapView; + private SymbolLayer pinSymbolLayer; + private Style style; + private TimeInterpolator currentSelectedTimeInterpolator = new BounceInterpolator(); + private ValueAnimator animator; + private boolean firstRunThrough = true; + private boolean animationHasStarted; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Mapbox access token is configured here. This needs to be called either in your application + // object or in the same activity which contains the mapview. + Mapbox.getInstance(this, getString(R.string.access_token)); + + // This contains the MapView in XML and needs to be called after the access token is configured. + setContentView(R.layout.activity_animated_pin_drop); + + // Initialize the map view + mapView = findViewById(R.id.mapView); + mapView.onCreate(savedInstanceState); + mapView.getMapAsync(this); + } + + @Override + public void onMapReady(@NonNull final MapboxMap mapboxMap) { + mapboxMap.setStyle(new Style.Builder().fromUrl(Style.LIGHT) + // Add GeoJsonSource with random Features to the map. + .withSource(new GeoJsonSource("source-id", + FeatureCollection.fromFeatures(new Feature[] { + Feature.fromGeometry(Point.fromLngLat( + 119.86083984375, + -1.834403324493515)), + Feature.fromGeometry(Point.fromLngLat( + 116.06637239456177, + 5.970619502704659)), + Feature.fromGeometry(Point.fromLngLat( + 114.58740234375, + 4.54357027937176)), + Feature.fromGeometry(Point.fromLngLat( + 118.19091796875, + 5.134714634014467)), + Feature.fromGeometry(Point.fromLngLat( + 110.36865234374999, + 1.4500404973608074)), + Feature.fromGeometry(Point.fromLngLat( + 109.40185546874999, + 0.3076157096439005)), + Feature.fromGeometry(Point.fromLngLat( + 115.79589843749999, + 1.5159363834516861)), + Feature.fromGeometry(Point.fromLngLat( + 113.291015625, + -0.9667509997666298)), + Feature.fromGeometry(Point.fromLngLat( + 116.40083312988281, + -0.3392008994314591)) + }) + )) + .withImage(ICON_ID, BitmapUtils.getBitmapFromDrawable( + getResources().getDrawable(R.drawable.map_marker_push_pin_pink))), new Style.OnStyleLoaded() { + @Override + public void onStyleLoaded(@NonNull Style style) { + ValueAnimatorIconAnimationActivity.this.style = style; + mapView.addOnDidFinishRenderingMapListener(ValueAnimatorIconAnimationActivity.this); + } + } + ); + } + + /** + * Implementing this interface so that animation only starts once all tiles have been loaded + * + * @param fully whether or not the map is finished rendering + */ + @Override + public void onDidFinishRenderingMap(boolean fully) { + initAnimation(currentSelectedTimeInterpolator); + initInterpolatorButtons(); + } + + /** + * Initialize and start the animation. + * + * @param desiredTimeInterpolator the type of Android system movement to animate the + * SymbolLayer icons with. + */ + private void initAnimation(TimeInterpolator desiredTimeInterpolator) { + if (animator != null) { + animator.cancel(); + } + animator = ValueAnimator.ofFloat(STARTING_DROP_HEIGHT, 0); + animator.setDuration(DROP_SPEED_MILLISECONDS); + animator.setInterpolator(desiredTimeInterpolator); + animator.setStartDelay(1000); + animator.start(); + animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator valueAnimator) { + if (!animationHasStarted) { + initSymbolLayer(); + animationHasStarted = true; + } + pinSymbolLayer.setProperties(iconTranslate(new Float[] {0f, (Float) valueAnimator.getAnimatedValue()})); + } + }); + } + + /** + * Add the SymbolLayer to the map + */ + private void initSymbolLayer() { + pinSymbolLayer = new SymbolLayer(SYMBOL_LAYER_ID, + "source-id"); + pinSymbolLayer.setProperties( + iconImage(ICON_ID), + iconIgnorePlacement(true), + iconAllowOverlap(true), + iconOffset(new Float[] {0f, DEFAULT_DESIRED_ICON_OFFSET})); + style.addLayer(pinSymbolLayer); + } + + /** + * Initialize the interpolator selection spinner menu + */ + private void initInterpolatorButtons() { + + FloatingActionButton bounceInterpolatorFab = findViewById(R.id.fab_bounce_interpolator); + bounceInterpolatorFab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + if (firstRunThrough) { + firstRunThrough = true; + } + currentSelectedTimeInterpolator = new BounceInterpolator(); + resetIcons(); + } + }); + + FloatingActionButton linearInterpolatorFab = findViewById(R.id.fab_linear_interpolator); + linearInterpolatorFab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + currentSelectedTimeInterpolator = new LinearInterpolator(); + firstRunThrough = false; + resetIcons(); + } + }); + + FloatingActionButton accelerateInterpolatorFab = findViewById(R.id.fab_accelerate_interpolator); + accelerateInterpolatorFab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + currentSelectedTimeInterpolator = new AccelerateInterpolator(); + firstRunThrough = false; + resetIcons(); + } + }); + + FloatingActionButton decelerateInterpolatorFab = findViewById(R.id.fab_decelerate_interpolator); + decelerateInterpolatorFab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + currentSelectedTimeInterpolator = new DecelerateInterpolator(); + firstRunThrough = false; + resetIcons(); + } + }); + } + + private void resetIcons() { + if (!firstRunThrough) { + animationHasStarted = false; + style.removeLayer(SYMBOL_LAYER_ID); + initAnimation(currentSelectedTimeInterpolator); + } + } + + @Override + protected void onStart() { + super.onStart(); + mapView.onStart(); + } + + @Override + public void onResume() { + super.onResume(); + mapView.onResume(); + } + + @Override + public void onPause() { + super.onPause(); + mapView.onPause(); + } + + @Override + protected void onStop() { + super.onStop(); + if (animator != null) { + animator.end(); + } + mapView.onStop(); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + mapView.onSaveInstanceState(outState); + } + + @Override + public void onLowMemory() { + super.onLowMemory(); + mapView.onLowMemory(); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + mapView.onDestroy(); + } +} \ No newline at end of file diff --git a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/ClickToAddImageActivity.java b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/ClickToAddImageActivity.java index 5d6f636b7..310f1fa90 100644 --- a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/ClickToAddImageActivity.java +++ b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/ClickToAddImageActivity.java @@ -47,12 +47,12 @@ public class ClickToAddImageActivity extends AppCompatActivity implements private static final String ID_IMAGE_SOURCE = "source-id"; private static final String CIRCLE_SOURCE_ID = "circle-source-id"; private static final String ID_IMAGE_LAYER = "layer-id"; + private static int PHOTO_PICK_CODE = 4; private MapView mapView; private MapboxMap mapboxMap; private LatLngQuad quad; private List boundsFeatureList; private List boundsCirclePointList; - private static int PHOTO_PICK_CODE = 4; private int imageCountIndex; @Override @@ -99,7 +99,7 @@ public boolean onMapClick(@NonNull LatLng point) { boundsFeatureList.add(Feature.fromGeometry(Point.fromLngLat(point.getLongitude(), point.getLatitude()))); - // Add the click point to the circle layer and update the display of the circle layer data + // Add the click point to the CircleLayer and update the display of the CircleLayer data boundsCirclePointList.add(Point.fromLngLat(point.getLongitude(), point.getLatitude())); Style style = mapboxMap.getStyle(); @@ -130,7 +130,6 @@ public boolean onMapClick(@NonNull LatLng point) { pickPhotoIntent.setType("image/*"); startActivityForResult(pickPhotoIntent, PHOTO_PICK_CODE); } - return true; } @@ -172,7 +171,7 @@ public void onActivityResult(int requestCode, int resultCode, final Intent data) @Override public void onStyleLoaded(@NonNull Style style) { Uri selectedImage = data.getData(); - InputStream imageStream = null; + InputStream imageStream; try { imageStream = getContentResolver().openInputStream(selectedImage); diff --git a/MapboxAndroidDemo/src/main/res/drawable-anydpi/ic_keyboard_arrow_down.xml b/MapboxAndroidDemo/src/main/res/drawable-anydpi/ic_keyboard_arrow_down.xml new file mode 100644 index 000000000..ad33063c8 --- /dev/null +++ b/MapboxAndroidDemo/src/main/res/drawable-anydpi/ic_keyboard_arrow_down.xml @@ -0,0 +1,9 @@ + + + diff --git a/MapboxAndroidDemo/src/main/res/drawable-anydpi/ic_person.xml b/MapboxAndroidDemo/src/main/res/drawable-anydpi/ic_person.xml new file mode 100644 index 000000000..da856bb02 --- /dev/null +++ b/MapboxAndroidDemo/src/main/res/drawable-anydpi/ic_person.xml @@ -0,0 +1,9 @@ + + + diff --git a/MapboxAndroidDemo/src/main/res/drawable-hdpi/map_marker_push_pin_pink.png b/MapboxAndroidDemo/src/main/res/drawable-hdpi/map_marker_push_pin_pink.png new file mode 100644 index 000000000..2c609da19 Binary files /dev/null and b/MapboxAndroidDemo/src/main/res/drawable-hdpi/map_marker_push_pin_pink.png differ diff --git a/MapboxAndroidDemo/src/main/res/drawable-mdpi/map_marker_push_pin_pink.png b/MapboxAndroidDemo/src/main/res/drawable-mdpi/map_marker_push_pin_pink.png new file mode 100644 index 000000000..3acb9e38d Binary files /dev/null and b/MapboxAndroidDemo/src/main/res/drawable-mdpi/map_marker_push_pin_pink.png differ diff --git a/MapboxAndroidDemo/src/main/res/drawable-xhdpi/map_marker_push_pin_pink.png b/MapboxAndroidDemo/src/main/res/drawable-xhdpi/map_marker_push_pin_pink.png new file mode 100644 index 000000000..8176fc933 Binary files /dev/null and b/MapboxAndroidDemo/src/main/res/drawable-xhdpi/map_marker_push_pin_pink.png differ diff --git a/MapboxAndroidDemo/src/main/res/drawable-xxhdpi/map_marker_push_pin_pink.png b/MapboxAndroidDemo/src/main/res/drawable-xxhdpi/map_marker_push_pin_pink.png new file mode 100644 index 000000000..9ee8ef873 Binary files /dev/null and b/MapboxAndroidDemo/src/main/res/drawable-xxhdpi/map_marker_push_pin_pink.png differ diff --git a/MapboxAndroidDemo/src/main/res/drawable-xxxhdpi/map_marker_push_pin_pink.png b/MapboxAndroidDemo/src/main/res/drawable-xxxhdpi/map_marker_push_pin_pink.png new file mode 100644 index 000000000..1106e505e Binary files /dev/null and b/MapboxAndroidDemo/src/main/res/drawable-xxxhdpi/map_marker_push_pin_pink.png differ diff --git a/MapboxAndroidDemo/src/main/res/layout/activity_animated_pin_drop.xml b/MapboxAndroidDemo/src/main/res/layout/activity_animated_pin_drop.xml new file mode 100644 index 000000000..9a6110d43 --- /dev/null +++ b/MapboxAndroidDemo/src/main/res/layout/activity_animated_pin_drop.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MapboxAndroidDemo/src/main/res/layout/activity_basic_simple_mapview.xml b/MapboxAndroidDemo/src/main/res/layout/activity_basic_simple_mapview.xml index 4a4458d65..ad3638d04 100644 --- a/MapboxAndroidDemo/src/main/res/layout/activity_basic_simple_mapview.xml +++ b/MapboxAndroidDemo/src/main/res/layout/activity_basic_simple_mapview.xml @@ -14,6 +14,6 @@ android:layout_height="match_parent" mapbox:mapbox_cameraTargetLat="40.73581" mapbox:mapbox_cameraTargetLng="-73.99155" - mapbox:mapbox_cameraZoom="11"/> + mapbox:mapbox_cameraZoom="11" /> \ No newline at end of file diff --git a/MapboxAndroidDemo/src/main/res/layout/activity_camera_slow_spin.xml b/MapboxAndroidDemo/src/main/res/layout/activity_camera_slow_spin.xml new file mode 100644 index 000000000..2ab0d6ab7 --- /dev/null +++ b/MapboxAndroidDemo/src/main/res/layout/activity_camera_slow_spin.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/MapboxAndroidDemo/src/main/res/layout/activity_javaservices_geocoding.xml b/MapboxAndroidDemo/src/main/res/layout/activity_javaservices_geocoding.xml index 92e0c71fa..fe191fdad 100644 --- a/MapboxAndroidDemo/src/main/res/layout/activity_javaservices_geocoding.xml +++ b/MapboxAndroidDemo/src/main/res/layout/activity_javaservices_geocoding.xml @@ -1,6 +1,5 @@ + mapbox:mapbox_cameraZoom="11" /> + android:layout_marginTop="8dp" + android:layout_marginRight="8dp"> + mapbox:layout_constraintBottom_toBottomOf="parent" + mapbox:layout_constraintEnd_toEndOf="parent" + mapbox:layout_constraintStart_toEndOf="@+id/geocode_latitude_editText" + mapbox:layout_constraintTop_toTopOf="@+id/geocode_latitude_editText" /> diff --git a/MapboxAndroidDemo/src/main/res/layout/activity_zoom_based_icon_switch.xml b/MapboxAndroidDemo/src/main/res/layout/activity_zoom_based_icon_switch.xml new file mode 100644 index 000000000..f5af6f3a3 --- /dev/null +++ b/MapboxAndroidDemo/src/main/res/layout/activity_zoom_based_icon_switch.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/MapboxAndroidDemo/src/main/res/values/activity_strings.xml b/MapboxAndroidDemo/src/main/res/values/activity_strings.xml index d7ea66b80..adc3b29e5 100644 --- a/MapboxAndroidDemo/src/main/res/values/activity_strings.xml +++ b/MapboxAndroidDemo/src/main/res/values/activity_strings.xml @@ -308,4 +308,16 @@ Light azimuthal angle Light polar angle Building opacity + + + Try tapping on the map and/or adjusting the zoom + + + Zoom in and out to see the icons change + + + Bounce interpolator + Linear interpolator + Accelerate interpolator + Decelerate interpolator \ No newline at end of file diff --git a/MapboxAndroidDemo/src/main/res/values/descriptions_strings.xml b/MapboxAndroidDemo/src/main/res/values/descriptions_strings.xml index 6d198d913..9ce5ea712 100644 --- a/MapboxAndroidDemo/src/main/res/values/descriptions_strings.xml +++ b/MapboxAndroidDemo/src/main/res/values/descriptions_strings.xml @@ -51,6 +51,7 @@ Use SymbolLayer and icons to show data in a BubbleLayout "info window". Use multiple expressions to visualize unit change in data. View satellite photos and click to outline an area of land. + Change SymbolLayer icons based on the camera\'s zoom level. Create a default marker with an InfoWindow. Draw a polyline by parsing a GeoJSON file with the Mapbox Maps SDK. Draw a vector polygon on a map with the Mapbox Maps SDK. @@ -60,6 +61,7 @@ "Animate the map's camera position, tilt, bearing, and zoom." Position the camera so that all the given markers are in view. Prevent a map from being panned to a different place. + Slowly have the camera circle around a single point. Download and view an offline map using the Mapbox Maps SDK. Download, view, navigate to, and delete an offline region. Download, view, navigate to, and delete an offline region. @@ -73,7 +75,7 @@ Use Mapbox Java Services to request directions. Use Mapbox\'s Optimization API to retrieve and display the quickest multi-stop route. Use Mapbox Java Services to build a url and download a static map. - Use the Directions Matrix API to receive driving times between 2-25 different locations. + Use the Matrix API to receive driving times between 2-25 different locations. Use the Geocoding API to receive information about specific coordinates. Use the Isochrone API to receive information about how far you can travel within a given time. Use the Tilequery API to search for features in a tileset. This example queries for up to 10 buildings which are within 50 meters of the single map click location. @@ -110,6 +112,7 @@ Show calendar event locations on the map. Combine two maps for a magic window effect Add a gradient on top of a MapView to show a background fog effect. + Use Android system interpolators to animate SymbolLayer icons movement. Show an accurate and government-approved China map in your app using the Mapbox Maps SDK. diff --git a/MapboxAndroidDemo/src/main/res/values/titles_strings.xml b/MapboxAndroidDemo/src/main/res/values/titles_strings.xml index 75c8e497b..ac88b3fab 100644 --- a/MapboxAndroidDemo/src/main/res/values/titles_strings.xml +++ b/MapboxAndroidDemo/src/main/res/values/titles_strings.xml @@ -51,6 +51,7 @@ Temperature change Satellite land select Line gradient + Zoom-based icon switch Draw a marker Draw a GeoJSON line Draw a polygon @@ -60,6 +61,7 @@ Animate the map camera Fit camera in bounding box Restrict map panning + Rotating camera A simple offline map Offline manager Query a map feature @@ -108,6 +110,7 @@ Calendar integration Magic Window Background fog + Animated icon movement China map view diff --git a/MapboxAndroidDemo/src/main/res/values/urls_strings.xml b/MapboxAndroidDemo/src/main/res/values/urls_strings.xml index a1abac0d2..6fb4ef130 100644 --- a/MapboxAndroidDemo/src/main/res/values/urls_strings.xml +++ b/MapboxAndroidDemo/src/main/res/values/urls_strings.xml @@ -50,6 +50,7 @@ https://i.imgur.com/KjgNcS0.png https://imgur.com/YiBeH0I.png https://i.imgur.com/tfbO1m4.png + https://i.imgur.com/sbWU4Ui.png http://i.imgur.com/X59UoaY.png https://i.imgur.com/Bs0X98z.png http://i.imgur.com/v9X28id.png @@ -59,6 +60,7 @@ http://i.imgur.com/PN3vyNJ.jpg http://i.imgur.com/A0JL21Q.png http://i.imgur.com/A227BEs.jpg + https://i.imgur.com/uuiOK5D.png http://i.imgur.com/dV4DgDT.png http://i.imgur.com/tDlcNIg.png http://i.imgur.com/tDlcNIg.png @@ -110,6 +112,7 @@ https://i.imgur.com/M8TU7nH.png https://i.imgur.com/Nw78ZrV.png https://i.imgur.com/NcSGgD8.png + https://i.imgur.com/JfLf69C.png https://i.imgur.com/KwoEynZ.png diff --git a/build.gradle b/build.gradle index 7764c5414..5f4701372 100644 --- a/build.gradle +++ b/build.gradle @@ -28,6 +28,7 @@ allprojects { maven { url "https://jitpack.io" } maven { url "http://oss.sonatype.org/content/repositories/snapshots/" } jcenter() + maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' } } } diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 326ac09e9..e18ce9f99 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -10,7 +10,7 @@ ext { version = [ // Mapbox - mapboxMapSdk : '7.2.0', + mapboxMapSdk : '7.3.0', mapboxTurf : '4.5.0', mapboxServices : '4.5.0', mapboxPluginBuilding : '0.5.0', @@ -86,6 +86,7 @@ ext { supportCustomTabs : "com.android.support:customtabs:${version.supportLib}", supportConstraintLayout : "com.android.support.constraint:constraint-layout:${version.constraintLayout}", supportAnnotations : "com.android.support:support-annotations:${version.supportAnnotations}", + supportAnimation : "com.android.support:support-dynamic-animation:${version.supportLib}", // Square timber : "com.jakewharton.timber:timber:${version.timber}",