I have translucent fragments overlaying a MapView on the top and bottom. Therefore the map should be visible below the fragment, but for centering an item it should ignore the parts where the fragments are overlaying it.
In the GoogleMaps SDK it is done via the setPadding
method and is described as follows:
Sets padding on the map.
This method allows you to define a visible region on the map, to signal to the map that portions of the map around the edges may be obscured, by setting padding on each of the four edges of the map. Map functions will be adapted to the padding. For example, the zoom controls, compass, copyright notices and Google logo will be moved to fit inside the defined region, camera movements will be relative to the center of the visible region, etc.
How can something like this be done with osmdroid?
Does a similar method exist? or do I need to implement it by myself? if so, can anybody point me to existing examples?
Since version 6.1.1 there is a method called setMapCenterOffset(int, int). I used this to set map bottom padding.