[OpenLayers-Users] RE Layer.WMS displaying pink tiles

Phil Scadden p.scadden at gns.cri.nz
Sun Nov 4 14:35:12 PST 2012


With a lot of following code in the debugger, I have figured this out.

var lyrMapnik = new OpenLayers.Layer.OSM.( your parameters);

       lyrMapnik.events.register("tileerror",lyrMapnik,function(evt){
            evt.tile.setImgSrc("empty.png");
       });

If anyone is creating a static tile set from OSM data, this allows you 
to eliminate all those empty ocean tiles from the tileset.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list