2

I'm implementing my custom marker pin in MapView component. Are there a way to hide or remove third party markers, like hotels, restaurants, sales stores, etc...?

I have searched in component docs but found nothing.

Uygar Uçar
  • 127
  • 6

1 Answers1

7

As far as I know, there is one way to turn off the business texts and markers. It is when we are applying a style to <MapView>'s customMapStyle property.

From this site, https://mapstyle.withgoogle.com/ , skip to styling selecting "use the Legacy JSON styling wizard" enter image description here

Then select "more options" for a more specific styling. enter image description here

Select Points of Interest, then select Business, then select Text fill and Text Outline and make their visibility as hidden. enter image description here

We'll click "Finish" button, then "copy JSON" button. Now we have JSON formatted data copied. enter image description here

You may hold this info in a variable named, say mapStyle

mapStyle=
[
  {
    "featureType": "poi.business",
    "elementType": "labels.text.fill",
    "stylers": [
      {
        "visibility": "off"
      }
    ]
  },
  {
    "featureType": "poi.business",
    "elementType": "labels.text.stroke",
    "stylers": [
      {
        "visibility": "off"
      }
    ]
  }
]

The last thing to do is to use mapStyle and making it equal to customMapStyle property like this..

<MapView 
  customMapStyle={mapStyle}

  {/*other properties*/}   
 />
Uygar Uçar
  • 127
  • 6