Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix centroid calculation. Bump turf to v6.5 #7115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 19, 2024
Prev Previous commit
Next Next commit
remove .default
  • Loading branch information
birkskyum committed Aug 19, 2024
commit a937945a1e8fa8701fad4d654875cc51d3b8a9ff
4 changes: 2 additions & 2 deletions 4 src/lib/geo_location_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function findCentroid(feature) {

for(var i = 0; i < coords.length; i++) {
var polyi = {type: 'Polygon', coordinates: coords[i]};
var area = turfArea.default(polyi);
var area = turfArea(polyi);
if(area > maxArea) {
maxArea = area;
poly = polyi;
Expand All @@ -301,7 +301,7 @@ function findCentroid(feature) {
poly = geometry;
}

return turfCentroid.default(poly).geometry.coordinates;
return turfCentroid(poly).geometry.coordinates;
}

function fetchTraceGeoData(calcData) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.