<div dir="ltr"><div><div><div><div><div><div>Hi list,<br><br></div>I've been working on getting a tiled server in my application.<br></div>It is a 3rd party server so I cannot change anything.<br></div>I already have figured out the the Y direction was wrong.<br>
So I override getURL.<br></div>Now it is better, but the top tiles are at the bottom and the bottom ones at top.<br><br></div>So I'm still doing something wrong, but can't figure out what.<br><br></div>Here's my code, found using Google:<br>
function get_my_url (bounds) {<br> var res = this.map.getResolution();<br> var x = Math.round ((bounds.left - this.map.maxExtent.left) / (res * this.tileSize.w));<br> var y = Math.round ((this.map.maxExtent.top - bounds.top) / (res * this.tileSize.h));<br>
var z = this.map.getZoom();<br> <br> if (x<0 || y<0 || z < 0) return;<br> <br> var path = z + "/" + x + "/" + y + "." + this.type;<br>
var url = this.url;<br> if (url instanceof Array) {<br> url = this.selectUrl(path, url);<br> }<br> return url + path;<br> <br> }<br clear="all"><div><div>
<div><div><div><div><div><div><br>
</div><div>I am getting the correct tiles but they are positions wrong (just in the Y direction)<br><br>Any help is much appreciated.<br></div><div><br>
Paul</div>
</div></div></div></div></div></div></div></div>