Hey-

Linde Ackermans wrote:
> Hi all,
> 
> I defined my layers with OpenLayers.TileCache
> 
> f.i. 
>       var l1= new OpenLayers.Layer.TileCache("xxx", 
>             ["http://xx.xx.xx.xx/tilecache/cache/";,
>              "l1",
>              {scales: Scales, resolutions: Resolutions,
>               buffer:0, format:"image/png", isBaseLayer:false},
>              );
> 
> Say I have a base layer l0, extent = europe.
> I want to overlay l1, but this layer only contains detailed information on
> capital cities, on a very high scale.
> I do not want to make a cache for layer l1 for the whole extent of the base
> layer ( would be too much ), but only for a few selected rectangles.
> How can I do this ? How can I show "nothing" for tiles not found ? ( Or an
> empty tile which is transparent ? )

The default behavior is to turn tiles pink if no image is returned.

OpenLayers.Util.onImageLoadErrorColor = "pink";

If your service doesn't return an image in certain areas and you want 
those to be transparent in the client, use the following:

OpenLayers.Util.onImageLoadErrorColor = "transparent";

(Set this property before you set your map center.)

Tim

> Thanks for any help.
> Linde
> 


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to