Skip to content

Commit 4332bbf

Browse files
committed
Add documentation for x/y of centroid
According to the GeoJSON spec [1], the first element is the longitude and the second element is the latitude. [1] https://geojson.org/geojson-spec.html#id2
1 parent 8faa6e2 commit 4332bbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/features.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ function parseCentroid(centroid_geo_json) {
7171
return null;
7272
}
7373

74-
const x = coords[0];
75-
const y = coords[1];
74+
const x = coords[0]; // longitude
75+
const y = coords[1]; // latitude
7676

7777
return [x, y];
7878
}

0 commit comments

Comments
 (0)