[Geoserver-users] How to automatically add WFS layers in web map

Hi all

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

Hi Ramasamy,

Il giorno gio, 14/05/2015 alle 09.40 -0600, Ramasamy Annamalai ha
scritto:

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?.

Not that I know of, but I guess you could write a piece of JavaScript
that periodically polls GeoServer for the list of available layers and,
if new ones are found, adds them to the map.

Take a look at the GetCapabilities operation, supported by both WMS and
WFS services:

http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getcapabilities
http://docs.geoserver.org/stable/en/user/services/wfs/reference.html#operations

Hope this helps.

Best regards,
Stefano