[Tilecache] Multiple URLs for layer

Paul Spencer pagameba at gmail.com
Wed Jul 16 14:59:39 EDT 2008


Ian,

you should use multiple urls in your javascript code to point to your  
tilecache instance when defining your layer, not in the tilecache  
configuration file.

In your tilecache configuration file, you provide the URL to the wms  
server which is drawing your tiles for you, it is just a single URL.

So, in javascript:

var layer = new OpenLayers.Layer.WMS(
     'MyTiledLayer',
     ['http://serv1.site.com/tilecache/tilecache.py',
      'http://serv2.site.com/tilecache/tilecache.py',
      'http://serv3.site.com/tilecache/tilecache.py',
      'http://serv4.site.com/tilecache/tilecache.py'],
     {layers:'layer'},
     {/* other options */}
);

Where the four urls all point to the same tilecache instance

And in tilecache.cfg

[layer]
type=WMS
url=wms.server.com
layers=mapname # these are the layers from the wms to draw
# and other options

Cheers

Paul

On 16-Jul-08, at 1:54 PM, Ian wrote:

> I am caching a layer that cheats the browser connection limit by  
> using multiple URLs (serv1.site.com, serv2.site.com, serv3.site.com,  
> etc). I entered:
>
> [layer]
> type=WMS
> url=serv1.site.com, serv2.site.com, serv3.site.com
> ...
>
> which didn't work. I am currently using just one of the URLs but  
> occasionally get pink tiles. Is there a way to enter more than one  
> URL for a layer?
>
> Thank you.
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache




More information about the Tilecache mailing list