use olImageLoadError class to hide unavailable img. non functional changes

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2011-09-17 19:49:11 +00:00
parent 9264d57a3c
commit aec956aa79
2 changed files with 5 additions and 6 deletions

View File

@@ -7,11 +7,15 @@
<title>OpenLayers Basic ESRI Map Cache Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style>
.olImageLoadError {
display: none;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
OpenLayers.Util.onImageLoadError = function() { this.style.display="none";}
var layerExtent = new OpenLayers.Bounds( -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881)
map = new OpenLayers.Map( 'map', {'restrictedExtent': layerExtent} );
layer = new OpenLayers.Layer.XYZ( "ESRI",

View File

@@ -1,10 +1,5 @@
var map, layer;
// if tiles are not available, hide images
//OpenLayers.Util.onImageLoadError = function() {
// this.style.display = "none";
//}
// called on body load
function init() {