如何使用Google Maps V2删除单个标记? [英] How to remove single marker using Google Maps V2?

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

问题描述

清除标记的唯一方法是清除标记。但是它会清除地图中的所有标记。

The only method that removes markers from map is clear. However it clears all markers from the map.

我只想删除单个标记或一组标记。

I want to remove only single marker or group of markers.

我怎么能做到这一点?

推荐答案

可以获得它的参考:

After adding the marker it is possible to obtain its reference:

Marker marker = map.addMarker(..);

Marker 类有一个 删除 方法:

The Marker class has a remove method:

这篇关于如何使用Google Maps V2删除单个标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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