How to embed a custom map on Android?

0

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.

    
asked by anonymous 23.09.2017 / 03:46

1 answer

0

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:

    
23.09.2017 / 15:25