diff --git a/src/views/oneMap/components/ZHHM.vue b/src/views/oneMap/components/ZHHM.vue index a5d5461..63b8e71 100644 --- a/src/views/oneMap/components/ZHHM.vue +++ b/src/views/oneMap/components/ZHHM.vue @@ -889,16 +889,20 @@ bus.emit("setLayerVisible", { layername: "HMXSX", isCheck: false }); //水系 }; onMounted(() => { - debugger; initEcharts4(); window.addEventListener("resize", initEcharts4); - addProjectionLayer(); - newfiberMapbox.map.easeTo({ - center: [109.488, 36.596], - zoom: 13, - pitch: 55, - }); + //mapBoxVectorLayer.addGeojsonPolygonWithLabel('yanAnPaiShuiArea', yanAnPaiShuiArea); + let initeGLTimer = setInterval(() => { + if (!newfiberMapbox) return; + addProjectionLayer(); + newfiberMapbox.map.easeTo({ + center: [109.488, 36.596], + zoom: 13, + pitch: 55, + }); + clearInterval(initeGLTimer); + }, 100); }); onBeforeUnmount(() => {