1

Is it possible to make the MyLocationOverlay marker clickable? I have to launch a spinner when the overlay marker is clicked.

myLocationOverlay.setTouchEventListener(new OverlayTouchEventListener() {

        @Override
        public void onTouch(MotionEvent arg0, MapView arg1) {
            showLocationOverlayDialog();
            Log.i("MainMapActivity", "Main.getView() — location touched");
        }
    });

This is what I have so far. I haven't started with the spinner yet. But with this code, I think it's not working. It does not enter the setTouchEventListener. Could anybody please help me?

apprentice
  • 13
  • 2

1 Answers1

0

Create subclass of MyLocationOverlay and override dispatchTap(). Than just create myLocationOverlay as instance of this class

amukhachov
  • 5,822
  • 1
  • 41
  • 60