| | |
| | | import { Icon, Style, Fill, Text, Stroke, Circle } from 'ol/style.js' |
| | | import TilegridTileGrid from "ol/tilegrid/TileGrid" |
| | | |
| | | |
| | | let architecturePolygon = null |
| | | let select = null |
| | | |
| | |
| | | { |
| | | key: 2, |
| | | tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksdflxq/MapServer/tile/{z}/{y}/{x}", |
| | | center: [112.6202242373625, -0.0811745423945008147645], |
| | | resolution: 0.00007614275218656896, |
| | | center: [112.6102242373625, -0.0741745423945008147645], |
| | | resolution: 0.00003807137609328448, |
| | | origin: [-400.0, 399.9999999999998], |
| | | resolutions: [ |
| | | 0.00015228550437313792, 0.00007614275218656896, 0.00003807137609328448, |
| | |
| | | fullExtent: [ |
| | | 112.51302551881798, -0.16235359398493399, 112.72742295590702, 0.000004509195932360471 |
| | | ], |
| | | polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp' |
| | | polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/fllkarcgisapp' |
| | | } |
| | | ] |
| | | |
| | |
| | | |
| | | this.$refs.leftNav.initialize(newData) |
| | | |
| | | this.$refs.campusNavRoute.closeModel() |
| | | |
| | | this.createdLayers(newData) |
| | | }) |
| | | } |
| | |
| | | |
| | | mounted () { |
| | | const that = this |
| | | this.map2D.setTarget('viewer-container') |
| | | this.$nextTick(() => { |
| | | this.map2D.setTarget('viewer-container') |
| | | |
| | | that.map2D.on('pointermove', that.mouseMoveEvent) |
| | | |
| | | this.map2D.on("singleclick", function (event) { |
| | |
| | | let flag = true |
| | | |
| | | that.map2D.forEachFeatureAtPixel( |
| | | event.pixel, |
| | | [event.originalEvent.offsetX, event.originalEvent.offsetY], |
| | | (feature) => { |
| | | if (flag == false) { |
| | | return |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | methods: { |
| | | createdLayers (campusKey) { |
| | | const that = this |
| | |
| | | select = null |
| | | |
| | | that.map2D.forEachFeatureAtPixel( |
| | | event.pixel, |
| | | [event.originalEvent.offsetX, event.originalEvent.offsetY], |
| | | (feature) => { |
| | | if (flag == false) { |
| | | return |
| | |
| | | |
| | | this.$store.commit('CLEAR_ALL', null) |
| | | |
| | | getDetail({ mechanismname: event.target.values_.attributes['楼栋号'] }).then((res) => { |
| | | getDetail({ mechanismname: event.target.values_.attributes['楼栋号'], campus: this.layoutElement.campusValue }).then((res) => { |
| | | if (JSON.stringify(res.data.data) == '{}') return |
| | | let result = res.data.data |
| | | |
| | | let curLngLat = this.map2D.getCoordinateFromPixel([event.event.originalEvent.offsetX, event.event.originalEvent.offsetY]) |
| | | |
| | | this.$store.dispatch('setOurDataInPoput', { |
| | | item: result |
| | | item: result, |
| | | lng: curLngLat[0], |
| | | lat: curLngLat[1] |
| | | }) |
| | | |
| | | this.openPopups({ |
| | | lng: Number(event.event.coordinate[0]), |
| | | lat: Number(event.event.coordinate[1]), |
| | | lng: Number(curLngLat[0]), |
| | | lat: Number(curLngLat[1]), |
| | | item: result, |
| | | event |
| | | }) |
| | |
| | | |
| | | mapClick (e) { |
| | | this.$refs.campusNavRoute.shortcutShow(e) |
| | | // this.$refs.campusBuildingSearch.shortcutShow(e) |
| | | this.$refs.campusBuildingSearch.shortcutShow(e) |
| | | }, |
| | | |
| | | campusCut (campusKey) { |