I have a leaflet application and I want to display some WFS layers coming from Geoserver.

In Geoserver, I declare my layer with a "native SRC" EPSG:2154, and with a "declared SRC" EPSG:4326 and set "SRS handling" to "Reproject native to declared" to display it in leaflet.

Now, if I try to display the wfs with leaflet, it renders something weird. I have the first point of the line at the right coordinates, but then, lines are going to wrong coordinates, thousands kilometers away from they should be.

Here is a part of the jsonp :


As you can see, the first coordinates are rights, but the second point is wrong.

Is there a problem reprojecting with geoserver ? I tried not to reproject, but I still have the same problem with other wrong coordinates.

1 Answer 1


In GeoServer you should leave the data in the native projection (except in very specialised situations) and then GeoServer will manage the reprojection to whatever projection you make the WFS request in, normally this should be the map projection unless you for some reason want to handle the reprojection in the browser.

  • Many thanks iant ! I've finally fixed the problem thanks to that post link. I don't know why but my geom field in postgis was in "MultiLineStringZM" instead of "MultiLineString" ...
    – Hippipers
    Commented Dec 14, 2015 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.