Angular-google-maps: Hiding Points of interest

Created on 14 Sep 2017  路  2Comments  路  Source: SebastianM/angular-google-maps

Hello everybody,
I was wondering whether there's any way to hide the POIs from the map, like restaurants and shops, or not.

Thank you
Marco

Most helpful comment

Thank you kkopec,
I solved it in this way:

1- created a new variable in my component

public mapStyles = [
      {
      "featureType": "poi",
      "elementType": "labels",
      "stylers": [
        {
          "visibility": "off"
        }
        ]
      }
    ];

2- passed it to the map in this way

<agm-map [styles]="mapStyles"...

Hope this will help others achieve this faster after me :)

Thank you
Marco

All 2 comments

You can hide the POIs by setting their visibility through the map styles.

Thank you kkopec,
I solved it in this way:

1- created a new variable in my component

public mapStyles = [
      {
      "featureType": "poi",
      "elementType": "labels",
      "stylers": [
        {
          "visibility": "off"
        }
        ]
      }
    ];

2- passed it to the map in this way

<agm-map [styles]="mapStyles"...

Hope this will help others achieve this faster after me :)

Thank you
Marco

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jscti picture jscti  路  22Comments

lazarljubenovic picture lazarljubenovic  路  30Comments

AckerApple picture AckerApple  路  26Comments

philippeboyd picture philippeboyd  路  76Comments

DoyeonOhTravelHow picture DoyeonOhTravelHow  路  31Comments