[OpenLayers-Dev] ArcGIS + OpenLayers connection problem
John R. Frank
john.frank at metacarta.com
Thu Jun 7 20:11:39 EDT 2007
> > var wmsLayer = new OpenLayers.Layer.WMS( "Our WMS",
> > "http://server/arcgis/WMS", {layers: 'basic'});
> >
> > What should layers be called? Is there a way I can tell from the WMS
> > I'm running?
> >
>
> 'basic' is the name of the "basic layer" as they've called at Metacarta
> in their WMS server. I'm sure your WMS has a different set of names
> available for you. to discover the list of names you can use a WMS
> client (udig, qgis, ecc) or just use your browser to access
> GetCapabilities of your server. to do this use this URL:
>
> http://server/arcgis/WMS?service=WMS&request=GetCapabilities
>
> you should receive a XML file with a bunch of information and the list
> of server layers. User the value you find inside <Name> tag.
Charles,
Lorenzo's suggestion is exactly right. Finding a list of your server's
layer names should get you started.
Since examining a GetCapabilities response to find layer names is a pain,
there is a project underway (in Lorenzo's sandbox!) to make an
OpenLayers.Control that provides a user interface for inspecting each
server's GetCapabilities. While this is not yet in the official
OpenLayers release, you could consider using it out of the sandbox.
http://dev.openlayers.org/sandbox/ominiverdi/openlayers/examples/wms_manager.html
John
More information about the Dev
mailing list