<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><base href="x-msg://495/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>What is the axis order of your CRS? yx or xy?</div><div><br></div><div>The default for WMS 1.3 is xy, yx is only used if your CRS uses yx as the axis order.</div><div><br></div><div>It doesn't make any sense to set yx for a certain key to false, it is only meant to store a list of CRSs that have yx as the axis order.</div><div><br></div><div>Best regards,</div><div>Bart</div><br><div><div>On Oct 18, 2013, at 4:11 PM, Dylan Parry <<a href="mailto:dylan.parry@bluefoxtech.co.uk">dylan.parry@bluefoxtech.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div data-externalstyle="false" dir="ltr" style="font-family: Calibri, 'Segoe UI', Meiryo, 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', sans-serif; font-size: 12pt; "><div>Hi,</div><div><br></div><div>That’s similar to what I tried before, ie.</div><div><br></div><div>yx: { ‘EPSG:27700’: false }</div><div><br></div><div>Strangely, the error goes away when I set the above to ‘true’ but then of course the coordinates are all wrong so the tiles won’t load. I can’t understand why setting it to false would bring up an error when false is still a valid value?<br></div><div data-signatureblock="true"><div><br></div><div>--<span class="Apple-converted-space"> </span><br>Dylan Parry<br><br>Blue Fox Technology Ltd<br>Tel: 01492 532100<br>Web:<span class="Apple-converted-space"> </span><a href="http://www.bluefoxtech.co.uk" style="color: blue; text-decoration: underline; ">http://www.bluefoxtech.co.uk</a><br><br>Registered in England and Wales, Company No. 0508226.<br>Registered office: Windsor House, 26 Mostyn Avenue, Craig-Y-Don,<br>Llandudno, Conwy LL30 1YY</div><div><br></div></div><div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid; "><font face="Calibri, 'Segoe UI', Meiryo, 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'Khmer UI', 'Nirmala UI', Tunga, 'Lao UI', Ebrima, sans-serif" style="line-height: 15pt; letter-spacing: 0.02em; font-family: Calibri, 'Segoe UI', Meiryo, 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'Khmer UI', 'Nirmala UI', Tunga, 'Lao UI', Ebrima, sans-serif; font-size: 12pt; "><b>From:</b> <a href="mailto:jawendell@suddenlink.net" target="_parent" style="color: blue; text-decoration: underline; ">Jerome A. Wendell</a><br><b>Sent:</b> ‎Friday‎, ‎18‎ ‎October‎ ‎2013 ‎13‎:‎25<br><b>To:</b> <a href="mailto:dylan.parry@bluefoxtech.co.uk" target="_parent" style="color: blue; text-decoration: underline; ">Dylan Parry</a>,<span class="Apple-converted-space"> </span><a href="mailto:openlayers-users@lists.osgeo.org" target="_parent" style="color: blue; text-decoration: underline; ">openlayers-users@lists.osgeo.org</a></font></div><div><br></div><div class="WordSection1"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; ">Dylan,</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; "> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; ">I have added the following to the same section of code that you referred to for some of my layers:</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 0.5in; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; "> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 0.5in; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; ">yx : {'EPSG:4326' : true}</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; "> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; ">See if adapting it to your projection makes any difference.</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; "> </span></p><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; ">Jerome Wendell</span></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; "> </span></p><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 11pt; "> </span></p><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) black black; padding: 3pt 0in 0in; border-image-source: none; "><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span style="font-family: Tahoma, sans-serif; font-size: 10pt; ">From:</span></b><span style="font-family: Tahoma, sans-serif; font-size: 10pt; "><span class="Apple-converted-space"> </span><a href="mailto:openlayers-users-bounces@lists.osgeo.org" style="color: blue; text-decoration: underline; ">openlayers-users-bounces@lists.osgeo.org</a><span class="Apple-converted-space"> </span>[mailto:openlayers-<a href="mailto:users-bounces@lists.osgeo.org" style="color: blue; text-decoration: underline; ">users-bounces@lists.osgeo.org</a>]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Dylan Parry<br><b>Sent:</b><span class="Apple-converted-space"> </span>Friday, October 18, 2013 8:06 AM<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:openlayers-users@lists.osgeo.org" style="color: blue; text-decoration: underline; ">openlayers-users@lists.osgeo.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>[OpenLayers-Users] Cannot read property 'yx' of undefined</span></div></div></div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "> </p><div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">Hi,</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">I’m trying to use a WMS with the EPSG:27700 projection. The WMS uses version 1.3.0, which is causing a few problems. I have got to a point where I cannot figure out what’s wrong.</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">I am currently getting the following error:</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">Cannot read property ‘yx’ of undefined</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">and having read up a little, it appears that it’s due to the WMS version wanting to know whether to reverse the coordinates or not for the bbox parameter, but as the projection is unknown to OpenLayers there’s no yx property to query.</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">My problem is that I have no idea where to add that property to.</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">Here’s the code I have so far:</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "><script src="~/Scripts/proj4js.js"></script><br><script><br>    Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs";<br></script><br><script src="/Scripts/openlayers/openlayers.js"></script><br><script><br>    var map, opus;</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">    function init() {<br>        OpenLayers.ImgPath = "/Scripts/openlayers/img/";</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">        var options = {<br>            maxExtent: new OpenLayers.Bounds(0, 0, 700000, 1300000),<br>            restrictedExtent: new OpenLayers.Bounds(0, 0, 700000, 1300000),<br>            projection: new OpenLayers.Projection('EPSG:27700'),<br>            units: 'm',<br>            scales: [10000, 25000, 50000, 75000, 100000, 150000, 175000, 200000],<br>            controls: [<br>                new OpenLayers.Control.Navigation({ 'zoomWheelEnabled': false }),<br>                new OpenLayers.Control.MousePosition(),<br>                new OpenLayers.Control.PanZoomBar(),<br>                new OpenLayers.Control.LayerSwitcher()<br>            ]<br>        };</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">        map = new OpenLayers.Map('map', options);</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">        opus = new OpenLayers.Layer.WMS(<br>            'OpenStreetMap via Opus',<br>            '<a href="http://server/wms'" style="color: blue; text-decoration: underline; ">http://server/wms'</a>,<br>            {<br>                layers: 'OpenStreetMap',<br>                version: '1.3.0',<br>                crs: 'EPSG:27700',<br>                format: 'image/png',<br>            },<br>            {<br>                isBaseLayer: true,<br>                transitionEffect: 'resize'<br>            }<br>        );<br>        map.addLayer(opus);</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">        map.zoomToMaxExtent();<br>        map.zoomToScale(10000, true);<br>        map.setCenter(new OpenLayers.LonLat(195775, 223755));<br>    }<br></script></span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">I also have an onload event that calls the init() function to draw the map on the page.</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">Any idea how to fix the error I’m getting? I’ve tried adding an xy property to the WMS bit of the code where ‘isBaseLayer’ is defined, but that didn’t seem to work.</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">Thanks,</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div><div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; ">--<span class="Apple-converted-space"> </span><br>Dylan Parry<br><br>Blue Fox Technology Ltd<br>Tel: 01492 532100<br>Web:<span class="Apple-converted-space"> </span><a href="http://www.bluefoxtech.co.uk" target="_parent" style="color: blue; text-decoration: underline; ">http://www.bluefoxtech.co.uk</a><br><br>Registered in England and Wales, Company No. 0508226.<br>Registered office: Windsor House, 26 Mostyn Avenue, Craig-Y-Don,<br>Llandudno, Conwy LL30 1YY</span></div></div><div><p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Calibri, sans-serif; "> </span></p></div></div></div></div>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org" style="color: blue; text-decoration: underline; ">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" style="color: blue; text-decoration: underline; ">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></div></blockquote></div><br></body></html>