[OpenLayers-Users] using more than one Layer.TileCache in a map?

Matt Bartolome mattxbart at gmail.com
Tue Dec 2 00:24:22 EST 2008


I have some pre-generated tilecaches.

    layer_a = new OpenLayers.Layer.TileCache( "a", tilecache_servers,
"62851963");
    layer_b = new OpenLayers.Layer.TileCache( "b", tilecache_servers,
"62731963", {transparent: true});

    base_layers = [layer_a, layer_b];
    map.addLayers(base_layers);

I was expecting the above to add multiple static tilecaches to my map
but it only adds the first layer in the array. Each by themselves
produces the expected result but in this example the second layer
doesn't get loaded (there are no web requests to it at all).

Does Layer.Tilecache allow multiple layers?

Thanks,
-Matt



More information about the Users mailing list