Issue
I'm repeating the following code every x seconds in my MapActivity:
mapview.invalidate();
for (int i=0; i<mapview.getOverlays().size(); i++ )
{
mapview.getOverlays().remove(i);
}
mapview.getOverlays().clear();
List<Overlay> mapOverlays = mapview.getOverlays();
//set new geoponts here and add 2 markers via itemizedoverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedoverlay);
mapview.invalidate();
Though I can see on the GUI that it's not refreshing the page, it's always drawing on top of it. It doesn't seem to clear the content before putting new stuff on.
Also using postinvalidate() doesn't work
Any idea what I'm doing wrong?
Solution
The reference of itemizedoverlay was not in that function, I moved it there and now it works.
Answered By - PoeHaH
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.