Maps API v3 clustering at different zoom levels

…衆ロ難τιáo~ 提交于 2019-12-01 19:43:01

You can only use MarkerClusterer, but you have to modify some options.

To prevent the clusterer acts after level 4, you have to use maxZoom property. It defines the max level where the clusterer can cluster marker, so in your case, you have to fix it at 4.

Then, to change the size of the grid depending the zoom level, use gridSize property. You can find a definition of all option fields on the doc.

So, your MarkerClusterer instanciation will look like something like this :

var mcOptions = {gridSize: /*Your value*/, maxZoom: 4};
var markerCluster = new MarkerClusterer(map, /*your array of markers*/ mcOptions);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!