src/api/api.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/assets/js/rpc.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
static/polyline.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/api.js
@@ -6,26 +6,31 @@ // } //企业地址库查询 export function ent_selectByName(params) { return service.get( "/ent/selectByName?name=" + params ); return service.get("/ent/selectByName?name=" + params); } //园区地址库查询 export function liushisijiayuanqudizhibianmafuwu(params) { return request.get( "/gisserver/rest/services/Locators/liushisijiayuanqudizhibianmafuwu/GeocodeServer/findAddressCandidates?singleLine=" + params // "/gisserver/rest/services/Locators/liushisijiayuanqudizhibianmafuwu/GeocodeServer/findAddressCandidates?singleLine=" + params // '/gisserver/wfsserver/liushisijiayuanqu1005?version=1.3.0&request=GetFeature&typename=64jiayuanqujibenqingkuang&propertyname=*&filter=%3CFilter%3E%3CPropertyIsLike+wildCard%3D%22*%22%3E%3CPropertyName%3EYQmingchen%3C%2FPropertyName%3E%3CLiteral%3E*%E6%B0%B8%E6%98%8C*%3C%2FLiteral%3E%3C%2FPropertyIsLike%3E%3C%2FFilter%3E&format=json' 'gisserver/wfsserver/liushisijiayuanqu1005?version=1.3.0&request=GetFeature&typename=64jiayuanqujibenqingkuang&propertyname=*&filter=<Filter><PropertyIsLike+wildCard%3D"*"><PropertyName>YQmingchen<%2FPropertyName><Literal>*' + params + '*<%2FLiteral><%2FPropertyIsLike><%2FFilter>&format=json' ); } // 地块查询 export function findAddressCandidates(params) { return request.get( "/gisserver/rest/services/Locators/dikuaixinxi1005/GeocodeServer/findAddressCandidates?singleLine=" + params "/gisserver/rest/services/Locators/dikuaixinxi1005/GeocodeServer/findAddressCandidates?singleLine=" + params ); } //获取地块范围 export function getDiKuanFanWei(lon, lat) { return request.get( "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + lon + "&lat=" + lat + "&geom=true&requesttype=json" ) "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + lon + "&lat=" + lat + "&geom=true&requesttype=json" ); } src/assets/js/rpc.js
@@ -100,16 +100,19 @@ that.objArr.push(itemObj); }); //园区 var YQArr = result[1].candidates.filter(item => { return item.attributes.YQmingchen.includes(res); var YQArr = result[1].features.filter(item => { return item.properties.YQmingchen.includes(res); }); YQArr.forEach(val => { let itemObj = { type: "园区", name: val.attributes.YQmingchen, address: val.attributes.YQdizhi, lon: val.location.x, lat: val.location.y name: val.properties.YQmingchen, address: val.properties.YQdizhi, lon: val.geometry.coordinates[0], lat: val.geometry.coordinates[1], geom: val.properties.Coor1 + val.properties.Coor2 }; that.objArr.push(itemObj); }); @@ -180,9 +183,14 @@ let that = this; if (res.type == "园区") { var geom = res.geom.split(','); var coord = []; for (var i in geom) { coord.push(parseFloat(geom[i])) } this.setDrawPolyExtent(coord) } else if (res.type == "地块") { getDiKuanFanWei(res.lon, res.lat).then(response => { let center = { lon: 0, lat: 0 }; let polygon = that.read(response.geometry); @@ -196,27 +204,32 @@ geometry.push(parseFloat(point[0]), parseFloat(point[1])) } that.setLacationLineClear() var position = Cesium.Cartesian3.fromDegreesArray(geometry) that.lacationLine = Viewer.entities.add({ name: "立体墙效果", wall: { positions: position, material: new Cesium.DynamicWallMaterialProperty({ color: Cesium.Color.RED, duration: 4000 }), // 设置高度 maximumHeights: Array(position.length).fill(80), minimumHeights: Array(position.length).fill(10), } }) that.setDrawPolyExtent(geometry) } }); } }, setDrawPolyExtent(res) { this.setLacationLineClear() var position = Cesium.Cartesian3.fromDegreesArray(res) this.lacationLine = Viewer.entities.add({ name: "立体墙效果", wall: { positions: position, material: new Cesium.DynamicWallMaterialProperty({ // color: new Cesium.Color.fromCssColorString('#73DB0E'), color: new Cesium.Color.fromCssColorString('#1f1fa8'), duration: 4000, }), // 设置高度 maximumHeights: Array(position.length).fill(80), minimumHeights: Array(position.length).fill(10), } }) }, read(wkt) { @@ -538,7 +551,7 @@ ); this.position = window.Viewer.entities.add({ name: "FLYToMap", position: Cesium.Cartesian3.fromDegrees(res.lon, res.lat, 200), position: Cesium.Cartesian3.fromDegrees(res.lon, res.lat, 0), point: { pixelSize: 1, color: Cesium.Color.WHITE.withAlpha(0), @@ -549,8 +562,8 @@ window.Viewer.flyTo(this.position, { offset: { heading: Cesium.Math.toRadians(0.0), pitch: Cesium.Math.toRadians(-45), range: 700 pitch: Cesium.Math.toRadians(-30), range: 1500 }, duration: 3 }); static/polyline.js
@@ -52,7 +52,7 @@ }; Cesium.DynamicWallMaterialProperty = DynamicWallMaterialProperty; Cesium.Material.DynamicWallType = 'DynamicWall'; Cesium.Material.DynamicWallImage = "/static/SmartEarthSDK/Workers/image/1.png"; Cesium.Material.DynamicWallImage = "http://10.10.4.121:8070/image/1.png"; Cesium.Material.DynamicWallSource = "czm_material czm_getMaterial(czm_materialInput materialInput)\n\ {\n\ czm_material material = czm_getDefaultMaterial(materialInput);\n\