diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 27f5cef..6d840eb 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -101,21 +101,22 @@ 'builtCity', 'kaifengAllAreaBoundary', ]); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('kaifengAllArea', kaifengAllArea); - newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllWater', kaifengAllWater, ['get', 'lineWidth']); - newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllAreaBoundary', kaifengAllAreaBoundary); - newfiberMapBoxVectorLayer.addGeojsonLabel('kaifengAllAreaLabel', kaifengAllAreaLabel, ['get', 'textsize'], ['get', 'textmaxwidth']); bus.emit('setIniteLayer', [ { layername: 'topography', show: true, }, ]); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('kaifengAllArea', kaifengAllArea); + newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllWater', kaifengAllWater, ['get', 'lineWidth']); + newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllAreaBoundary', kaifengAllAreaBoundary); + newfiberMapBoxVectorLayer.addGeojsonLabel('kaifengAllAreaLabel', kaifengAllAreaLabel, ['get', 'textsize'], ['get', 'textmaxwidth']); newfiberMapbox.map.easeTo({ - center: [114.522, 34.782], - zoom: 8.8, + center: [114.502, 34.732], + zoom: 9, pitch: 30, }); + newfiberMapbox.map.setMinZoom(9); }; const showCenterCity = () => { bus.emit('checkLandXDM', false); @@ -137,7 +138,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -154,6 +155,7 @@ zoom: 10.4, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; const showBuiltCity = () => { bus.emit('checkLandXDM', false); @@ -175,7 +177,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -193,14 +195,7 @@ zoom: 10.4, pitch: 30, }); - // newfiberMap.setCenter({ - // lng: 114.312, - // lat: 34.262, - // heading: 2.281299097855777, - // zoom: 42358.12942752382, - // pitch: -35.2508969308367, - // roll: 0.005453465256790101, - // }); + newfiberMapbox.map.setMinZoom(0); }; const showOneCenterLayer = () => { bus.emit('checkLandXDM', false); @@ -215,7 +210,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -236,6 +231,7 @@ zoom: 10.7, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; const setLayerVisible = () => { bus.emit('checkLandXDM', true); @@ -255,7 +251,13 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', + ]); + bus.emit('setIniteLayer', [ + { + layername: 'topography', + show: true, + }, ]); // newfiberMap.removeByIds(['oneCenter']); // if (!newfiberMap.xdmWms) { @@ -270,6 +272,7 @@ // imageryProvider.show = !!!imageryProvider.show; // if (wmsVisibility.value) { newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'visible'); + newfiberMapbox.map.setMinZoom(0); // } else { // newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); // } diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 27f5cef..6d840eb 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -101,21 +101,22 @@ 'builtCity', 'kaifengAllAreaBoundary', ]); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('kaifengAllArea', kaifengAllArea); - newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllWater', kaifengAllWater, ['get', 'lineWidth']); - newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllAreaBoundary', kaifengAllAreaBoundary); - newfiberMapBoxVectorLayer.addGeojsonLabel('kaifengAllAreaLabel', kaifengAllAreaLabel, ['get', 'textsize'], ['get', 'textmaxwidth']); bus.emit('setIniteLayer', [ { layername: 'topography', show: true, }, ]); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('kaifengAllArea', kaifengAllArea); + newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllWater', kaifengAllWater, ['get', 'lineWidth']); + newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllAreaBoundary', kaifengAllAreaBoundary); + newfiberMapBoxVectorLayer.addGeojsonLabel('kaifengAllAreaLabel', kaifengAllAreaLabel, ['get', 'textsize'], ['get', 'textmaxwidth']); newfiberMapbox.map.easeTo({ - center: [114.522, 34.782], - zoom: 8.8, + center: [114.502, 34.732], + zoom: 9, pitch: 30, }); + newfiberMapbox.map.setMinZoom(9); }; const showCenterCity = () => { bus.emit('checkLandXDM', false); @@ -137,7 +138,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -154,6 +155,7 @@ zoom: 10.4, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; const showBuiltCity = () => { bus.emit('checkLandXDM', false); @@ -175,7 +177,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -193,14 +195,7 @@ zoom: 10.4, pitch: 30, }); - // newfiberMap.setCenter({ - // lng: 114.312, - // lat: 34.262, - // heading: 2.281299097855777, - // zoom: 42358.12942752382, - // pitch: -35.2508969308367, - // roll: 0.005453465256790101, - // }); + newfiberMapbox.map.setMinZoom(0); }; const showOneCenterLayer = () => { bus.emit('checkLandXDM', false); @@ -215,7 +210,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -236,6 +231,7 @@ zoom: 10.7, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; const setLayerVisible = () => { bus.emit('checkLandXDM', true); @@ -255,7 +251,13 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', + ]); + bus.emit('setIniteLayer', [ + { + layername: 'topography', + show: true, + }, ]); // newfiberMap.removeByIds(['oneCenter']); // if (!newfiberMap.xdmWms) { @@ -270,6 +272,7 @@ // imageryProvider.show = !!!imageryProvider.show; // if (wmsVisibility.value) { newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'visible'); + newfiberMapbox.map.setMinZoom(0); // } else { // newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); // } diff --git a/src/views/sponeScreen/cityGK/cityplanning.vue b/src/views/sponeScreen/cityGK/cityplanning.vue index d72d313..9b48860 100644 --- a/src/views/sponeScreen/cityGK/cityplanning.vue +++ b/src/views/sponeScreen/cityGK/cityplanning.vue @@ -221,6 +221,7 @@ zoom: 10.4, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 27f5cef..6d840eb 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -101,21 +101,22 @@ 'builtCity', 'kaifengAllAreaBoundary', ]); - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('kaifengAllArea', kaifengAllArea); - newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllWater', kaifengAllWater, ['get', 'lineWidth']); - newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllAreaBoundary', kaifengAllAreaBoundary); - newfiberMapBoxVectorLayer.addGeojsonLabel('kaifengAllAreaLabel', kaifengAllAreaLabel, ['get', 'textsize'], ['get', 'textmaxwidth']); bus.emit('setIniteLayer', [ { layername: 'topography', show: true, }, ]); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('kaifengAllArea', kaifengAllArea); + newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllWater', kaifengAllWater, ['get', 'lineWidth']); + newfiberMapBoxVectorLayer.addGeojsonLine('kaifengAllAreaBoundary', kaifengAllAreaBoundary); + newfiberMapBoxVectorLayer.addGeojsonLabel('kaifengAllAreaLabel', kaifengAllAreaLabel, ['get', 'textsize'], ['get', 'textmaxwidth']); newfiberMapbox.map.easeTo({ - center: [114.522, 34.782], - zoom: 8.8, + center: [114.502, 34.732], + zoom: 9, pitch: 30, }); + newfiberMapbox.map.setMinZoom(9); }; const showCenterCity = () => { bus.emit('checkLandXDM', false); @@ -137,7 +138,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -154,6 +155,7 @@ zoom: 10.4, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; const showBuiltCity = () => { bus.emit('checkLandXDM', false); @@ -175,7 +177,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -193,14 +195,7 @@ zoom: 10.4, pitch: 30, }); - // newfiberMap.setCenter({ - // lng: 114.312, - // lat: 34.262, - // heading: 2.281299097855777, - // zoom: 42358.12942752382, - // pitch: -35.2508969308367, - // roll: 0.005453465256790101, - // }); + newfiberMapbox.map.setMinZoom(0); }; const showOneCenterLayer = () => { bus.emit('checkLandXDM', false); @@ -215,7 +210,7 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); bus.emit('setIniteLayer', [ // { @@ -236,6 +231,7 @@ zoom: 10.7, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; const setLayerVisible = () => { bus.emit('checkLandXDM', true); @@ -255,7 +251,13 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', + ]); + bus.emit('setIniteLayer', [ + { + layername: 'topography', + show: true, + }, ]); // newfiberMap.removeByIds(['oneCenter']); // if (!newfiberMap.xdmWms) { @@ -270,6 +272,7 @@ // imageryProvider.show = !!!imageryProvider.show; // if (wmsVisibility.value) { newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'visible'); + newfiberMapbox.map.setMinZoom(0); // } else { // newfiberMapbox.map.setLayoutProperty('hn_kf_hm_dltb', 'visibility', 'none'); // } diff --git a/src/views/sponeScreen/cityGK/cityplanning.vue b/src/views/sponeScreen/cityGK/cityplanning.vue index d72d313..9b48860 100644 --- a/src/views/sponeScreen/cityGK/cityplanning.vue +++ b/src/views/sponeScreen/cityGK/cityplanning.vue @@ -221,6 +221,7 @@ zoom: 10.4, pitch: 30, }); + newfiberMapbox.map.setMinZoom(0); }; diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 79d6872..711d464 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -76,8 +76,9 @@ 'kaifengAllWater', 'kaifengAllAreaLabel', 'builtCity', - 'kaifengAllAreaBoundary' + 'kaifengAllAreaBoundary', ]); + newfiberMapbox.map.setMinZoom(0); //显示河湖标注 newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel1', 'visibility', 'visible'); newfiberMapbox.map.setLayoutProperty('kaifengWaterLabel2', 'visibility', 'visible');