2014-04-22 58 views
0

我试图使用Chart.js库自定义我的标记群集以显示为饼图。Leaflet.markercluster群集添加到DOM事件

我已经覆盖iconCreateFucntion做了必要的额外计算并设置了我的数据,但为了将我的图标转换为实际图表,我需要在集群图标添加到DOM时调用一些额外的JS。

我该如何钩入Leaflet.markercluster的“已添加集群图标”事件?

回答

0

好吧,我想通了。

这是因为添加类似简单:

cluster.on 'add', (event) -> 
    # do stuff with event.target, which is the L.MarkerClusterGroup instance 

iconCreateFunction

希望这有助于别人。一天...

相关问题