Change multi size icon cluster to single icon

穿精又带淫゛_ 提交于 2019-12-11 18:29:47

问题


pro.

What this expression use for => this.sizes = [53, 56, 66, 78, 90];? I found it from markercluster.js. If I want to limit only 100 markers appear on map for every time the map load/ or onchange the zooming map, does it mean I need to change to => this.sizes = [100]?

And how to change cluster icon outside ClusterMarker.js? Based on default, cluster icon will change according cluster size. How to make the cluster icon constant and without showing the number of total marker in it?

Sorry about my question. Because I really not familiar on javascript.

Hope someone can guide me. Thank you


回答1:


this.sizes = [53, 56, 66, 78, 90]; are the dimensions of the cluster image, and not the number of markers. If you want to limit the number of markers you should limit them in the file you get them from. You change the cluster icon by using cluster options. What version of markerclusterer do you use?



来源:https://stackoverflow.com/questions/7481653/change-multi-size-icon-cluster-to-single-icon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!