Hi, I have been working on distributed tile services, and I have 2-4 tile services for each tile layers.
I found the sample on http://www.openlayers.org/dev/examples/multiserver.html address, but it works on WMS services. I tried to do same thing for TMS, but I haven't archived any success until now. What will you suggest for this problem? Thanks. Alper. *Sample code is below :* --------------------------------------------------------------- var url_fbmaden = ["http://dsi-ortak1/", "http://dsi-ortak2/"]; bm_fbmaden = new OpenLayers.Layer.TMS( "FB Layer", url_fbmaden, { 'isBaseLayer' : false, type: 'png', visibility : false, numZoomLevels: 22, getURL: getTileFromGAE } ); function getTileFromGAE(bounds) { var res = this.map.getResolution(); var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = Math.pow(2, z); if (y < 0 || y >= limit) { return OpenLayers.Util.getImagesLocation() + "404.png"; } else { x = ((x % limit) + limit) % limit; return this.url + z + "/" + x + "/" + y + "." + this.type; } }
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
