androidosmdroid

Click Event on InfoWindow at Osmdroid Marker


I am using Osmdroid to display marker at a map

GeoPoint position = new GeoPoint( latitude ,  longitude  ) ;
Marker marker = new Marker(map);
marker.setTitle("some title);
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM);
marker.setPosition(position);
map.getOverlays().add(marker);

When the user clicks at the marker, the Info Window appears and displays the title. How can I get the event, when the user clicks at the text (some title) of the Info Window? I cannot see something like

infoWindow.onClick( ..... )

or something similar.

Regards

Michael


Solution

  • The InfoWindow is ultimately an Android View. You can set a customized view instead of the default one. And you can implement more or less whatever you want on this customized view.

    I strongly recommend to have a look here: https://github.com/MKergall/osmbonuspack/wiki/Tutorial_2#7-customizing-the-bubble-behaviour