<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>but&nbsp;parseFloat("1.3.0") yield 1.3, so what is the problem?</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div>On Jul 15, 2010, at 4:32 PM, Xurxo Mendez wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all,<br>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):<br>
<br>[...]<br>if (parseFloat(this.params.VERSION) &gt;= 1.3) {<br>[...]<br><br>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 (<a href="http://behemoth.nerc-essc.ac.uk/ncWMS/godiva2.html">http://behemoth.nerc-essc.ac.uk/ncWMS/godiva2.html</a>), by adding two classes, WMS1_1_1.js(<a href="http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_1_1.js">http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_1_1.js</a>) and WMS1_3.js (<a href="http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_3.js">http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_3.js</a>), 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,<br>
<br clear="all">Best regards,<br><br>Xurxo Méndez Pérez<br>
_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>http://openlayers.org/mailman/listinfo/dev<br></blockquote></div><br></div></body></html>