Map orientation on ios and android

320 views
Skip to first unread message

Mick Paul

unread,
Oct 10, 2012, 9:17:56 AM10/10/12
to leafl...@googlegroups.com
I am looking for a mapping solution / API for iOS and Android where the map will rotate/orientate to the direction of travel based on GPS inputs.

Can anyone please tell me if this is possible with leaflet?  I find the use of compass mode in the standard google and apple API to be very average and would prefer to use gps inputs to determine direction of travel and orientate map accordingly.

Thanks,
Mick.

Stephan Meijer

unread,
Oct 10, 2012, 9:24:03 AM10/10/12
to leafl...@googlegroups.com
You might be able to rotate the entire map container with something like raphaeljs.


Op woensdag 10 oktober 2012 15:17:56 UTC+2 schreef Mick Paul het volgende:

Mick Paul

unread,
Oct 10, 2012, 9:27:44 AM10/10/12
to leafl...@googlegroups.com
Thanks I was thinking that I may need to do some kind of a GPS pos b - GPS pos a = bearing and use offset from North and rotate map.  Thanks I will look into raphaeljs.

Stephan Meijer

unread,
Oct 10, 2012, 9:52:34 AM10/10/12
to leafl...@googlegroups.com
raphaeljs is just for rotating the map container.

You can checkout this link for getting the phone orientation, or indeed use GPS calculations as you mentioned.
Reply all
Reply to author
Forward
0 new messages