Search code examples
androiddictionaryosmdroid

osmdroid: calculate map size


I'm using osmdroid. The map is centered to a specific GeoPoint and the map has a specific zoom. How do I calculate the map size (depending on currunt zoom-level)? I need the GeoPoints of the upper-left and bottom-right corner.


Solution

  • I believe what you are looking for is:

    mMapView.getProjection().getBoundingBox()
    

    This will give you the lat/long bounding box for what is currently on the screen.