Adding many circles to a google map

前端 未结 3 737
借酒劲吻你
借酒劲吻你 2021-02-15 22:50

I\'m attempting to draw many circles (around 1000) on a google map, at various locations and sizes, and then binding a click event to them. But this many calls of new goog

3条回答
  •  被撕碎了的回忆
    2021-02-15 23:51

    Forget about KML, custom tiles are the way to go.

    Have a look at these county maps: http://maps.forum.nu/v3/gm_customTiles.html (check the "Density" box). and http://maps.forum.nu/gm_main.html?lat=31.428663&lon=-110.830078&z=4&mType=10 (click on the map to get county info)

    These maps have 3000+ polygons, (not circles), and they load fast. The first link is API V3, the second is API V2. The second map (V2) has click events. The click event handler is attached to the map itself, and it sends an AJAX call to the server with the lat/lon of the click. The server side script then looks this lat/lon up in the database to determine which county was clicked.

提交回复
热议问题