I am doing one small GPS application. I have to show multiple palces . I can able to show multiple places using custom overlay method.Now i have to show route between two points , while showing 开发者_开发问答route i have to show only that two points. remaining all points should disappear but i dont know how to disappear the other points.
This will surely work.. TestedAndVerified
if(!mapOverlays.isEmpty())
{
mapOverlays.clear();
mapView.getOverlays().clear();
mapView.invalidate();
}
Before using map view clear the list of map view like
map_vw.getOverlays().clear()
This will clear all your points before drawing a new map
If you are using an itemized overlay you can just remove them from the collection and then call postInvalidate() on the map. Can you give more details or code snippet of how you are using your overlay or itemized overlay?
精彩评论