From 919596422fd359e62a8b224d1321c13d843c2fae Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 06 Dec 2023 16:07:03 +0800
Subject: [PATCH] pc端,导航逻辑梳理
---
src/components/map/index.vue | 54 +++++++++++++++++++++++++++++++-----------------------
1 files changed, 31 insertions(+), 23 deletions(-)
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index 90b5bea..ea0be1c 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -61,6 +61,7 @@
],
polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp'
},
+
{
key: 2,
tileUrl: "https://dev.jxpskj.com:8023/arcgis156/rest/services/cc/MapServer/tile/{z}/{y}/{x}",
@@ -203,7 +204,8 @@
'orgNavBarFlag',
'arcNavBarFlag',
'searchPopupFlag',
- 'calenderShow'
+ 'calenderShow',
+ 'closeMapClick'
])
},
@@ -214,14 +216,17 @@
that.map2D.on('pointermove', that.mouseMoveEvent)
this.map2D.on("singleclick", function (event) {
+ if (that.closeMapClick) return
+
let flag = true
+
that.map2D.forEachFeatureAtPixel(
event.pixel,
(feature) => {
if (flag == false) {
return
}
- if (feature.values_.type == 'point') {
+ if (feature.values_.type == 'point' || feature.values_.type == 'navigationPoint') {
flag = false
}
@@ -279,6 +284,8 @@
let flag = true
var that = this
+ if (that.closeMapClick) return
+
if (select != null && select.values_.type == 'polygon') {
select.setStyle(new Style({
@@ -298,13 +305,13 @@
return
}
- if (feature.values_.type == 'point') {
+ if (feature.values_.type == 'point' || feature.values_.type == 'navigationPoint') {
flag = false
return
}
- if (select != null) {
- if (feature != select) {
+ if (feature.values_.type == 'polygon') {
+ if (select != null && feature != select) {
select.setStyle(new Style({
fill: new Fill({
@@ -315,26 +322,27 @@
select = null
}
+
+ if (select == null) {
+ select = feature
+
+ select.setStyle(
+ new Style({
+
+ fill: new Fill({
+ color: 'rgba(108, 245, 113, 0.6)'
+ }),
+
+ stroke: new Stroke({
+ color: 'rgba(3, 255, 13, 1)',
+ width: 1,
+ }),
+
+ })
+ )
+ }
}
- if (select == null) {
- select = feature
-
- select.setStyle(
- new Style({
-
- fill: new Fill({
- color: 'rgba(108, 245, 113, 0.6)'
- }),
-
- stroke: new Stroke({
- color: 'rgba(3, 255, 13, 1)',
- width: 1,
- }),
-
- })
- )
- }
}
)
},
--
Gitblit v1.9.3