w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

open native maps app

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?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

open native maps app

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');
}

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

open native maps app

Thanks, perfect.

Return to “Issues”