Adding many circles to a google map

前端 未结 3 751
借酒劲吻你
借酒劲吻你 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:48

    With the help of others via the Google Maps API v3 Group, I was able to implement a map overlay that handles 10,000 points suprisingly well. The trick is to use a canvas tile overlay, which minimizes the number of DOM elements in exchange for much simpler/lighter-weight POJsOs (plain old JavaScript objects).

    Demo page w/mouse click events (API v2 only): http://notebook.kulchenko.com/maps/datamark
    Demo page w/cursor swapping (API v2 and v3): http://notebook.kulchenko.com/maps/gridmark

提交回复
热议问题