Search code examples
androidopenstreetmaposmdroid

OsmDroid setCenter centers around wrong place


I use OSMDROID 4.2 and call to

getController().setCenter(lat, long);

It worked fine in OSMDROID 3.0.4 but in the new version I see that the center point is actually not in the center of the screen but in Upper Left corner.
Any idea how to fix the problem?
Thanks


Solution

  • There's a bug which apparently has been fixed in master, but is not yet released: https://github.com/osmdroid/osmdroid/issues/22 I guess this affects you.

    Since I found 4.2 to be very buggy I'd suggest you use 4.1 until there's a new release: https://github.com/osmdroid/osmdroid/releases/tag/osmdroid-parent-4.1

    EDIT

    osmdroid 4.3 has been released, give it a shot.