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
+10 -7
View File
@@ -1,4 +1,4 @@
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon7 } from '/@/components/chinaMap/chinaHooks.ts';
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon5, mapIcon7 } from '/@/components/chinaMap/chinaHooks.ts';
import { watchIcon } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import * as turf from '@turf/turf';
@@ -27,7 +27,7 @@ export function typeToIcon(type: string, centerResource: boolean) {
return createIcon({ icon: mapIcon1, iconSize, imageSize });
}
if (type == '2') {
return createIcon({ icon: mapIcon4, iconSize, imageSize });
return createIcon({ icon: mapIcon5, iconSize, imageSize });
}
//关联医疗点
if (type == '3' && centerResource) {
@@ -69,14 +69,17 @@ export function createCircle(option) {
export function getLonLat(result = []) {
let arr = [];
for (let i = 0; i < result.length; i++) {
let { lon, lat, lng } = result[i];
if (lng) {
lon = lng;
let { lon, lat, lng, longitude, latitude } = result[i];
if (longitude) {
lon = longitude;
}
if (!lon || !lat) {
if (latitude) {
lat = latitude;
}
if (!longitude || !latitude) {
continue;
}
let point = turf.point([lon, lat]);
let point = turf.point([lon * 1, lat * 1]);
arr.push(point);
}
return arr;