I’m having an issue where setCenter and setRegion do not always center a Mapview at the specified location (latititude, longitude) in a program that I am working on. I can reproduce this same issue with the sample Mapview program that comes with Corona. To reproduce, touch the “Current Location” button on the sample program then pinch zoom out just a bit. Then press the “Current Location” button again.
The issue does NOT always happen but usually within 5 or 6 tries you will see that the map does not center back to your current location. Once the issue occurs, another touch of the “Current Location” button works perfectly. It only seems to happen if the user zooms prior to touching the “Current Location” button. It seems that the farther you zoom out the farther off center the map will be while the less you zoom out the less off center it will be.
I have tested with three devices all running Android 4.1.1 (Asus Transformer Prime tablet, Samsung SIII phone and a HTC Droid DNA phone) with the same results. I have tried on public release builds 971 and 1076. This could be an issue with only Android 4.1.1. To rule that out I was hoping some of you could run a few quick tests with the sample Mapview using other versions of Android to see if the issue occurs with those versions as well. All assistance is greatly appreciated!
Thanks ahead of time!
Scott