Hide poi.business markers/labels in Google Static Maps API
Asked Answered
C

1

7

I'm building a static Google Map URL to be used within <noscript><noscript> tag on a 'Find Us' page as fall-back in case a user has scripting turned off. Code thus far is:

<div id="map" class="map">
    <noscript>
        <img src="https://maps.googleapis.com/maps/api/staticmap?center=[lat],[long]
            &zoom=17
            &size=600x400
            &scale=1
            &maptype=hybrid
            &visible=[lat],[long]
            &key=[key hidden]">
    </noscript>
</div>

However, on the resulting map image, there are markers for other businesses (e.g. orange knife & fork markers for restaurants) and/or points of interest.

I want to suppress the display of these markers, and add a custom marker for my location of interest (&markers=.... not shown in the code snippet above).

I cannot find anything in the Static Maps API documentation, nor on stackoverflow.

Is there a way to achieve this, or am I stuck with them on a Static Map?

Commensurate answered 20/12, 2016 at 0:53 Comment(0)
S
31

Tack this on your query string:

style=feature:poi|visibility:off

You can find other stylings here.

Schreiner answered 5/1, 2017 at 21:32 Comment(1)
Thank you for the answer. How did I not find Styled Maps? Doh!Commensurate

© 2022 - 2024 — McMap. All rights reserved.