Rotating the map

254 views
Skip to first unread message

Florian Lecointe

unread,
Apr 25, 2018, 5:08:06 AM4/25/18
to mapsforge-dev
Hi !

I was wondering if this is possible to rotate the map. In rotate i mean for now, west is the left of the map and east is the right. I would like to be able to change this in my app like google maps would do. And also bring a compas to allow the user to still be oriented.

Thanks in advance !

Emux

unread,
Apr 25, 2018, 5:14:18 AM4/25/18
to mapsfo...@googlegroups.com
Do you mean Mapsforge library?
(please include library name in topic titles)

Mapsforge does not have native rotation of the vector map elements.
Can be done externally, like in RotateMapViewer example in samples.

Compass is app related, can include one on top of map and find resources online or Android documentation.

For native rotation with Mapsforge maps and more features can see VTM OpenGL vector map library.

--
Emux

Florian Lecointe

unread,
Apr 25, 2018, 5:30:15 AM4/25/18
to mapsforge-dev
Yeah, i want to do this by touching the screen with two finger and doing like a circle with both of them. In RotateMapViewer i see a button

Emux

unread,
Apr 25, 2018, 5:35:05 AM4/25/18
to mapsfo...@googlegroups.com
Like mentioned, Mapsforge doesn't support native map rotation or gestures.
Would need to do that externally and hook gestures like third-party framework.
Note: that rotation is a bitmap one, symbols / labels rotate too, not the expected result.

So if that feature is important, better try a different map library like VTM (compatible with Mapsforge).

--
Emux

Florian Lecointe

unread,
Apr 25, 2018, 5:41:48 AM4/25/18
to mapsforge-dev
Alright then, it doesn't matter x) Also, can i use overlay transitions to center smoothly on a marker(the user position) ?

Emux

unread,
Apr 25, 2018, 5:45:11 AM4/25/18
to mapsfo...@googlegroups.com
That's for layout changes, not related to map layers.

Can use the map library API to work with the map.

e.g. MoveAnimation sample

--
Emux

Florian Lecointe

unread,
Apr 25, 2018, 7:48:05 AM4/25/18
to mapsforge-dev
Perfect, thank you !
Reply all
Reply to author
Forward
0 new messages