flat: 地图
This commit is contained in:
@@ -106,9 +106,10 @@
|
||||
工作地址:{{info.address || '暂无'}}
|
||||
</view>
|
||||
<view class="map">
|
||||
<super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
|
||||
<!-- <super-map ref="uMap" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude"
|
||||
:open="true" :zoom="14" :min-zoom="10" :max-zoom="20" @regionchange="show = false" :init="false"
|
||||
:MapUrl="$config.supperMap" :flag-tip="false"></super-map>
|
||||
:MapUrl="$config.supperMap" :flag-tip="false"></super-map> -->
|
||||
<zhuo-tianditu-MultiPoint-Mapper ref="tMap" :api-key="$config.apiKey"></zhuo-tianditu-MultiPoint-Mapper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow!=='0'"></view>
|
||||
@@ -272,6 +273,7 @@
|
||||
this.id = option.id; //消息id
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
onShow: function() {
|
||||
this.showDetail = true
|
||||
this.getData();
|
||||
@@ -316,14 +318,22 @@
|
||||
self.info = res.data.data;
|
||||
self.status = res.data.data.status;
|
||||
self.missionNo = res.data.data.missionNo;
|
||||
self.latitude = self.info.lat;
|
||||
self.longitude = self.info.lon;
|
||||
self.covers[0].latitude = self.info.lat;
|
||||
self.covers[0].longitude = self.info.lon;
|
||||
if (!(self.info.lat && self.info.lat === -1)) {
|
||||
self.$refs.uMap.initMap({
|
||||
lat: self.info.lat,
|
||||
lon: self.info.lon,
|
||||
this.$refs.tMap.open(self.info.lon, self.info.lat)
|
||||
|
||||
// self.latitude = self.info.lat;
|
||||
// self.longitude = self.info.lon;
|
||||
// self.covers[0].latitude = self.info.lat;
|
||||
// self.covers[0].longitude = self.info.lon;
|
||||
if (self.info.lon > 1 && self.info.lat > 1) {
|
||||
self.$nextTick(() => {
|
||||
self.$api.sleep(1000).then(() => {
|
||||
this.$refs.tMap.addFeature([{
|
||||
id: self.info.id,
|
||||
label: self.info.jobName,
|
||||
lat: self.info.lat,
|
||||
lon: self.info.lon,
|
||||
}])
|
||||
})
|
||||
})
|
||||
}
|
||||
self.showDetail = true;
|
||||
|
||||
Reference in New Issue
Block a user