example:
Modify from last post, Detect touch on marker in MapView. Override the method onTap(GeoPoint p, MapView mapView) to add marker on the map.
@Override
public boolean onTap(GeoPoint p, MapView mapView) {
// TODO Auto-generated method stub
String title = "pt:" + String.valueOf(overlayItemList.size() + 1);
String snippet = "geo:\n"
+ String.valueOf(p.getLatitudeE6()) + "\n"
+ String.valueOf(p.getLongitudeE6());
addItem(p, title, snippet);
return true;
}
next:
- Handle both onTap(GeoPoint p, MapView mapView) and onTap(int index) implemented in MapView
0 Response to "Detect touch on MapView, onTap(GeoPoint p, MapView mapView)"
Posting Komentar