Page 1 of 1

open native maps app

Posted: Wed May 08, 2013 7:52 am
by w

Google maps javascript api looks nice to use on a webpage, but for native use I think it is much easier to just use the native maps app on android and iOS, if you just want to show a location and calculate a route, etc.

How can I create a link in Appery that will redirect to the user's native maps app? In android it is a "a href=geo:0,0?q=my+street+address." type of url. In apple it is a href="http://maps.apple.com/?daddr=San+Fran...; / a

How can I make this working on both android and apple?


open native maps app

Posted: Wed May 08, 2013 8:00 am
by Oleg Danchenkov

Use JS to determine device and change href attribute of a link on Page show event. For example
if (navigator.userAgent.match(/iP/i)) {
Appery('linkName').attr('href', 'link_for_iOS_devices');
} else {
Appery('linkName').attr('href', 'link_for_Android_devices');
}


open native maps app

Posted: Wed May 08, 2013 9:24 am
by w

Thanks, perfect.