[OpenLayers-Users] Adding Layers, updating the Layer Switcher
Arnd Wippermann
arnd.wippermann at web.de
Thu Oct 29 14:22:28 EDT 2009
Hi,
Adding layers to a map you can see at the many examples. To remove a layer
you can use
map.removeLayer(layer);
To add a WMS layer from a given url, is not so easy. You have to make a
GetCapability request, parse the response, build the layer declaration and
add the layer to the map. To get the GetCapability response, you have to use
a proxy script.
To get a WMS layer I have used some own code, but there should be something
in the OpenLayers library for parsing the GetCapability response.
Arnd
More information about the Users
mailing list