| | |
| | | import { Icon, Style, Fill, Text, Stroke, Circle } from 'ol/style.js' |
| | | import TilegridTileGrid from "ol/tilegrid/TileGrid" |
| | | |
| | | |
| | | let architecturePolygon = null |
| | | let select = null |
| | | |
| | |
| | | |
| | | 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 |
| | |
| | | select = null |
| | | |
| | | that.map2D.forEachFeatureAtPixel( |
| | | event.pixel, |
| | | [event.originalEvent.offsetX, event.originalEvent.offsetY], |
| | | (feature) => { |
| | | if (flag == false) { |
| | | return |
| | |
| | | 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, |
| | | lng: event.event.coordinate[0], |
| | | lat: event.event.coordinate[1] |
| | | 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 |
| | | }) |