K kostefar Active Member Licensed User Longtime User Sep 17, 2017 #1 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?
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 Sep 17, 2017 #2 Use MoveCamera instead of Animatecamera Upvote 0
K kostefar Active Member Licensed User Longtime User Sep 17, 2017 #3 DonManfred said: Use MoveCamera instead of Animatecamera Click to expand... Thanks DonManfred, Already tried that with Code: Copy 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 Code: Copy 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: Code: Copy GoogleMap1.MoveCamera(CameraPosition1) Thanks Last edited: Sep 17, 2017 Upvote 0
DonManfred said: Use MoveCamera instead of Animatecamera Click to expand... Thanks DonManfred, Already tried that with Code: Copy 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 Code: Copy 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: Code: Copy GoogleMap1.MoveCamera(CameraPosition1) Thanks