0

hello I'm implementing ground overlay in android. Now i want to clear background arround Ground overlay or show only Ground Overlay.

default enter image description here

now I want enter image description here

so how the code ?

Amay Diam
  • 2,561
  • 7
  • 33
  • 57

2 Answers2

2

GoogleMap MapType = MAP_TYPE_NONE

  • 2
    could you elaborate more on the line of code you presented and add some verbal explanation? – Artem Oct 09 '18 at 19:00
0

I know it is an old Thread but it might help someone. Try using a MapStyle JSON string like the one below.

"[{\"featureType\": \"administrative\",\"stylers\": [{\"visibility\": \"off\"}]},{\"featureType\": \"landscape\",\"elementType\": \"geometry.fill\",\"stylers\": [{\"color\": \"#e0fbc6\"}]},{\"featureType\": \"poi\",\"stylers\": [{\"visibility\": \"off\"}]},{\"featureType\": \"poi\",\"elementType\": \"labels.icon\",\"stylers\": [{\"visibility\": \"off\"}]},{\"featureType\": \"poi\",\"elementType\": \"labels.text\",\"stylers\": [{\"visibility\": \"off\"}]},{\"featureType\": \"road\",\"stylers\": [{\"visibility\": \"off\"}]},{\"featureType\": \"transit\",\"stylers\": [{\"visibility\": \"off\"}]},{\"featureType\": \"water\",\"elementType\": \"labels.text\",\"stylers\": [{\"visibility\": \"off\"}]}]"

Swift:

do {
     // Set the map style by passing a valid JSON string.
     mapView.mapStyle = try GMSMapStyle(jsonString: mapStyleString)
} catch {
     NSLog("One or more of the map styles failed to load. \(error)")
}

Android:

map.setMapStyle(MapStyleOptions(JSON_STYLE_MAP)

Creating a Style: https://mapstyle.withgoogle.com

pbertsch
  • 320
  • 2
  • 14