$('#baidu').attr('href','http://api.map.baidu.com/marker?location=' + lat + ',' + lon + '&title=' + name + '&content=' + address + '&output=html')

    $('#baidu').attr('href','baidumap://map/direction?destination=' + lat + ',' + lon + '|' + name + '&mode=driving')
    $('#gaode').attr('href','https://uri.amap.com/marker?position=' + lon + ',' + lat + '&name=' + name + '&src=mypage&callnative=1')
    // const isIOS = /iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
    // if (isIOS) {
    //     $('#gaode').attr('href','iosamap://navi?sourceApplication=myapp&lat=' + lat + '&lon=' + lon + '&poiname=' + encodeURIComponent(name) + '&dev=0&style=2')
    // } else {
    //     $('#gaode').attr('href','androidamap://navi?sourceApplication=myapp&lat=' + lat + '&lon=' + lon + '&poiname=' + encodeURIComponent(name) + '&dev=0&style=2')
    // }

标签: none

添加新评论