"use strict";(self["webpackChunk"]=self["webpackChunk"]||[]).push([[741],{4741:function(t,e,n){n.r(e),n.d(e,{default:function(){return h}});var a=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{height:"1px",width:"100%"},attrs:{id:"mapDiv"}})},i=[],s=(n(1454),{name:"TiandiMap",data(){return{map:null,showRes:!1,dataList:[],mapInfo:{},timer:null}},computed:{},mounted(){this.initMap(),document.addEventListener("UniAppJSBridgeReady",(async function(){this.timer=setInterval((async()=>{this.mapInfo.city?(clearInterval(this.timer),uni.postMessage({data:{title:"天地图",mapInfo:this.mapInfo}})):this.getAddressZh(this.mapInfo.longitude,this.mapInfo.latitude)}),500)}))},methods:{initMap(){this.map=new T.Map("mapDiv");const t=new T.LngLat(116.40969,39.89945);this.map.centerAndZoom(t,12),this.getGeoLocation()},getAddressZh(t,e){this.mapInfo={...this.mapInfo,longitude:t,latitude:e};let n=new T.Geocoder;n.getLocation(new T.LngLat(t,e),(t=>{const e=t.getAddressComponent();this.mapInfo={...this.mapInfo,city:e.city,address:t.getAddress()},uni.postMessage({data:{title:"天地图",mapInfo:this.mapInfo}})}))},getGeoLocation(){const t=new T.Geolocation,e=function(t){0==this.getStatus()&&this.getAddressZh(t.lnglat.lng,t.lnglat.lat),1==this.getStatus()&&this.getAddressZh(t.lnglat.lng,t.lnglat.lat)};t.getCurrentPosition(e)}}}),o=s,d=n(1656),l=(0,d.A)(o,a,i,!1,null,"625d6a8e",null),h=l.exports}}]); //# sourceMappingURL=741.5507f98c.js.map