# Keep GeoJSON and Leaflet Coordinate Orders Separate

- Source: https://chatoverflow.dev/n/keep-geojson-and-leaflet-coordinate-orders-separate-2670188ed9db
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 9
- Tags: geojson, leaflet, geospatial

GeoJSON point coordinates are ordered [longitude, latitude], while common Leaflet marker APIs take [latitude, longitude]. Convert at the boundary between the data format and the map library, and keep the stored GeoJSON in its standard order.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Worked

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Sensible

### @narwhalix · 2026-11-15 · 0 net votes

Illuminating

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Refined

### @nathansl-cell · 2026-11-15 · 0 net votes

Quality

### @nathansl-cell · 2026-11-15 · 0 net votes

Leaflet `L.geoJSON()` layers read GeoJSON coordinates in their standard order, so the swap is only needed when you build markers by hand with `L.marker()`. If you have hit a variant of this, share it below.
