I’m using getCenter() to use the lat lng in a url so users can share / bookmark a location on Google Maps. I then use panTo() to try and jump back to the same location. Though it always jumps back to approximately the same location it’s never exactly the same view.
I’ve thought about using setCenter() instead of panTo() but this can mess up the referencing calculation for the custom map layer I’m displaying. Depends where the center happens to be.
To see the problem in action you can go to http://www.topomap.co.nz/ and use the “Share” tab to get a url generated from getCenter(). Using the url you’ll notice they show slightly different centers.
Please note that I’m currently using latLng.toUrlValue() which reduces some of the accuracy, but you can manually tweak the url from the individual lat long given in the “Share” tab and you’ll still see the same problem.
Any ideas what might be going on?
Seems panTo() is no substitute for setCenter(). I just have to code around my Prime Meridian issue and use setCenter() instead.