-1

I want to use MarkerClusterer with multiple markers of different type and cluster them separately. For example, cluster markers of type X only with other markers of type X, and markers of type y, with other markers of type y.

There are different types of markers in my map (not all the markers represent the same type of element)

I need it to cluster all the markers in the map if the zoom is lower or equal than 15 (easy part).

What I can't achieve is clustering the markers by the type of the marker when zoom is higher than 15.

Thanks for your help.

4

1 回答 1

2

如果 Google 地图可以做到这一点,您可能需要提前分离标记并将每组标记传递到单独的 MarkerCluster 中。

你可能还想看看 Azure Maps。在集群方面它有更多的功能(也比谷歌地图便宜很多)。在 Azure Maps 中,您可以将相同类型的标记分组到不同的数据源中,并在数据源上启用集群。以下是一些资源:

https://docs.microsoft.com/en-us/azure/azure-maps/clustering-point-data-web-sdk

https://azuremapscodesamples.azurewebsites.net/index.html?search=cluster

于 2019-11-19T19:12:50.130 回答