[OpenLayers-Users] using more than one Layer.TileCache in a map?
Eric Lemoine
eric.c2c at gmail.com
Tue Dec 2 00:45:10 EST 2008
Hi
If you don't set isBaseLayer:false in the options passed to the
Layer.TileCache constructor then the layer is a base layer. If you
want the two TileCache layers to be active at the same time you must
send isBaseLayer:false to one of them. Also, note that
transparent:true has no effect as a Layer.TileCache option.
Cheers,
Eric
2008/12/2, Matt Bartolome <mattxbart at gmail.com>:
> 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
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list