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