[OpenLayers-Users] Make the base layer empty or blank

Gregor Mosheh gregor at hostgis.com
Tue May 6 20:29:51 EDT 2008


My approach is to specify an invalid WMS layer.

    var blank = new OpenLayers.Layer.WMS('Blank',
       "/cgi-bin/mapserv", {layers:'blank', format:'image/png'},
       {isBaseLayer:true, displayOutsideMaxExtent:true }
    );
    map.addLayer(blank);
    // now add nothing but overlays

This does generate the pink boxes, but I always suppress those anyway.

OpenLayers.Util.onImageLoadError = function() { };

-- 
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the Users mailing list