| | |
| | | <span>纬度:</span> |
| | | <el-input class="mapLocation_latlng_input" id="lat" v-model.trim="state.latitude" @change="getAdress"></el-input> |
| | | </div> |
| | | <div class="mapLocation_latlng"> |
| | | <span>地址:</span> |
| | | <el-input class="mapLocation_latlng_input" id="lat" v-model.trim="state.BAddress"></el-input> |
| | | </div> |
| | | <!-- <div class="mapLocation_latlng">--> |
| | | <!-- <span>地址:</span>--> |
| | | <!-- <el-input class="mapLocation_latlng_input" id="lat" v-model.trim="state.BAddress"></el-input>--> |
| | | <!-- </div>--> |
| | | |
| | | </div> |
| | | <div class="mapLocation_body"> |
| | | <baidu-map class="map" @ready="getAdress" ak="BkZdiHBj9aGrMdVFM48r2njNiMzsekga" v="3.0" type="API" :center="state.center" :zoom="state.zoom" scroll-wheel-zoom @click="getPosition"> |
| | | <baidu-map class="map" @ready="getAdress" ak="oF71jf1ELX29VmdqXBBNveZ7DevpqsuI" v="3.0" type="API" :center="state.center" :zoom="state.zoom" scroll-wheel-zoom @click="getPosition"> |
| | | <!-- <div style="position: absolute;z-index: 999;margin-top: -495px">--> |
| | | <!-- <label>搜索:<input v-model="state.keyword"></label>--> |
| | | <!-- <bm-local-search--> |
| | |
| | | } |
| | | const myGeo = ref(null) |
| | | const getAdress = () => { |
| | | myGeo.value = new BMap.Geocoder(); |
| | | const pt = new BMap.Point(state.longitude, state.latitude); |
| | | myGeo.value.getLocation(pt,function(result){ |
| | | state.BAddress = result.address; //获取到当前定位的详细地址信息 |
| | | }, |
| | | { enableHighAccuracy: true } |
| | | ); |
| | | // myGeo.value = new BMap.Geocoder(); |
| | | // const pt = new BMap.Point(state.longitude, state.latitude); |
| | | // myGeo.value.getLocation(pt,function(result){ |
| | | // state.BAddress = result.address; //获取到当前定位的详细地址信息 |
| | | // }, |
| | | // { enableHighAccuracy: true } |
| | | // ); |
| | | } |
| | | const handleClose = () => { |
| | | state.longitude = '' |