diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index b19cec2..1ee83fd 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -1060,43 +1060,17 @@ ] ] }, - "市民公共文化服务综合体建设": { + "市民公共文化综合体": { "layerName": [ "hn_kf_hm_haimianprojection", "hn_kf_hm_haimianprojection_text" ], "filter": [ [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ], [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ] ] }, diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index b19cec2..1ee83fd 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -1060,43 +1060,17 @@ ] ] }, - "市民公共文化服务综合体建设": { + "市民公共文化综合体": { "layerName": [ "hn_kf_hm_haimianprojection", "hn_kf_hm_haimianprojection_text" ], "filter": [ [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ], [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ] ] }, diff --git a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js index 0676000..1d33bf7 100644 --- a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js +++ b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js @@ -286,7 +286,7 @@ } //添加有标注的geojson面 - static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width) { + static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width, maxzoom) { let labelGeojson = this.getGeojsonCenterPoint(geojson); if (!newfiberMapbox.map.getLayer(layerId)) { newfiberMapbox.map.addSource(layerId, { @@ -301,6 +301,7 @@ id: layerId, type: 'fill', source: layerId, + maxzoom: maxzoom ? maxzoom : 24, paint: { 'fill-color': ['get', 'fillcolor'], }, diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index b19cec2..1ee83fd 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -1060,43 +1060,17 @@ ] ] }, - "市民公共文化服务综合体建设": { + "市民公共文化综合体": { "layerName": [ "hn_kf_hm_haimianprojection", "hn_kf_hm_haimianprojection_text" ], "filter": [ [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ], [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ] ] }, diff --git a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js index 0676000..1d33bf7 100644 --- a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js +++ b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js @@ -286,7 +286,7 @@ } //添加有标注的geojson面 - static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width) { + static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width, maxzoom) { let labelGeojson = this.getGeojsonCenterPoint(geojson); if (!newfiberMapbox.map.getLayer(layerId)) { newfiberMapbox.map.addSource(layerId, { @@ -301,6 +301,7 @@ id: layerId, type: 'fill', source: layerId, + maxzoom: maxzoom ? maxzoom : 24, paint: { 'fill-color': ['get', 'fillcolor'], }, diff --git a/src/views/sponeScreen/projectHM/ProjectDisplay.vue b/src/views/sponeScreen/projectHM/ProjectDisplay.vue index f185734..6d0d933 100644 --- a/src/views/sponeScreen/projectHM/ProjectDisplay.vue +++ b/src/views/sponeScreen/projectHM/ProjectDisplay.vue @@ -142,7 +142,7 @@ features: bufferLine, }; // 项目名称图层 - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('polygonGeojson', polygonGeojson, 12); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('polygonGeojson', polygonGeojson, 12, 50, 17.9); newfiberMapBoxVectorLayer.addGeojsonLineWithLabel('lineGeojson', lineGeojson, 5, 12); newfiberMapBoxVectorLayer.addGeojsonCircleWithLabel('pointGeojson', pointGeojson, 12); if (!newfiberMapbox.map.getLayer('projectBuffer')) { diff --git a/public/static/libs/mapbox/style/HaiMianScreen.json b/public/static/libs/mapbox/style/HaiMianScreen.json index b19cec2..1ee83fd 100644 --- a/public/static/libs/mapbox/style/HaiMianScreen.json +++ b/public/static/libs/mapbox/style/HaiMianScreen.json @@ -1060,43 +1060,17 @@ ] ] }, - "市民公共文化服务综合体建设": { + "市民公共文化综合体": { "layerName": [ "hn_kf_hm_haimianprojection", "hn_kf_hm_haimianprojection_text" ], "filter": [ [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ], [ - "铺装广场", - "普通绿地", - "植草沟", - "雨水收集回用地", - "下沉式绿地", - "雨水花园", - "透水铺装", - "裙房硬质屋面", - "塔楼硬质屋面", - "绿色屋顶", - "塑胶运动场", - "截水沟", - "溢流口", - "玻璃屋面" + "市民公共文化综合体项目" ] ] }, diff --git a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js index 0676000..1d33bf7 100644 --- a/src/views/sponeScreen/gisMF/mapboxVectorLayer.js +++ b/src/views/sponeScreen/gisMF/mapboxVectorLayer.js @@ -286,7 +286,7 @@ } //添加有标注的geojson面 - static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width) { + static addGeojsonPolygonWithLabel(layerId, geojson, minzoom, text_max_width, maxzoom) { let labelGeojson = this.getGeojsonCenterPoint(geojson); if (!newfiberMapbox.map.getLayer(layerId)) { newfiberMapbox.map.addSource(layerId, { @@ -301,6 +301,7 @@ id: layerId, type: 'fill', source: layerId, + maxzoom: maxzoom ? maxzoom : 24, paint: { 'fill-color': ['get', 'fillcolor'], }, diff --git a/src/views/sponeScreen/projectHM/ProjectDisplay.vue b/src/views/sponeScreen/projectHM/ProjectDisplay.vue index f185734..6d0d933 100644 --- a/src/views/sponeScreen/projectHM/ProjectDisplay.vue +++ b/src/views/sponeScreen/projectHM/ProjectDisplay.vue @@ -142,7 +142,7 @@ features: bufferLine, }; // 项目名称图层 - newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('polygonGeojson', polygonGeojson, 12); + newfiberMapBoxVectorLayer.addGeojsonPolygonWithLabel('polygonGeojson', polygonGeojson, 12, 50, 17.9); newfiberMapBoxVectorLayer.addGeojsonLineWithLabel('lineGeojson', lineGeojson, 5, 12); newfiberMapBoxVectorLayer.addGeojsonCircleWithLabel('pointGeojson', pointGeojson, 12); if (!newfiberMapbox.map.getLayer('projectBuffer')) { diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index b96f752..f36e936 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -215,7 +215,7 @@ projectNo: 'GY18', index: 2, lon: 114.3124, - lat: 34.8338, + lat: 34.8341, ssfw: 81613.2, sjjyl: 30.5, sjkzyl: 0, @@ -397,6 +397,7 @@ newfiberMapbox.popup.setLngLat({ lng: xmData.data.lon, lat: xmData.data.lat }); newfiberMapbox.addPopup(newfiberMapbox.popup); xmData.visible = true; + newfiberMapbox.map.moveLayer('polygonGeojson', 'hn_kf_hm_haimianprojection'); // 地图移动过去 newfiberMapbox.map.easeTo({ center: [xmData.data.lon, xmData.data.lat],