问题与移除折线谷歌地图Android版V2 [英] issue with removing polyline google map v2 android

查看:474
本文介绍了问题与移除折线谷歌地图Android版V2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我增加了折线选项只能在谷歌开发者的网站。

I am adding a polyline option simply as in google developer's website.

PolylineOptions rectOptions = new PolylineOptions()
        .add(new LatLng(37.35, -122.0))
        .add(new LatLng(37.45, -122.0))  // North of the previous point, but at the same longitude
        .add(new LatLng(37.45, -122.2))  // Same latitude, and 30km to the west
        .add(new LatLng(37.35, -122.2))  // Same longitude, and 16km to the south
        .add(new LatLng(37.35, -122.0)); // Closes the polyline.

// Get back the mutable Polyline
Polyline polyline = myMap.addPolyline(rectOptions);

我想删除它。但没有 rectOptions.remove()
我没有更新谷歌从我的SDK作为<一提到打服务href=\"http://stackoverflow.com/questions/15139271/google-maps-android-api-v2-how-to-remove-polylines-from-the-map\">Google Android的地图API V2,如何从地图上删除折线?
但我仍然没有它。我应该做的事情,从SDK经理只是在更新后吗?我真的需要删除它,而不是让它隐形以节省内存,因为我将展示大量的点和多次的路径。

I want to remove it. but there is no rectOptions.remove() I did update google play services from my sdk as mentioned in Google Maps Android API v2, how to remove Polylines from the map? But still I dont have it. Should I do something more after just updating it from SDK manager? I really need to remove it and not make it invisible to save memory cause I will show a path of lots of points and for many times.

推荐答案

要删除折线,使用 polyline.remove();

这篇关于问题与移除折线谷歌地图Android版V2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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