markerclusterer info windows

前端 未结 4 1856
遇见更好的自我
遇见更好的自我 2020-12-15 14:18

Let me say I am still fairly new to google maps and javascript. i\'ve been mixing together the google store locator tutorial with some other stuff. So far, I am using mark

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 14:58

    you've got infowindow.open(map,marker); but I don't see where you create marker (apart from the local variable in your createMarkers function, which you can't really access at this point). Shouldn't that be infowindow.open(map,markerCluster);

    Another suggestion. The second parameter is where the infowindow gets anchored to. However, you don't need it. When you create your infowindow, you can set a position property (i.e. use the same lat/lng as the marker has). Then you can just call infowindow.open(map);

提交回复
热议问题