I am using a HelloItemizedOverlay
to plot a tag of my location on a Google map.
Now, if the tag is moved, I want to remove it and plot a new one.开发者_Python百科
How do I remove this tag?
You can implement LocationListener
in your activity to get users current latitude and longitude.
Create geopoint using this latitude and longitude(in onLocationChanged method) and make OverlayItem of this. and pass this overlayItem to your HelloItemizedOverlay.
overlayItem = new OverlayItem(geoPoint, "Text","Snippet");
helloItemizedOverlay.addOverlay(overlayItem);
this will pin on your current location and will create new pin again once your location is changed.
精彩评论