[OpenLayers-Users] How to show "nothing" when a tile is not
found with TileCache
Kenneth Skovhede, GEOGRAF A/S
ks at geograf.dk
Wed Jun 24 07:02:42 EDT 2009
You can override the function:
OpenLayers.Util.onImageLoadError
and make it do something else, like show a specific blank tile.
Regards, Kenneth Skovhede, GEOGRAF A/S
Linde Ackermans skrev:
> 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 ? )
> Thanks for any help.
> Linde
>
>
More information about the Users
mailing list