I have a map loaded with Mapbox but I can't find a way to change the default style it brings a street map, here it is in the xml code of the view:
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
mapbox:mapbox_cameraTargetLat="40.73581"
mapbox:mapbox_cameraTargetLng="-73.99155"
mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v10"
mapbox:mapbox_cameraZoom="11" />
I would think it's styleUrl but I can't find in the documentation to change it to satellite type for example
You can define the style in the mapbox:mapbox_styleUrl property , but the value must be a url :
In the example that your question shows, you are doing the definition as it is done in web (
"mapbox://styles/mapbox/streets-v10"
), which is incorrect in Android.in the styles page you can get the url of the style you want to define.
You must go to the page https://www.mapbox.com/studio/styles and register, there you can use a template or upload a style:
There select the url of the desired style, in this case "Satellite":
you can add this value in your file
strings.xml
and call it in your view: