|
@@ -309,10 +309,15 @@ export default {
|
|
|
complete () {
|
|
|
that.setCurFeatures(that.mapDiyObj.features)
|
|
|
},
|
|
|
- // click(e) {
|
|
|
- // const { lng, lat } = e.lnglat
|
|
|
- // console.log(lng, lat)
|
|
|
- // },
|
|
|
+ moveend () {
|
|
|
+ // console.log(this.mapDiyObj.center)
|
|
|
+ },
|
|
|
+ click(e) {
|
|
|
+ const { lng, lat } = e.lnglat
|
|
|
+ // console.log(lng, lat)
|
|
|
+ that.mapDiyObj.center = [lng, lat]
|
|
|
+ that.getList()
|
|
|
+ },
|
|
|
},
|
|
|
markersEvents: {
|
|
|
dragend(e) {
|
|
@@ -759,14 +764,17 @@ export default {
|
|
|
const curMap = this.amapManager.getMap()
|
|
|
curMap.setFeatures(data)
|
|
|
},
|
|
|
- getList (params) {
|
|
|
+ getList () {
|
|
|
const query = this.$route.query
|
|
|
- this.$api.other.admmapcoordindatalist({
|
|
|
- map_id: query.id
|
|
|
+ // this.$api.other.admmapcoordindatalist({
|
|
|
+ this.$api.other.admmapcoordinaround({
|
|
|
+ map_id: query.id,
|
|
|
+ distance: 5000,
|
|
|
+ longitude: this.mapDiyObj.center[0],
|
|
|
+ latitude: this.mapDiyObj.center[1],
|
|
|
}).then(res => {
|
|
|
let polygons = res.map(item => {
|
|
|
const d = JSON.parse(item.data)
|
|
|
- console.log(d.path[0])
|
|
|
return {
|
|
|
...d,
|
|
|
longitude: item.longitude,
|
|
@@ -1031,7 +1039,7 @@ export default {
|
|
|
cObj.editable = false
|
|
|
const cPath = cObj.path
|
|
|
const lnglatObj = this.getCenterPoint(cPath)
|
|
|
- console.log(lnglatObj)
|
|
|
+ // console.log(lnglatObj)
|
|
|
let tempPath = []
|
|
|
cPath.forEach(item => {
|
|
|
tempPath.push([item.lng, item.lat])
|