how to get all markers on google-maps-v3

前端 未结 6 2087
南方客
南方客 2020-12-05 01:51

Is there a way to get all the markers on Google Maps?

6条回答
  •  旧时难觅i
    2020-12-05 02:03

    I'm assuming you have multiple markers that you wish to display on a google map.

    The solution is two parts, one to create and populate an array containing all the details of the markers, then a second to loop through all entries in the array to create each marker.

    Not know what environment you're using, it's a little difficult to provide specific help.

    My best advice is to take a look at this article & accepted answer to understand the principals of creating a map with multiple markers: Display multiple markers on a map with their own info windows

提交回复
热议问题