flat: 地图

This commit is contained in:
史典卓
2024-10-24 14:42:47 +08:00
parent ba14872e89
commit 7845b6333c
36 changed files with 6301 additions and 5312 deletions

View File

@@ -109,9 +109,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>
<!-- <map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map> -->
</view>
@@ -338,10 +339,17 @@
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)
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;