|
|
|
@ -100,8 +100,18 @@ Page({
|
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
|
|
|
|
|
$api.AJAX('GET', 'applets/landtolistlonlat/list/' + this.data.landListedId, true).then(data => { |
|
|
|
|
this.setWKT1(data, 3); |
|
|
|
|
$api.AJAX('GET', 'applets/landtolistlonlat/list/' + this.data.landListedId, true).then(res => { |
|
|
|
|
if (res&&res.data&&res.data.length > 0) { |
|
|
|
|
this.setWKT1(res, 3); |
|
|
|
|
if(res.data[0].centerPoint){ |
|
|
|
|
centerPoint = res.data[0].centerPoint; |
|
|
|
|
let point = WKT.parse(centerPoint); |
|
|
|
|
this.setData({ |
|
|
|
|
latitude: point.coordinates[1], |
|
|
|
|
longitude: point.coordinates[0], |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
$api.AJAX('GET', 'applets/landtolist/' + this.data.landListedId, { id: this.data.landListedId }, true).then(res => { |
|
|
|
@ -129,7 +139,7 @@ Page({
|
|
|
|
|
res.data.commerceSpaceRatio=0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let totalConsArea = res.data.totalConsArea; |
|
|
|
|
this.setData({ |
|
|
|
|
myData: res.data |
|
|
|
|
}) |
|
|
|
@ -163,7 +173,9 @@ Page({
|
|
|
|
|
let { |
|
|
|
|
polygons |
|
|
|
|
} = this.data; |
|
|
|
|
let newPolygons = data.data.map(item => { |
|
|
|
|
let newPolygons = data.data.filter(item=>{ |
|
|
|
|
return item.geoms || item.geom; |
|
|
|
|
}).map(item => { |
|
|
|
|
let geomPoints = WKT.parse(item.geoms || item.geom); |
|
|
|
|
console.log(geomPoints); |
|
|
|
|
let points = []; |
|
|
|
|