12

I implemented Android Google Maps v2 in my Android app without any problem.

However, the map includes some "default markers" that I haven't included.

I mean, some private business locations.

Is it possible to remove these markers from the map so that I only get the city names and the street names?

Dave
  • 5,108
  • 16
  • 30
  • 40
john518
  • 359
  • 1
  • 4
  • 12
  • 1
    it's worth mentioning this link to help generate map styles: https://mapstyle.withgoogle.com/ – Eric Apr 11 '20 at 10:51

2 Answers2

33

You can do it simply by modification of the map style: Adding a Styled Map

  1. Create JSON file src\main\res\raw\map_style.json like this:
[
  {
    featureType: "poi",
    elementType: "labels",
    stylers: [
      {
        visibility: "off"
      }
    ]
  }
]
  1. Add map style to your GoogleMap
googleMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.map_style));
Jozef
  • 1,154
  • 11
  • 7
1

Markers you mean to say google places , If yes then we cant. to remove markers that are added by googleMap.addMarker() method that can be remove by

marker.remove()

or by clearing marker

googleMap.clear()
Gaurav
  • 3,615
  • 2
  • 27
  • 50