Google Maps API: Styles. Cannot remove all Points of Interests
R

1

6

I am trying to remove all Points of Interest (POI) from a Google Maps via the Google Maps Platform style editor in Cloud Console.

However, when I turn off label visibility for ALL of the POI, some still show up (i.e. Costco Wholesale, Trader Joe's, etc.).

Even if I turn off label visibility for everything (i.e. POI, Political, Infrastructure, Natural), these items still show up.

Is there a way to hide these? Or does Google not allow you to hide certain POI?

Image of the Console

Riella answered 28/1 at 1:4 Comment(2)
How did you opt-out of it?Villar
The issue in the new style editor has been fixed.Morena
M
-1

This seems to be a bug in the new style editor. The following JSON works locally.

[
  {
    "featureType": "poi",
    "stylers": [
      {
        "visibility": "off"
      }
    ]
  }
]

If you are in a legacy Google Maps project, you should see the following message when creating a new style:

enter image description here

You can opt out and use the old style editor and it will work.


If you don't have the option to opt out, then you are stuck with it.


Watch this issue and star it to receive feedback.

Edit — April 4. 2024

As far as I can tell, this was fixed today by Google.

Morena answered 28/1 at 12:39 Comment(5)
Can you use "mapId" with the legacy mode? Asking because using AdvancedMarker Element requires "mapId"Villar
Hi @MrUpsidown, thanks for the answer, I contacted the support team of Google regarding this issue, this is the official answer: «This "opt out" option to move back to the legacy UI is only available to projects that were already created when we only had that version before, so if your project is relatively new (I see it was only created last week), then it is intended that you can only use the latest UI.» TLDR: Unless you activated it before a certain period of time, all new maps would automatically used the newest UI with the known bugs. There is no ETA on solving the issue at the timeDeventer
Google is now telling us that our legacy maps will be migrated automatically and yet this is still broken. You can't even style them so POIs are consistent. Some other features like global saturation are also missing. Thanks Google.Pliant
This answer to use JSON definitely doesn't seem like it will be supported by Google going forward. We have a legacy project that had already opted out of the new style editor, but we've been informed that JSON style support will be removed soon.Encratis
This is a workaround for whoever can still use it. The new style editor is what it is. There is no point complaining here. Star the issue and leave your comments there.Morena

© 2022 - 2024 — McMap. All rights reserved.