Hi, but parseFloat("1.3.0") yield 1.3, so what is the problem?
Best regards, Bart On Jul 15, 2010, at 4:32 PM, Xurxo Mendez wrote: > 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 > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev
_______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev