【问题标题】:Cordova - ios - open in maps app - not opening - 'maps://?q='Cordova - ios - 在地图应用程序中打开 - 未打开 - 'maps://?q='
【发布时间】:2019-03-11 14:38:59
【问题描述】:

我检查了我的 config.xml,并且

<allow-intent href="maps:*" launch-external="yes" />

我的代码是

window.open('maps://?q=', latLng, '_system');

latLng = 'lat,Lng'

我试过了

'maps:q='
'maps:'
'maps:0, 0?q='
'maps:daddr='
'maps://maps.apple.com/?q='

【问题讨论】:

    标签: javascript ios cordova maps


    【解决方案1】:

    对于 Google 或 Android,您仍应使用网址,它会自动重定向到应用程序,例如:

    https://maps.google.com/maps?daddr=<lat>,<long>&amp;ll=
    

    至于苹果地图,原理相同,只是改变协议:

    maps://maps.google.com/maps?daddr=<lat>,<long>&amp;ll=
    

    【讨论】:

    • 对,对不起。我已经修改了答案
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多