manifest.json
"permission" : {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序定位"
}
},
"plugins": {
"subway": {
"version": "1.0.1",
"provider": "wx50b5593e81dd937a"
}
},
使用:
let plugin = requirePlugin('routePlan');
let key = 'xxx'; //使用在腾讯位置服务申请的key
let referer = 'xx'; //调用插件的app的名称
let endPoint = JSON.stringify({ //终点
'name': '北京西站',
'latitude': 39.894806,
'longitude': 116.321592
});
wx.navigateTo({
url: 'plugin://routePlan/index?key=' + key + '&referer=' + referer + '&endPoint=' + endPoint
});
报错
thirdScriptError
Plugin "routePlan" has not registered.; [Component] Event Handler Error @ pages/index/index#bound handleProxy
Error: Plugin "routePlan" has not registered.