amal-kronz-orch / osmdroid

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

MapView.getCenter() returns different coords than set by MapControler.setCenter() #297

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In Activity.onCreate() :
    mapController.setZoom(9);
    int deflon = 16000000;
    int deflat = 54000000;
    GeoPoint centre = new GeoPoint(deflat, deflon);
    mapController.setCenter(centre);
    int lon = mapView.getMapCenter().getLongitudeE6();
    int lat = mapView.getMapCenter().getLatitudeE6();
2. lon==15998840 lat==53999697

What is the expected output? What do you see instead?
longitude and latitude should be what I set in setCenter.

What version of the product are you using? On what operating system?
3.0.6, developed on ubuntu, tried both on device and emulator

Original issue reported on code.google.com by mateuszz...@gmail.com on 11 Jan 2012 at 11:47

GoogleCodeExporter commented 9 years ago
From what I experience is MapController.setCenter the problem. It sometimes 
behaves differently even if called with the same values!

Original comment by alexande...@gmail.com on 31 Dec 2014 at 5:42