zeta243 / osmdroid

Automatically exported from code.google.com/p/osmdroid
1 stars 0 forks source link

MapView.zoomToBoundingBox() centers on incorrect coordinates #348

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
reporting against osmdroid-android 3.0.8

after applying the zoom level, the MapView is centered on incorrect 
coordinates: the 1E6 coordinates are divided by 1E6, then passed to the map 
controller which expects 1E6 coordinates and also attempts to divide by 1E6.

patch attached.

Original issue reported on code.google.com by schizosfera@gmail.com on 29 May 2012 at 11:47

Attachments:

GoogleCodeExporter commented 9 years ago
This is incorrect - the new GeoPoint() multiplies by 1E6, so the final value is 
correct. It's a ridiculous back and forth, but it ends up doing the correct 
calculation.

Note that you cannot call zoomToBoundingBox until the MapView has been create 
and onLayout called on it.

Original comment by kurtzm...@gmail.com on 27 Feb 2013 at 4:54