[OpenLayers-Dev] List of Layers

bradleyspencer brad at cubewerx.com.au
Thu Mar 15 17:27:53 EDT 2007


If the site were an OGC compliant site he could use the getCapabilities
request to generate a XML file and parse it to determine all the layers at a
particular OGC Server? Binding that with the particular request would not be
too hard inside JS.
I assume he would like this feature as a OL service that say produced a
select box of layers from that site. Many OGC clients do this.

Just a thought :)

Cheers,

Brad Spencer
General Manager
CubeWerx Australia Pty Ltd
ABN: 37 115 163 285
Mob: +61 (0)404 841 131
Tel/Fax: +61 (0)2 9481 7024
mailto:brad at cubewerx.com.au
http://www.cubewerx.com.au

-----Original Message-----
From: Christopher Schmidt [mailto:crschmidt at metacarta.com]
Sent: Friday, 16 March 2007 8:20 AM
To: Antonio
Cc: dev at openlayers.org
Subject: Re: [OpenLayers-Dev] List of Layers

On Thu, Mar 15, 2007 at 09:52:57PM +0100, Antonio wrote:
> Hi guys,
>
> I didn't find any method to get info about the layers available on my
> mapfile, something that say me how many and how they are named.

OpenLayers doesn't talk to the map server you are using to learn about
the layers. You need to specify the layers in the javascript setup for
your OpenLayers Map.

> I can just load a layer from a WMS server specifying a layer name.
> Have I to use some php/java scripts to do that, or I am not  looking in
> the right place?

The functionality that you are looking for does not exist in OpenLayers.
Where possible, OpenLayers has taken a 'you can't talk to the server'
approach due to the Same Origin Policy. [1]

[1] http://en.wikipedia.org/wiki/Same_origin_policy

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
Dev at openlayers.org
http://openlayers.org/mailman/listinfo/dev




More information about the Dev mailing list