Google Maps V3: Only show markers in viewport - Clear markers issue

前端 未结 6 1253
再見小時候
再見小時候 2021-01-30 04:33

I like to create a map with Google Maps that can handle large amounts of markers (over 10.000). To not slow down the map I\'ve created a XML-file that only outputs the markers t

6条回答
  •  自闭症患者
    2021-01-30 04:59

    You might want to check out this documentation from Google. It explains what you need:

    With the new list of markers you can remove the current markers 
    (marker.setMap(null)) that are on the map and 
    add the new ones (marker.setMap(map)).
    

提交回复
热议问题