我画一个圆圈在我的地图是这样的:
I am drawing a circle on my map like this:
CircleOptions circle=new CircleOptions();
circle.center(centre);
circle.strokeColor(0xFFFFA420);
circle.strokeWidth(2f);
circle.fillColor(0x11FFA420);
circle.radius(radius);
myMap.addCircle(circle);
要删除这个圈子里,我打电话 myMap.clear()
,其中删除添加到地图中的所有项目。现在的问题是如何消除这个圈子没有在地图上删除所有其他项目?
To remove this circle, I am calling myMap.clear()
, which removes all items added to the map.
The question is how to remove this circle without removing all others items on the map?
尝试调用remove()在圆形
对象,你得到回addCircle()
。例如:
Try calling remove()
on the Circle
object that you get back from addCircle()
.
For Example
Circle mapCircle;
mapCircle = mapView.addCircle(circleOption);
当你想删除
现在调用此方法
Now when you want to remove Call this method
if(mapCircle!=null){
mapCircle.remove();
}
上一篇:的taskdef类com.android.ant.SetupTask不能使用ClassLoader AntClassLoader找到[]android、com、taskdef、ant
下一篇:Java SDK的管理器崩溃与" flashplayerplugin"在命令行输出管理器、命令、行输出、Java