on mapview onTouch function of OnClickListener is never called after
executing once. Is there any work around for this?
I am attaching Code snippets:
public class SearchResultsMapView extends MapActivity {
private MapView mapView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mapview);
mapView = (MapView) findViewById(R.id.mapview);
mapController = mapView.getController();
mapView.setClickable(true);
mapView.setEnabled(true);
mapView.setSatellite(false);
mapView.setStreetView(false);
mapView.setTraffic(false);
mapOverlays = mapView.getOverlays();
mapView.setOnTouchListener(new OnTouchListener (){
@Override
public boolean onTouch(View v, MotionEvent
event) {
Log.v(TAG, "inside onTouch");
return false;
}
});
.......
I cannot return true from onTouch method, as this will stop callbacl
method onTap(int index) of my class ResultItemizedOverlay which
extends ItemizedOverlay<OverlayItem>.
Any hint, how can I make this listener working every time when I click
anywhere on map?
I also want onTap(int index) to work for ItemizedOverlay<OverlayItem>.
Thanks,
Aamir
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en