GeoJSON remark about the reversed coords (#5604)

* GeoJSON remark about the reversed coords

oh man, that took me a while of debugging

* Reword sentence on coordinate axis order somewhat
This commit is contained in:
Sven 2017-07-05 09:34:14 +02:00 committed by Per Liedman
parent 54a87e0902
commit 170bdc8075

View File

@ -107,6 +107,8 @@ title: Using GeoJSON with Leaflet
};
</code></pre>
Beware of the switched order of latitude and longitude in GeoJSON; as per definition in [RFC 7946](https://tools.ietf.org/html/rfc7946) GeoJSON uses coordinates in (lon,lat) order instead of (lat,lon) that Leaflet uses.
<h3>The GeoJSON layer</h3>
<p>GeoJSON objects are added to the map through a <a href="http://leafletjs.com/reference.html#geojson">GeoJSON layer</a>. To create it and add it to a map, we can use the following code:</p>