吉安感知网项目-前端
shuishen
2026-01-26 38e3bb79544ed4a18fb61b892d4832cafc83c211
applications/mobile-web-view/src/appComponents/workMap/index.vue
@@ -291,10 +291,11 @@
watch(
   () => mapCurrentDetail,
   newVal => {
const newDataMap=newVal
      // 只有 workNavigationShow 为 true 且有经纬度时才添加标记
      if (workNavigationShow && newVal?.longitude && newVal?.latitude) {
         addIncidentMarker(newVal)
         mapCurrentDetailData.value = newVal
      if (workNavigationShow && newDataMap?.longitude && newDataMap?.latitude) {
         addIncidentMarker(newDataMap)
         mapCurrentDetailData.value = newDataMap
      } else if (!workNavigationShow && incidentMarker) {
         // 当 workNavigationShow 变为 false 时,移除已添加的标记
         markersLayer.removeLayer(incidentMarker)