[OpenLayers-Dev] WMS Capabilities (ticket #2164)
Andreas Hocevar
ahocevar at opengeo.org
Thu Sep 17 09:24:15 EDT 2009
Gabriel Nolasco wrote:
> Thanks Trond and Tim for this very useful patch.
> I have a question regarding the read_cap_SRS method: I can see that the layer.srs property is an object, so one can test if a layer node has a passed child SRS: layer.srs[srs] = true.
> But what if I want to get all SRS child nodes of a layer? Does your patch supports this and I’m missing how to do it or do I have to change your code and define the layer.srs as an array and push all the SRS values: layer.srs.push(srs)?
>
If you examine the layer.srs object, you already have all the srs child
nodes of the layer, and you can also walk through them easily:
For an array, you would do
for(var i=0; i<layer.srs.length; i++) {
alert(layer.srs[i]);
};
For the object, all you have to do instead is
for(var i in layer.srs) {
alert(i);
}
If you e.g. want to populate a dropdown form field with the available
srs values, this does not make any difference.
> Another question is about support for WMS 1.3. I have found this patch [1] and would like to know if there is somebody working on it.
>
Not that I am aware of.
Regards,
Andreas.
> [1] http://trac.openlayers.org/attachment/ticket/1176/Capabilities.patch
>
> Thanks in advance,
> Gabriel Nolasco
>
>
> ____________________________________________________________________________________
> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.com
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Dev
mailing list