|
|
|
|
@ -87,9 +87,9 @@ module.exports = {
|
|
|
|
|
let polygonsMerged = [];
|
|
|
|
|
polygons.map((polygon) => {
|
|
|
|
|
console.log(polygon);
|
|
|
|
|
if (polygon[0].lat != polygon[polygon.length - 1].lat &&
|
|
|
|
|
polygon[0].lng != polygon[polygon.length - 1].lng) {
|
|
|
|
|
polygon.push({lat: polygon[0].lat, lng: polygon[0].lng})
|
|
|
|
|
if (polygon.coords[0].lat != polygon.coords[polygon.length - 1].lat &&
|
|
|
|
|
polygon.coords[0].lng != polygon.coords[polygon.length - 1].lng) {
|
|
|
|
|
polygon.coords.push({lat: polygon[0].lat, lng: polygon[0].lng})
|
|
|
|
|
}
|
|
|
|
|
let intersect = module.exports.checkIntersects(polygonPoints, polygon.coords);
|
|
|
|
|
if (intersect != null) {
|
|
|
|
|
|