多个MarkerClusterer的渲染顺序
rendering order of multiple MarkerClusterers
我有两组数据点,每组都有自己的 MarkerClusterer 实例。我想,如果两个集合中的 clusters/markers 恰好重叠,那么在上面的那个将属于我最后实例化的 clusterer;它似乎主要是这样工作的。但偶尔,错误的引脚会出现在最前面。那是因为聚类器异步呈现吗?有什么方法可以控制吗?
答案是标记图钉放置在与集群图钉不同的 MapPane 中,并且 MapPanes 由它们自己的 z-index 顺序控制。 About the MapPanes.
进一步感兴趣:to make the markers' z-index work、
You have to both specify a zIndex and add
optimized: false
to every marker constructor
和to make marker pins and cluster pins respect the same z-index:
Because clustered markers sit in the overlayMouseTarget pane, you
would need to create your own markers in the same pane.
我有两组数据点,每组都有自己的 MarkerClusterer 实例。我想,如果两个集合中的 clusters/markers 恰好重叠,那么在上面的那个将属于我最后实例化的 clusterer;它似乎主要是这样工作的。但偶尔,错误的引脚会出现在最前面。那是因为聚类器异步呈现吗?有什么方法可以控制吗?
答案是标记图钉放置在与集群图钉不同的 MapPane 中,并且 MapPanes 由它们自己的 z-index 顺序控制。 About the MapPanes.
进一步感兴趣:to make the markers' z-index work、
You have to both specify a zIndex and add optimized: false to every marker constructor
和to make marker pins and cluster pins respect the same z-index:
Because clustered markers sit in the overlayMouseTarget pane, you would need to create your own markers in the same pane.