派生自 wuyushui/SewerAndRainNetwork

yangdelong
2021-05-29 de7390c66ef3e3fe316e804495a78d05a01f0160
src/components/helpers/LocateHelper.js
@@ -22,6 +22,7 @@
  if (filters.length > 0) {
    params.CQL_FILTER = filters.join(' AND ')
  }
  console.log(centerPoint)
  loadPointWfs(centerPoint, params)
}
@@ -130,8 +131,10 @@
  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())
  }
}