diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/project.config.json b/public/config/project.config.json index 4021326..7c4ca91 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -2,8 +2,8 @@ "title": "管网运行监测系统", "subtitle": "", "theme":"blue", - "baseUrl": "http://60.208.121.150:5001/", - "wsUrl": "ws://60.208.121.150:5001/websocket/", + "baseUrl": "http://11.100.6.182:5001/", + "wsUrl": "ws://11.100.6.182:5001/websocket/", "mainPage": "http://111.198.10.15:11404/dcms/#", "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", @@ -17,5 +17,5 @@ "provinceCode":"360000", "cityCode":"361000", "areaCode":"361024", - "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/zq_publish/MapServer/" + "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/gztest/MapServer/" } diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/project.config.json b/public/config/project.config.json index 4021326..7c4ca91 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -2,8 +2,8 @@ "title": "管网运行监测系统", "subtitle": "", "theme":"blue", - "baseUrl": "http://60.208.121.150:5001/", - "wsUrl": "ws://60.208.121.150:5001/websocket/", + "baseUrl": "http://11.100.6.182:5001/", + "wsUrl": "ws://11.100.6.182:5001/websocket/", "mainPage": "http://111.198.10.15:11404/dcms/#", "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", @@ -17,5 +17,5 @@ "provinceCode":"360000", "cityCode":"361000", "areaCode":"361024", - "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/zq_publish/MapServer/" + "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/gztest/MapServer/" } diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" index b5f36b5..72894cd 100644 --- "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" +++ "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" Binary files differ diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/project.config.json b/public/config/project.config.json index 4021326..7c4ca91 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -2,8 +2,8 @@ "title": "管网运行监测系统", "subtitle": "", "theme":"blue", - "baseUrl": "http://60.208.121.150:5001/", - "wsUrl": "ws://60.208.121.150:5001/websocket/", + "baseUrl": "http://11.100.6.182:5001/", + "wsUrl": "ws://11.100.6.182:5001/websocket/", "mainPage": "http://111.198.10.15:11404/dcms/#", "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", @@ -17,5 +17,5 @@ "provinceCode":"360000", "cityCode":"361000", "areaCode":"361024", - "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/zq_publish/MapServer/" + "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/gztest/MapServer/" } diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" index b5f36b5..72894cd 100644 --- "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" +++ "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" Binary files differ diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\2502.png" "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" new file mode 100644 index 0000000..b5f36b5 --- /dev/null +++ "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" Binary files differ diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/project.config.json b/public/config/project.config.json index 4021326..7c4ca91 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -2,8 +2,8 @@ "title": "管网运行监测系统", "subtitle": "", "theme":"blue", - "baseUrl": "http://60.208.121.150:5001/", - "wsUrl": "ws://60.208.121.150:5001/websocket/", + "baseUrl": "http://11.100.6.182:5001/", + "wsUrl": "ws://11.100.6.182:5001/websocket/", "mainPage": "http://111.198.10.15:11404/dcms/#", "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", @@ -17,5 +17,5 @@ "provinceCode":"360000", "cityCode":"361000", "areaCode":"361024", - "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/zq_publish/MapServer/" + "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/gztest/MapServer/" } diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" index b5f36b5..72894cd 100644 --- "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" +++ "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" Binary files differ diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\2502.png" "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" new file mode 100644 index 0000000..b5f36b5 --- /dev/null +++ "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" Binary files differ diff --git "a/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" "b/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" new file mode 100644 index 0000000..6efac42 --- /dev/null +++ "b/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" Binary files differ diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/project.config.json b/public/config/project.config.json index 4021326..7c4ca91 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -2,8 +2,8 @@ "title": "管网运行监测系统", "subtitle": "", "theme":"blue", - "baseUrl": "http://60.208.121.150:5001/", - "wsUrl": "ws://60.208.121.150:5001/websocket/", + "baseUrl": "http://11.100.6.182:5001/", + "wsUrl": "ws://11.100.6.182:5001/websocket/", "mainPage": "http://111.198.10.15:11404/dcms/#", "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", @@ -17,5 +17,5 @@ "provinceCode":"360000", "cityCode":"361000", "areaCode":"361024", - "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/zq_publish/MapServer/" + "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/gztest/MapServer/" } diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" index b5f36b5..72894cd 100644 --- "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" +++ "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" Binary files differ diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\2502.png" "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" new file mode 100644 index 0000000..b5f36b5 --- /dev/null +++ "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" Binary files differ diff --git "a/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" "b/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" new file mode 100644 index 0000000..6efac42 --- /dev/null +++ "b/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" Binary files differ diff --git a/src/components/Mars3D/utils/GeoJsonLayer.js b/src/components/Mars3D/utils/GeoJsonLayer.js index 4c8f784..2a822c9 100644 --- a/src/components/Mars3D/utils/GeoJsonLayer.js +++ b/src/components/Mars3D/utils/GeoJsonLayer.js @@ -225,3 +225,49 @@ }) return layer3D } + + +export async function createModelLayerAsync(index, name, model = '', scale, condition) { + const queryServer = new mars3d.query.QueryArcServer({ + url: Vue.prototype.baseConfig.arcgisUrl + index, + popup: 'all', + pageSize: 8000 + }) + const layer3D = new mars3d.layer.GraphicLayer({ + name: name + }).bindPopup(function(event) { + const attr = event.graphic.attr || {} + return mars3d.Util.getTemplateHtml({ template: 'all', attr: attr }) + }) + window.map.addLayer(layer3D) + layer3D.show = false + await queryServer.query({ + where: condition, + success: (result) => { + if (result.count === 0) { + console.log('未查询到相关记录!') + } + if (model !== '') { + const points = [] + result.geojson.features.forEach(item => { + points.push({ + position: [item.geometry.coordinates[0], item.geometry.coordinates[1], 0], + style: { + scale: scale + }, + attr: item.properties + }) + }) + const modelCombine = new mars3d.graphic.ModelCombine({ + url: model, + instances: points + }) + layer3D.addGraphic(modelCombine) + } + }, + error: (error, msg) => { + console.log('服务访问错误,' + error) + } + }) + return layer3D +} diff --git a/public/config/mars3dConfig.json b/public/config/mars3dConfig.json index 7752593..498d918 100644 --- a/public/config/mars3dConfig.json +++ b/public/config/mars3dConfig.json @@ -1,7 +1,7 @@ { "scene": { "center": { - "lat": "36.48", "lng": "117.48", "alt": 20000, "heading": 360, "pitch": -45 + "lat": "25.675", "lng": "114.875", "alt": 10000, "heading": 360, "pitch": -45 }, "requestRenderMode": true, "showSun": false, @@ -60,25 +60,5 @@ "key": ["216ee92889e17ab1b083fae665d522b8"], "show": true } - ], - "layers": [ - { - "type": "geojson", - "id": "building", - "url": "http://111.198.10.15:11404/3d/zqBuilding.json", - "symbol": { - "type": "polygonP", - "styleOptions": { - "color": "rgb(52,125,246)", - "outline": false, - "opacity": 0.8 - } - }, - "buildings": { - "height": 100 - }, - "popup": "{name}", - "show": true - } ] } diff --git a/public/config/project.config.json b/public/config/project.config.json index 4021326..7c4ca91 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -2,8 +2,8 @@ "title": "管网运行监测系统", "subtitle": "", "theme":"blue", - "baseUrl": "http://60.208.121.150:5001/", - "wsUrl": "ws://60.208.121.150:5001/websocket/", + "baseUrl": "http://11.100.6.182:5001/", + "wsUrl": "ws://11.100.6.182:5001/websocket/", "mainPage": "http://111.198.10.15:11404/dcms/#", "amapSecurityCode": "182a2c5889f7fe6d90546d9b8f4781ad", "amapKey": "1733551f35b56f6d8e9c0a9d4c2523b", @@ -17,5 +17,5 @@ "provinceCode":"360000", "cityCode":"361000", "areaCode":"361024", - "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/zq_publish/MapServer/" + "arcgisUrl": "http://111.198.10.15:13002/arcgis/rest/services/gztest/MapServer/" } diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" index b5f36b5..72894cd 100644 --- "a/public/static/images/\346\240\207\350\257\206\345\231\250.png" +++ "b/public/static/images/\346\240\207\350\257\206\345\231\250.png" Binary files differ diff --git "a/public/static/images/\346\240\207\350\257\206\345\231\2502.png" "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" new file mode 100644 index 0000000..b5f36b5 --- /dev/null +++ "b/public/static/images/\346\240\207\350\257\206\345\231\2502.png" Binary files differ diff --git "a/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" "b/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" new file mode 100644 index 0000000..6efac42 --- /dev/null +++ "b/public/static/images/\346\266\210\351\230\262\346\240\223\351\230\262\347\233\227\346\260\264\347\233\221\346\265\213\344\273\252.png" Binary files differ diff --git a/src/components/Mars3D/utils/GeoJsonLayer.js b/src/components/Mars3D/utils/GeoJsonLayer.js index 4c8f784..2a822c9 100644 --- a/src/components/Mars3D/utils/GeoJsonLayer.js +++ b/src/components/Mars3D/utils/GeoJsonLayer.js @@ -225,3 +225,49 @@ }) return layer3D } + + +export async function createModelLayerAsync(index, name, model = '', scale, condition) { + const queryServer = new mars3d.query.QueryArcServer({ + url: Vue.prototype.baseConfig.arcgisUrl + index, + popup: 'all', + pageSize: 8000 + }) + const layer3D = new mars3d.layer.GraphicLayer({ + name: name + }).bindPopup(function(event) { + const attr = event.graphic.attr || {} + return mars3d.Util.getTemplateHtml({ template: 'all', attr: attr }) + }) + window.map.addLayer(layer3D) + layer3D.show = false + await queryServer.query({ + where: condition, + success: (result) => { + if (result.count === 0) { + console.log('未查询到相关记录!') + } + if (model !== '') { + const points = [] + result.geojson.features.forEach(item => { + points.push({ + position: [item.geometry.coordinates[0], item.geometry.coordinates[1], 0], + style: { + scale: scale + }, + attr: item.properties + }) + }) + const modelCombine = new mars3d.graphic.ModelCombine({ + url: model, + instances: points + }) + layer3D.addGraphic(modelCombine) + } + }, + error: (error, msg) => { + console.log('服务访问错误,' + error) + } + }) + return layer3D +} diff --git a/src/views/overview/overview3d.vue b/src/views/overview/overview3d.vue index 84b9615..12a2eea 100644 --- a/src/views/overview/overview3d.vue +++ b/src/views/overview/overview3d.vue @@ -3,8 +3,8 @@