Can I remove just the popup bubbles of POI's in Google Maps API v3?

后端 未结 7 1406
走了就别回头了
走了就别回头了 2020-12-01 01:09

So I\'m working on a new web app that has a big focus on maps. Using Google Maps API v3 and really happy with it but noticed that the points of interest (POI\'s) have autom

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 01:39

    Edit: Ok, looks like Google implemented a solution, look at xomena answer.

    Ok, after searching everywhere it looks like you can't just display the POIs with clicking disabled, you could look here for more discussions:

    http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/f1ac9ad4da3606fe/3975bbda46904ae7?lnk=gst&q=disable+poi#3975bbda46904ae7

    and this exchange in particular:


    Hi,

    Is there any possibilltiy to make POIs visible but not clickable?

    Thanks Lorenzo


    Chris Broadfoot

    Unfortunately not Lorenzo. You'll need to apply a map style to hide poi labels:

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

    (or to just hide business pois, "poi.business")


    This comes from Google Maps developers, so means you can't disable the popup, just the POIs.

提交回复
热议问题