This commit is contained in:
zk
2023-12-14 09:23:58 +08:00
parent 825d10fc35
commit d614f10bb5
25 changed files with 826 additions and 558 deletions
+13 -10
View File
@@ -41,11 +41,11 @@ export const Map = {
* @desc 中国外层边界线
*/,
drawOutLine() {
let geojson = new AMap.GeoJSON({
let geoJson = new AMap.GeoJSON({
geoJSON: china,
getPolygon: function (geojson, lnglats) {
getPolygon: function (geoJson, lngLats) {
return new AMap.Polyline({
path: lnglats[0],
path: lngLats[0],
strokeColor: '#6ccffe',
strokeWeight: 3,
lineJoin: 'round', //折线拐点的绘制样式
@@ -55,22 +55,22 @@ export const Map = {
});
},
});
this.map.add(geojson);
this.map.add(geoJson);
} /**
* @desc 中国内层边界线
*/,
drawInnerLine() {
let geojson = new AMap.GeoJSON({
let geoJson = new AMap.GeoJSON({
geoJSON: chinaInner,
getPolygon: function (geojson, lnglats) {
getPolygon: function (geoJson, lngLats) {
return new AMap.Polyline({
path: lnglats[0],
path: lngLats[0],
strokeColor: '#359de5',
strokeWeight: 1,
});
},
});
this.map.add(geojson);
this.map.add(geoJson);
}, // 清空当前地图上除了边界线的覆盖物
removeOverlayGroup() {
this.clearAircraft();
@@ -92,7 +92,10 @@ export const Map = {
this.removeOverlayGroup();
this.overlayGroup = new AMap.OverlayGroup();
for (let i = 0; i < result.length; i++) {
let { type, lon, lat } = result[i];
let { type, lon, lat, lng } = result[i];
if (lng) {
lon = lng;
}
if (!lon || !lat || !type) {
continue;
}
@@ -231,7 +234,7 @@ export const Map = {
label: {
content: `<div class="alarm-content" >
<div>${option?.realName},${option?.eventType_dictText}</div>
</div>`,
</div>`,
offset: new AMap.Pixel(0, -9),
direction: 'top',
},