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

DeveloperAdd007 picture DeveloperAdd007  路  3Comments

alexweber picture alexweber  路  4Comments

nthonymiller picture nthonymiller  路  4Comments

matishw picture matishw  路  3Comments

ChrisDevinePimss picture ChrisDevinePimss  路  3Comments