Switch to Longitude-Latitude for coordinates?
See original GitHub issueIn quite a few places I’m looking at APIs that are built for GeoJSON input and output and having to flip coords and reconstruct bounding boxes for Leaflet to read. Changing Leaflet’s APIs to all do things the GeoJSON way would be (wonderful but) a big, breaking change. Having them all autodetect would be error-prone, and having an is_geojson
argument to lots of functions would be lame.
Maybe GeoJSON everywhere is something to think about in 1.0.0, and a global flag, L.GEOJSON_API
might be a better near-term goal for the [lat, lon]
shortcut to be [lon, lat]
, for toJSON
methods to return GeoJSON, and for bounds to be represented and usable as GeoJSON bounds.
Issue Analytics
- State:
- Created 11 years ago
- Reactions:7
- Comments:22 (4 by maintainers)
Top Results From Across the Web
PGC Coordinate Converter - Polar Geospatial Center
Enter values into the coordinate tool and the values will automatically update. For decimal degrees ... Latitude (-90 to 90) and longitude (-180...
Read more >Convert Coordinates - Earth Point
Enter latitude/longitude or position. Click the corresponding "Calc" button. Lat/Lon, UTM, UPS, MGRS, USNG, GARS, Plus Codes, what3words, Georef, ...
Read more >Get Lat Long from Address Convert Address to Coordinates
A handy tool to get lat long from address, helps you to convert address to coordinates (latitude longitude) on map, also calculates the...
Read more >How to Convert Latitude and Longitude to Map Coordinates
Community Mapping Experiment: How to Convert Latitude and Longitude to Map Coordinates ; Step 1: Degrees × 60 = 71 × 60 =...
Read more >Degrees Minutes Seconds to/from Decimal Degrees
This tool permits the user to convert latitude and longitude between decimal degrees and degrees, minutes, and seconds.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just for reference, since this issue seems to become the main justification: https://macwright.org/lonlat/
@lukedohner use the builtin GeoJSON layer, it works out of the box with coordinates that follow the GeoJSON spec (lon/lat).
If you really need to flip the axis, there are several ways to go about it, one is to use reproject’s
reverse
function.