openlayers madness
This commit is contained in:
parent
b95e9d2759
commit
b2b6892a45
54 changed files with 8021 additions and 10 deletions
60
public/lib/OpenLayers/Tile/Image.js
Normal file
60
public/lib/OpenLayers/Tile/Image.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
// @require: OpenLayers/Tile.js
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Tile.Image = Class.create();
|
||||
OpenLayers.Tile.Image.prototype =
|
||||
Object.extend( new OpenLayers.Tile(), {
|
||||
|
||||
/** @type DOMElement img */
|
||||
imgDiv:null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Grid} layer
|
||||
* @param {OpenLayers.Pixel} position
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* @param {String} url
|
||||
* @param {OpenLayers.Size} size
|
||||
*/
|
||||
initialize: function(layer, position, bounds, url, size) {
|
||||
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if ((this.imgDiv != null) && (this.imgDiv.parentNode == this.layer.div)) {
|
||||
this.layer.div.removeChild(this.imgDiv);
|
||||
}
|
||||
this.imgDiv = null;
|
||||
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
*/
|
||||
draw:function(transparent) {
|
||||
if (false) { // don't actually use the alpha PNG hack right now
|
||||
// it has a fiercely bad effect on IE6's performance
|
||||
// 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);
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Tile.Image"
|
||||
}
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue