Change multi size icon cluster to single icon

2019-09-08 15:40发布

问题:

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?