10

I have a PostGIS database and have successfully consumed a table into GeoServer and published a WFS. Are there REST endpoints available for these WFS' akin to ESRI's feature services? How are parameters to be constructed?

  • 1
    have you looked at this post? "Leaflet doesn't directly support WFS services on their own, but it will happily work with JSON data, fortunately GeoServer can output a WFS service as JSON" – toms Jan 12 '15 at 19:27
13

To learn more about the Rest-Module of geoserver i can recommend you this website: http://geoserver.geo-solutions.it/edu/en/rest/using_rest.html but I guess that you just want to load a WFS-Layer into your Leaflet-map, so you can have a look at this post:

http://blog.georepublic.info/2012/leaflet-example-with-wfs-t/ Here the Requests for the WFS-layer are written from scatch. I have tested it and it works.

Or this Leaflet-Plugin: https://github.com/flatrockgeo/leaflet.wfs-t

If you don't need WFS-T than on of these posts could be enough:

https://stackoverflow.com/questions/25187937/loading-geojson-layers-from-geoserver-to-leaflet-map-based-on-the-current-boundi (answer of user "user3919282")

or this post where it is explained how to enable jsonp in Geoserver: Getting WFS data from Geoserver into leaflet

I have tested this post (Answer from user "geomajor56") GeoServer 2.4.1: How to use JSONP in a WFS request? and made a JSFiddle: http://jsfiddle.net/expedio/8r1ncv6a/

  • I can't seem to get your fiddle to work, L is not defined and then map container is not defined – Luffydude May 31 '16 at 13:20
  • Thanks, this helped, but the answer is kinda useless if all these URLs suddenly stop working. – Doodad May 22 at 14:21
5

We have implemented WFST plugin here: https://github.com/Flexberry/Leaflet-WFST It supports reading GML and GeoJSON data, and can send transaction requests (insert, update, delete).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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