| | |
| | | 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); |
| | | }); |
| | |
| | | |
| | | 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); |
| | |
| | | geometry.push(parseFloat(point[0]), parseFloat(point[1])) |
| | | |
| | | } |
| | | that.setLacationLineClear() |
| | | var position = Cesium.Cartesian3.fromDegreesArray(geometry) |
| | | that.setDrawPolyExtent(geometry) |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | setDrawPolyExtent(res) { |
| | | this.setLacationLineClear() |
| | | var position = Cesium.Cartesian3.fromDegreesArray(res) |
| | | |
| | | that.lacationLine = Viewer.entities.add({ |
| | | this.lacationLine = Viewer.entities.add({ |
| | | name: "立体墙效果", |
| | | wall: { |
| | | positions: position, |
| | | |
| | | |
| | | material: new Cesium.DynamicWallMaterialProperty({ |
| | | color: Cesium.Color.RED, |
| | | duration: 4000 |
| | | // 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) { |
| | |
| | | ); |
| | | 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), |
| | |
| | | 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 |
| | | }); |