Make image load error color configurable. Document it.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1386 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-08-26 16:05:25 +00:00
parent ecdb77fa9c
commit 8be2cfbc71
3 changed files with 11 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
rm ../doc/reference.html
CLASSES="Map Layer Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MouseToolbar Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds"
CLASSES="Map Layer Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MouseToolbar Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds Util"
echo "<html>
<head>
<title>OpenLayers Class Reference Documentation</title>

7
doc/Util.txt Normal file
View File

@@ -0,0 +1,7 @@
OpenLayers.Util
Utility class. Stores a bunch of methods and settings that don't fit anywhere else.
* Options
OpenLayers.Util.onImageLoadErrorColor -- A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example).

View File

@@ -131,8 +131,10 @@ OpenLayers.Util.onImageLoad = function() {
this.style.display = "";
};
OpenLayers.Util.onImageLoadErrorColor = "pink";
OpenLayers.Util.onImageLoadError = function() {
this.style.backgroundColor = "pink";
this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor;
};