Hi list,

I've been working on getting a tiled server in my application.
It is a 3rd party server so I cannot change anything.
I already have figured out the the Y direction was wrong.
So I override getURL.
Now it is better, but the top tiles are at the bottom and the bottom ones
at top.

So I'm still doing something wrong, but can't figure out what.

Here's my code, found using Google:
        function get_my_url (bounds) {
            var res = this.map.getResolution();
            var x = Math.round ((bounds.left - this.map.maxExtent.left) /
(res * this.tileSize.w));
            var y = Math.round ((this.map.maxExtent.top - bounds.top) /
(res * this.tileSize.h));
            var z = this.map.getZoom();

            if (x<0 || y<0 || z < 0) return;

            var path = z + "/" + x + "/" + y + "." + this.type;
            var url = this.url;
            if (url instanceof Array) {
                url = this.selectUrl(path, url);
            }
            return url + path;

        }

I am getting the correct tiles but they are positions wrong (just in the Y
direction)

Any help is much appreciated.

Paul
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to