Reputation: 11
I am a beginner to web map development using leaflet. I am able to add wfs layers from the geo-server to the web map. I am using leaflet to style the wfs layers. In my html I have few layers using geojson format and one WFS layer from geoserver.
My question is, whenever I add a new layer to the geoserver I want to view in my web map without updating the html. Is there any option or method to update the html file automatically whenever I add a new layer to the geoserver?.
Thank you very much in advance for your response.
Ra
Upvotes: 1
Views: 470
Reputation: 631
LayerGroups in GeoServer are probably what you are looking for. Its still an added step to add a newly published layer to the layer group. It does keep you from having to edit the HTML file with each new layer.
Some instructions on how to create one and the benefits are here
Upvotes: 0
Reputation: 2991
Why not prepare an ajax call to your server that lists the available WFS layers, then direct leaflet from there?
Upvotes: 0