Pasha Shkaran
Pasha Shkaran

Reputation: 1481

Osmdroid positionate MarkerInfoWindow

I implement custom MarkerInfoWindow and when i click to my POI on map, map moves to center of the screen and half of my MarkerInfoWindow is cut by toolbar.

How i can move map at the bottom of the screen, when i tapped on POI to show all MarkerInfoWindow

How it looks like now:

How it looks like now

How it should be:

How it should be

Upvotes: 1

Views: 304

Answers (1)

MKer
MKer

Reputation: 3450

Implement your own Marker.OnMarkerClickListener class, with its onMarkerClic method.

And then call: myMarker.setOnMarkerClickListener(new MyOnMarkerClickListener listener);

Have a look at Marker.onMarkerClickDefault to see an example. You will have some maths to do to move the map at the desired position.

Upvotes: 3

Related Questions