making pink tiles a css matter. p=rdewit, r=me (closes #2318)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9758 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -176,6 +176,19 @@
|
||||
|
||||
}
|
||||
|
||||
function test_Util_imageLoadError(t) {
|
||||
t.plan(2);
|
||||
|
||||
var blank_image_url = OpenLayers.Util.getImagesLocation() + "blank.gif";
|
||||
var img = OpenLayers.Util.createImage(null, null, null, null, null, null,
|
||||
null, false);
|
||||
|
||||
img._attempts = OpenLayers.IMAGE_RELOAD_ATTEMPTS + 1;
|
||||
OpenLayers.Util.onImageLoadError.call(img);
|
||||
t.ok(OpenLayers.Util.isEquivalentUrl(blank_image_url, img.src), 'broken image correctly has url for blank image as src');
|
||||
t.ok(OpenLayers.Element.hasClass(img, 'olImageLoadError'), 'broken image has class olImageLoadError');
|
||||
}
|
||||
|
||||
function test_Util_applyDefaults(t) {
|
||||
|
||||
t.plan(12);
|
||||
|
||||
@@ -4,21 +4,27 @@
|
||||
href="../../theme/default/style.css"
|
||||
rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid #4B3624;
|
||||
background: White;
|
||||
}
|
||||
#map {
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid #4B3624;
|
||||
background: White;
|
||||
}
|
||||
|
||||
/* avoid pink tiles */
|
||||
.olImageLoadError {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.olControlAttribution { bottom: 0px!important }
|
||||
</style>
|
||||
<script src="../../lib/OpenLayers.js"
|
||||
type="text/javascript"></script>
|
||||
<script type="text/javascript">var map;
|
||||
|
||||
// avoid pink tiles
|
||||
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
|
||||
OpenLayers.Util.onImageLoadErrorColor = "transparent";
|
||||
// increase reload attempts
|
||||
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
|
||||
|
||||
var vectorLayer;
|
||||
var markerLayer, boxes, newPoint;
|
||||
@@ -120,4 +126,4 @@ Zoom 6. No lines.</p>
|
||||
<button onClick="zoomToScale(7);">Zoom 7</button>
|
||||
<button onClick="zoomToScale(8);">Zoom 8</button>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
height: 255px;
|
||||
}
|
||||
|
||||
/* avoid pink tiles */
|
||||
.olImageLoadError {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -33,8 +38,9 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
var evenmap, oddmap;
|
||||
|
||||
// increase reload attempts
|
||||
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
|
||||
OpenLayers.Util.onImageLoadErrorColor = "transparent";
|
||||
|
||||
function init(){
|
||||
evenmap = new OpenLayers.Map('evenmap');
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script src='http://maps.google.com/maps?file=api&v=2.82&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
|
||||
@@ -22,9 +23,8 @@
|
||||
// make map available for easy debugging
|
||||
var map;
|
||||
|
||||
// avoid pink tiles
|
||||
// increase reload attempts
|
||||
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
|
||||
OpenLayers.Util.onImageLoadErrorColor = "transparent";
|
||||
|
||||
function init(){
|
||||
var options = {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src='http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js'></script>
|
||||
<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script>
|
||||
|
||||
<script src="../../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -16,9 +16,8 @@
|
||||
// make map available for easy debugging
|
||||
var map;
|
||||
|
||||
// avoid pink tiles
|
||||
// increase reload attempts
|
||||
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
|
||||
OpenLayers.Util.onImageLoadErrorColor = "transparent";
|
||||
|
||||
function init(){
|
||||
var options = {
|
||||
|
||||
Reference in New Issue
Block a user