派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-20 8e182aa12fcba7ed25c2d65a6f5e1ae0b2160ab1
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())
  }
}