(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b84803e8"],{"05e3":function(t,e,a){},"6cf7":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ids-map-site"},[e("div",{staticClass:"ids-text-center"},[e("span",[t._v("地图坐标(")]),e("span",[t._v("经度:"+t._s(t.amapGPS.longitude)+",")]),e("span",[t._v("维度:"+t._s(t.amapGPS.latitude)+")")])]),e("div",{staticClass:"ids-text-center"},[e("span",[t._v("GPS坐标(")]),e("span",[t._v("经度:"+t._s(t.gps.longitude)+",")]),e("span",[t._v("维度:"+t._s(t.gps.latitude)+")")])]),e("div",{staticStyle:{width:"100%",height:"100%}"},attrs:{id:"map-container"}})])},i=[],l=a("de51"),s=a("0af3"),c=a("4532"),o=a("c7ac"),r={name:"iDS-MapSite",data:function(){return{amapGPS:{longitude:0,latitude:0},gps:{longitude:0,latitude:0},marker:null,circleMarker:null}},computed:{width:function(){return document.getElementsByClassName("content")[0].offsetWidth+"px"},height:function(){return document.getElementsByClassName("content")[0].offsetHeight-36+"px"}},methods:{addClickEvent:function(t){for(var e in t)switch(t[e].title){case"定位":t[e].func=this.mAddLocation;break}return t},mAddLocation:function(){},mapInit:function(){var t=this,e=new window.AMap.Map("map-container",{resizeEnable:!0,zoom:18,center:o["a"].map.getMapInitCenter()});e.on("click",(function(e){t.amapGPS.longitude=e.lnglat.getLng(),t.amapGPS.latitude=e.lnglat.getLat();var a=Object(l["a"])(e.lnglat.getLng(),e.lnglat.getLat());t.gps.longitude=a.longitude,t.gps.latitude=a.latitude,t.marker.setPosition(e.lnglat),t.circleMarker.setCenter(e.lnglat)})),null!=this.marker&&e.remove(this.marker),this.marker=new window.AMap.Marker({position:new window.AMap.LngLat(this.amapGPS.longitude,this.amapGPS.latitude),title:"工地"}),e.add(this.marker),null!=this.circleMarker&&this.circleMarker.setMap(null),this.circleMarker=new window.AMap.Circle({center:[0,0],radius:50,strokeColor:"white",strokeWeight:2,strokeOpacity:.5,fillColor:"rgba(254,162,90,1)",fillOpacity:.5,zIndex:10,bubble:!0,cursor:"pointer",clickable:!0}),this.circleMarker.setMap(e)},changeView:function(){c["a"].vm.setTitle("工地定位"),c["a"].vm.setBackDisabled(!1),c["a"].vm.setBackIcon("arrow_back"),c["a"].vm.setBottomNavVisible(!1),c["a"].vm.setBottomBtn({value:this.addClickEvent(s["a"]["location"])}),c["a"].vm.setBottomBtnVisible(!0),c["a"].vm.setContentHeight({value:"calc(".concat(window.innerHeight,"px - 48px - 36px ")+")"})}},created:function(){null!=c["a"].vm.getUserToken()&&null!=c["a"].vm.getUserId()?this.changeView():window.location.href="/"},mounted:function(){var t=this;o["a"].map.g_loadAMapMapJSAPI((function(){t.mapInit()}))}},u=r,d=(a("bc2c"),a("2877")),p=Object(d["a"])(u,n,i,!1,null,null,null);e["default"]=p.exports},bc2c:function(t,e,a){"use strict";a("05e3")}}]);