Android Question Zooming google maps programatically

kostefar

Active Member
Licensed User
Longtime User
Dear All,

I´m trying to look into how I can zoom programatically in order to be independent of the +/- way of doing it. I´ve only managed to do it with animatecamera, but then there´ll be a slow transition from the current value to the new one, but I want it to happen instantly as when using +/- or pinching.

Any idea?
 

DonManfred

Expert
Licensed User
Longtime User
Use MoveCamera instead of Animatecamera
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Use MoveCamera instead of Animatecamera

Thanks DonManfred,

Already tried that with
B4X:
CameraPosition1.Initialize(lat,longi,radius)
where radius is a value that changes but nothing happens. Cameraposition is declared under globals, and is used once in another sub. In the sub where I initialize it again, the log shows that the radius value changes, so it´s not that it never gets to that sub or something plus it works if I also animate with
B4X:
GoogleMap1.AnimateCamera(CameraPosition1)
in the next line - just not at the speed I want it to. Hence, I must be missing something.

EDIT: But you got me thinking. Solved the problem with:
B4X:
GoogleMap1.MoveCamera(CameraPosition1)
Thanks :)
 
Last edited:
Upvote 0
Top