Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用带有谷歌地图的标记聚类器。一切运行良好,但我想知道如何对标记进行聚类,即使该网格只有 1 个标记。在页面加载的那一刻,您会看到奇怪的标记飞来飞去,而其他标记则在一个聚集的图标内。我希望所有甚至单个标记也显示一个集群图标。
将选项设置minimumClusterSize为 1(默认为 2)
minimumClusterSize
new MarkerClusterer(map, markers,{minimumClusterSize:1});