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:
@@ -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",
|
||||
|
||||
@@ -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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user