diff --git a/examples/freemap.html b/examples/freemap.html
index 6403596e48..9b292541e8 100644
--- a/examples/freemap.html
+++ b/examples/freemap.html
@@ -33,10 +33,10 @@
{map: '/www/freemap.in/boston/map/mass.map', layers: 'border,water,roads', format: 'png'} );
var rapid = new OpenLayers.Layer.WMS( "Rapid Transit",
"http://boston.freemap.in/cgi-bin/mapserv?",
- {map: '/www/freemap.in/boston/map/mass.map', layers: 'rapid_transit', format: 'png'} );
+ {map: '/www/freemap.in/boston/map/mass.map', layers: 'rapid_transit', format: 'png', transparent:'true'} );
var buildings = new OpenLayers.Layer.WMS( "Buildings",
"http://boston.freemap.in/cgi-bin/mapserv?",
- {map: '/www/freemap.in/boston/map/mass.map', layers: 'buildings', format: 'png'} );
+ {map: '/www/freemap.in/boston/map/mass.map', layers: 'buildings', format: 'png', transparent:'true'} );
map.addLayer(basemap);
map.addLayer(rapid);
diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js
index e7dc1d61cc..9ce026342c 100644
--- a/lib/OpenLayers/Control/MouseDefaults.js
+++ b/lib/OpenLayers/Control/MouseDefaults.js
@@ -55,6 +55,7 @@ OpenLayers.Control.MouseDefaults.prototype =
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
this.map.viewPortDiv.appendChild(this.zoomBox);
}
+ document.onselectstart=function() { return false; }
Event.stop(evt);
},
@@ -111,6 +112,7 @@ OpenLayers.Control.MouseDefaults.prototype =
} else {
this.map.setCenter(this.map.center);
}
+ document.onselectstart=null;
this.mouseDragStart = null;
this.map.div.style.cursor = "default";
},
diff --git a/lib/OpenLayers/Control/MouseToolbar.js b/lib/OpenLayers/Control/MouseToolbar.js
index 92311835ff..1b4e682cfe 100644
--- a/lib/OpenLayers/Control/MouseToolbar.js
+++ b/lib/OpenLayers/Control/MouseToolbar.js
@@ -164,6 +164,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this.map.div.style.cursor = "move";
break;
}
+ document.onselectstart = function() { return false; }
Event.stop(evt);
},
@@ -247,6 +248,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this.map.setCenter(this.map.center);
}
+ document.onselectstart = null;
this.mouseDragStart = null;
this.map.div.style.cursor = "default";
},
diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js
index 5bc9785bca..736972b30f 100644
--- a/lib/OpenLayers/Layer/Grid.js
+++ b/lib/OpenLayers/Layer/Grid.js
@@ -146,7 +146,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left),
tileoffsety - parseInt(this.map.layerContainerDiv.style.top))
);
- tile.draw();
+ tile.draw((this.params.TRANSPARENT == 'true'));
row.append(tile);
tileoffsetlon += tilelon;
@@ -181,7 +181,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
bounds.top = bounds.top + deltaLat;
position.y = position.y + deltaY;
var newTile = this.addTile(bounds, position);
- newTile.draw();
+ newTile.draw((this.params.TRANSPARENT == 'true'));
newRow.append(newTile);
}
@@ -215,7 +215,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
bounds.right = bounds.right + deltaLon;
position.x = position.x + deltaX;
var newTile = this.addTile(bounds, position);
- newTile.draw();
+ newTile.draw((this.params.TRANSPARENT == 'true'));
if (prepend) {
row = row.prepend(newTile);
diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js
index 9e1f536435..d0e21f7f50 100644
--- a/lib/OpenLayers/Layer/WMS.js
+++ b/lib/OpenLayers/Layer/WMS.js
@@ -47,7 +47,7 @@ OpenLayers.Layer.WMS.prototype =
* @type Boolean
*/
isBaseLayer: function() {
- return (this.params.TRANSPARENT != true);
+ return (this.params.TRANSPARENT != 'true');
},
/**
diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js
index e4b113cdc4..fa201ed675 100644
--- a/lib/OpenLayers/Tile/Image.js
+++ b/lib/OpenLayers/Tile/Image.js
@@ -35,12 +35,20 @@ OpenLayers.Tile.Image.prototype =
/**
*/
- draw:function() {
- this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
- this.position,
- this.size,
- this.url,
- "absolute");
+ draw:function(transparent) {
+ if (transparent) {
+ this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
+ this.position,
+ this.size,
+ this.url,
+ "absolute");
+ } else {
+ this.imgDiv = OpenLayers.Util.createImage(null,
+ this.position,
+ this.size,
+ this.url,
+ "absolute");
+ }
this.layer.div.appendChild(this.imgDiv);
},