相关疑难解决方法(0)

如何删除Google map v2中的标记?

我使用以下方法在地图上添加了标记,并保留了标记记录

public static void  showallLocations() 
    {
        ArrayList<LinkedHashMap<String, String>> listshow=latLngStoragepreference.getLatlng();
        markerlist=new ArrayList<Marker>();// to keep the marker record so that later we can delete
        if(listshow.size()>0)
        {
        for(int i=0;i<listshow.size();i++)
        {
        LinkedHashMap<String, String> Linkedhashmap=listshow.get(i);

        Set mapSet = (Set) Linkedhashmap.entrySet();
        //Create iterator on Set 
        Iterator mapIterator = mapSet.iterator();

        Map.Entry mapEntry = (Map.Entry) mapIterator.next();
        // getKey Method of HashMap access a key of map
        String keyValue = (String) mapEntry.getKey();
        //getValue method returns corresponding key's value
        String value = (String) mapEntry.getValue();
        String[] parts=value.split("#");
        String Latitude=parts[0];
        String Longitude=parts[1]; …
Run Code Online (Sandbox Code Playgroud)

android google-maps

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×1

google-maps ×1