Mapsforge - Move and zoom not zoom and move

32 views
Skip to first unread message

schaa...@gmail.com

unread,
Mar 8, 2021, 6:46:18 PM3/8/21
to Mapsforge & VTM
Hiya, based on the mapsforge model it completes a zoom and then sets the map position.
model.mapViewPosition.setMapPosition(new MapPosition(LatLong, (byte) 18));

I'm unsure if this was intended to be immediate but it can be confusing seeing it complete the zoom and then moving to the latlong.

Any chance of moving and then zooming? or is there another function to do this?

schaa...@gmail.com

unread,
Mar 8, 2021, 6:51:53 PM3/8/21
to Mapsforge & VTM
I think the issue might not be with the order of things but perhaps the redraw that occurs when zooming in that is causing confusion as the tiles draw.

Emux

unread,
Mar 9, 2021, 3:10:59 AM3/9/21
to mapsfo...@googlegroups.com
The code shows that it calls move and then zoom.

Anyway you can call the 2 commands (setCenter, setZoomLevel) separately and use the order you like.

Also you can set if want animation in each call or not.

--
Emux
Reply all
Reply to author
Forward
0 new messages