如何从Google Map中的群集中删除标记? [英] How to remove the marker from the cluster in google map?

查看:96
本文介绍了如何从Google Map中的群集中删除标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Google地图中实现了cluster,我想根据复选框的选择使用markers更新地图.

I have implemented cluster in google map and I want to update the map with the markers based on the checkbox selection.

我想根据在标记中设置的自定义属性从集群中删除标记.

I want to remove the marker from the cluster based on the custom property that I have set in the marker.

var clust = new MarkerClusterer(地图,标记,{maxZoom:14});

var clust = new MarkerClusterer(map, markers, {maxZoom: 14});

我该怎么做?请帮助我.

How can I do this? Please help me.

谢谢.

推荐答案

要删除的每个标记:

 clust.removeMarker(marker);

要添加的每个标记:

 clust.addMarker(marker);

这篇关于如何从Google Map中的群集中删除标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆