| | |
| | | if (filters.length > 0) { |
| | | params.CQL_FILTER = filters.join(' AND ') |
| | | } |
| | | console.log(centerPoint) |
| | | loadPointWfs(centerPoint, params) |
| | | } |
| | | |
| | |
| | | if (type === 'Point') { |
| | | var point = feature.geometry.coordinates |
| | | point = [point[1], point[0]] |
| | | window.map.setView(point, 17) |
| | | window.map.setView(point, 19) |
| | | } else { |
| | | window.map.fitBounds(window.L.geoJSON(feature).getBounds()) |
| | | } |
| | |
| | | if (type === 'Point') { |
| | | return [coordinates[1], coordinates[0]] |
| | | } else { |
| | | const center = L.geoJSON(feature, {}).getBounds().getCenter() |
| | | return [center.lat, center.lng] |
| | | return L.geoJSON(feature, {}).getBounds().getSouthWest() |
| | | // return [center.lat, center.lng] |
| | | |
| | | // return turf.centerOfMass(L.geoJSON(feature, {}).toGeoJSON()) |
| | | } |
| | | } |
| | | |