Closed mmmenno closed 7 years ago
I know i could do so myself with setCameraAndTargetLatLng()
, but maybe this might be useful for everybody?
The Move Camera Back button does this (or press C key) (but this button does not scale the camera, only moves it):
The function that does this is exposed as centerBounds
. I could add function fitBounds
which not just moves camera to center of map, but also fit the camera to the map's bounding box. @mmmenno what do you think?
Ah, right, sorry. Totally mistook the buttons for a swap between camera- and crosshairmode!
Don't know if Fitbounds is needed, i haven't been working with real data yet. Maybe we should leave it for now - i guess it all becomes less clear when the map starts moving. And besides, when you first press Move Camera Back button, and then Move Camera Back to Map button, you will obtain the same result.
Maybe the buttons need different icons then, do you have suggestions?
I'll try to come up with something - no luck so far.
When the initial coordinates prove to be wrong, you move to another part of the globe and zoom in on exactly the right spot, only to find you forgot to take your camera along.
Instead of zooming out again to drag both camera and target in steps to the mentioned spot, wouldn't it be nice to simply have a button that would relocate the camera (and target) to the center of your map?