[android] Add a way to use a custom location source (#8710)

* add a way to use a custom location source

* add custom location engine example to test app
This commit is contained in:
Pablo Guardiola
2017-04-20 20:10:29 +02:00
committed by GitHub
parent 97f2a44859
commit c6be40b71b
8 changed files with 315 additions and 21 deletions

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:mapbox_cameraTargetLat="40.416872"
app:mapbox_cameraTargetLng="-3.703807"
app:mapbox_cameraZoom="4"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabLocationToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_my_location"
tools:backgroundTint="@color/primary"/>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -28,6 +28,7 @@
<string name="activity_user_tracking_customization">User location drawable</string>
<string name="activity_user_dot_color">User location tint color</string>
<string name="activity_user_location_toggle">User location toggle</string>
<string name="activity_custom_location_engine">Custom location engine</string>
<string name="activity_custom_layer">Custom Layer</string>
<string name="activity_map_padding">Map Padding</string>
<string name="activity_debug_mode">Debug Mode</string>
@@ -62,6 +63,7 @@
<string name="description_user_location_customization">Customize the location of the user</string>
<string name="description_user_location_dot_color">Customize the user location color</string>
<string name="description_user_location_toggle">Toggle location of the user on and off</string>
<string name="description_custom_location_engine">Customize location engine</string>
<string name="description_custom_layer">Overlay a custom native layer on the map</string>
<string name="description_info_window_adapter">Learn how to create a custom InfoWindow</string>
<string name="description_cameraposition">CameraPosition capabilities</string>