I have a custom map made in Google maps and want to embed it in an Android app. I want that as soon as I get into the app already upload the custom map.
I have a custom map made in Google maps and want to embed it in an Android app. I want that as soon as I get into the app already upload the custom map.
You can customize the style of your map using MapStyleOptions
through a JSON object that you can place within the raw
directory. This is set within the onMapReady()
method in your activity . Here is an example:
@Override
public void onMapReady(GoogleMap googleMap) {
// Personalizando usando um objeto JSON
MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(
this, R.raw.style_json);
googleMap.setMapStyle(style);
}
For more details, you can check the documentation at adding a stylized map .
Example: