update: 新疆大屏

This commit is contained in:
xf
2025-07-06 15:04:39 +08:00
parent 22c5b89f90
commit 86ed8341e2
30 changed files with 984 additions and 151 deletions
+11 -7
View File
@@ -144,11 +144,15 @@ export const Map = {
this.setZoomCenter(center, zoom);
}
for (let i = 0; i < result.length; i++) {
let { type, lon, lat, lng, centerResource } = result[i];
if (lng) {
lon = lng;
let { type, lon, lat, longitude, latitude, lng, centerResource } = result[i];
if (longitude) {
lon = longitude;
}
if (!lon || !lat || !type) {
if (latitude) {
lat = latitude;
}
if (!longitude || !latitude || !type) {
continue;
}
// 创建一个 Icon
@@ -310,10 +314,10 @@ export const Map = {
*
* */
createInfoModal({ option, content }) {
let { lat, lng } = option;
let { latitude, longitude } = option;
this.infoWindow = new AMap.InfoWindow({
position: [lng, lat],
offset: new AMap.Pixel(-5, -25),
position: [longitude, latitude],
offset: new AMap.Pixel(-8, -25),
content: content,
closeWhenClickMap: true,
});