[OpenLayers-Dev] WMS 1.3.0 issue

Xurxo Mendez xmendez at udc.es
Thu Jul 15 10:32:58 EDT 2010


Hi all,
In OL 2.9.1, I was trying to add a WMS layer to my map, setting its
'VERSION' parameter (in contructor) to '1.3.0', and I have a problem. The
parameter must be a string, but in some pieces of code, at least in
lib/OpenLayers/Layer/WMS.js, for example here (line 254):

[...]
if (parseFloat(this.params.VERSION) >= 1.3) {
[...]

it's parsed to a float, so it can NOT be '1.3.0' but '1.3'; but my server (a
TDS one) doesn't recognize it as a valid version (it does support 1.3.0). By
now I'm solving it like Godiva2 people do (
http://behemoth.nerc-essc.ac.uk/ncWMS/godiva2.html), by adding two classes,
WMS1_1_1.js(http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_1_1.js) and
WMS1_3.js (http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_3.js), and
initializing my layer as a WMS1.3 instance. Another way could be to avoid
those kind of float-based checkings. Am I missing something important (I'm
still starting with OpenLayers) or it's the way it must be used? Thank you
in advance,

Best regards,

Xurxo Méndez Pérez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100715/14715a2e/attachment.html


More information about the Dev mailing list