|
@@ -195,6 +195,7 @@
|
|
|
if (Tmap) await this.getMapCenter();
|
|
|
|
|
|
const { Lng, Lat } = this.centreDot || {};
|
|
|
+
|
|
|
let maxIcon = false;
|
|
|
(newArr || []).forEach((el, index) => {
|
|
|
el.maxIcon = false;
|
|
@@ -203,7 +204,7 @@
|
|
|
this.SelectedDot(el, true, 12)
|
|
|
}
|
|
|
const { longitude, latitude, mapTypeIcon } = el;
|
|
|
- if (Lng == el.longitude && Lat == el.latitude) {
|
|
|
+ if (Lng == longitude && Lat == latitude) {
|
|
|
el.maxIcon = true;
|
|
|
maxIcon = true;
|
|
|
};
|
|
@@ -271,10 +272,10 @@
|
|
|
geocode.getLocation(v, (result) => {
|
|
|
if (result.getStatus() == 0) {
|
|
|
let t = '';
|
|
|
- const Address = result.getAddress()
|
|
|
+ const { poi } = result.getAddressComponent()
|
|
|
try {
|
|
|
- if (Address && Address.indexOf('湖北省武汉市') === 0) {
|
|
|
- const lo = Address.split('湖北省武汉市')
|
|
|
+ if (poi && poi.indexOf('湖北省武汉市') === 0) {
|
|
|
+ const lo = poi.split('湖北省武汉市')
|
|
|
lo.forEach((el, index) => {
|
|
|
if (index >= 1) {
|
|
|
t = `${t}${el}`
|
|
@@ -284,7 +285,7 @@
|
|
|
} catch (error) {
|
|
|
//TODO handle the exception
|
|
|
}
|
|
|
- this.centreText = t || Address
|
|
|
+ this.centreText = t || poi
|
|
|
} else {
|
|
|
this.centreText = null
|
|
|
}
|
|
@@ -386,7 +387,6 @@
|
|
|
|
|
|
// 点击地图标注的点位
|
|
|
clickMapSite({ type, target, lnglat, containerPoint }) {
|
|
|
- console.log("type, target, lnglat, containerPoint = ", type, target, lnglat, containerPoint)
|
|
|
const Lng = lnglat.getLng();
|
|
|
const Lat = lnglat.getLat();
|
|
|
this.$emit('handleMapSite', { Lng, Lat })
|
|
@@ -442,7 +442,6 @@
|
|
|
},
|
|
|
|
|
|
initTMap(newValue, oldValue, ownerInstance, instance) {
|
|
|
- console.log('-----1----', newValue)
|
|
|
this.options = newValue
|
|
|
if (newValue.type === 'open' && newValue.apikey) {
|
|
|
if (!window.T) {
|
|
@@ -463,7 +462,6 @@
|
|
|
lat
|
|
|
})
|
|
|
Tmap.addEventListener('click', (e) => {
|
|
|
- console.log("nextPoint", e.lnglat)
|
|
|
this.$ownerInstance.callMethod('nextPoint', e.lnglat)
|
|
|
});
|
|
|
}
|