I have two variables - Destination and Source - and, using Phonegap, I\'m trying to use jQuery to open the external iPhone Apple Maps app with directions.
The code I
In my case, changing from http://maps.apple.com/?q= to only maps:?q= not solving the problem.
The working scheme that open native Apple Maps with marker is as follows:
maps://maps.apple.com/?q={latitude},{longitude}
full working code:
window.location.href = "maps://maps.apple.com/?q="+lat+","+lng;
Tested working with iOS7.1 simulator, might not works in later version. I don't have the opportunity to test. Sorry.
Supported Apple Maps parameters can be found here: https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
Credit goes to this SO link: Here