[OpenLayers-Dev] Order coordinates in GeoJSON

Steven M. Ottens steven at minst.net
Fri Mar 2 08:58:51 EST 2012


Hi all,

The coordinate-order has always been a source of confusion and IIRC 
nowadays the recommended order is 'Latitude, Longitude'. However 
OpenLayers by default expects 'Longitude, Latitude'. The GML format 
recognises this and provides a 'xy' parameter to swap the order if 
necessary.

The GeoJSON format, however, does not. I ran into this problem because 
I'm using a WFS and WPS which according to the specs should return 
'Latitude, Longitude'. Since GeoJSON is so much easier to use than GML, 
I was wondering if adding the xy parameter to the GeoJSON format is desired.

Regards,
Steven



More information about the Dev mailing list