操屁眼的视频在线免费看,日本在线综合一区二区,久久在线观看免费视频,欧美日韩精品久久综

新聞資訊

    之前在微信企業(yè)號開發(fā):微信考勤中使用了百度地圖的定位組件,但發(fā)現(xiàn)在部分手機上會出現(xiàn)定位失敗的提示,于是有研究了一下百度地圖。原來使用的Web組件百度不打算更新了,也是重新查了一下百度地圖的其他API,還有一個 API大眾版微信小程序調(diào)鏈接地圖,于是試了試微信小程序調(diào)鏈接地圖,沒想到竟然解決了。

    核心代碼很簡單:

    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=kkkk"></script> <script type="text/javascript">

    微信小程序共享鏈返現(xiàn)_支付寶小程序和微信小程序_微信小程序調(diào)鏈接地圖

    // 百度地圖API功能 var map = new BMap.Map("allmap"); var circle = new BMap.Geolocation(); circle.getCurrentPosition(locationResult); // map.addOverlay(circle);

    微信小程序調(diào)鏈接地圖_支付寶小程序和微信小程序_微信小程序共享鏈返現(xiàn)

    function locationResult(geolocationResult) { var Status = this.getStatus() if (Status == 0)//檢索成功。對應(yīng)數(shù)值“0”。 { $("#lng").val(geolocationResult.point.lng);

    支付寶小程序和微信小程序_微信小程序調(diào)鏈接地圖_微信小程序共享鏈返現(xiàn)

    $("#lat").val(geolocationResult.point.lat); var address = geolocationResult.address; $("#city").val(address.city); $("#district").val(address.district); $("#street").val(address.street);

    支付寶小程序和微信小程序_微信小程序調(diào)鏈接地圖_微信小程序共享鏈返現(xiàn)

    $("#address").val(address.province + address.city + address.district + address.street + address.street_number); } else { alert("定位失敗錯誤碼" + Status) }

    微信小程序調(diào)鏈接地圖_支付寶小程序和微信小程序_微信小程序共享鏈返現(xiàn)

    } </script>

    實現(xiàn)效果

    以上內(nèi)容給大家分享的微信企業(yè)公眾號開發(fā)之微信考勤百度地圖定位,代碼簡單易懂,需要的朋友快來學(xué)習(xí)吧。

網(wǎng)站首頁   |    關(guān)于我們   |    公司新聞   |    產(chǎn)品方案   |    用戶案例   |    售后服務(wù)   |    合作伙伴   |    人才招聘   |   

友情鏈接: 餐飲加盟

地址:北京市海淀區(qū)    電話:010-     郵箱:@126.com

備案號:冀ICP備2024067069號-3 北京科技有限公司版權(quán)所有