altered VirtualEarth to subclass EventPane.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1207 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-08-15 01:48:55 +00:00
parent c1b8c8dd60
commit 846a11a004
2 changed files with 72 additions and 82 deletions
+1
View File
@@ -1,6 +1,7 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
// @require: OpenLayers/Layer/EventPane.js
if (typeof GMap2 != "undefined") { if (typeof GMap2 != "undefined") {
+8 -19
View File
@@ -1,25 +1,14 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
// @require: OpenLayers/Layer/EventPane.js
/** /**
* @class * @class
*
* @requires OpenLayers/Layer.js
*/ */
OpenLayers.Layer.VirtualEarth = Class.create(); OpenLayers.Layer.VirtualEarth = Class.create();
OpenLayers.Layer.VirtualEarth.prototype = OpenLayers.Layer.VirtualEarth.prototype =
Object.extend( new OpenLayers.Layer(), { Object.extend( new OpenLayers.Layer.EventPane(), {
/** Virtual Earth layer is always a base layer.
*
* @type Boolean
*/
isBaseLayer: true,
/** @type Boolean */
isFixed: true,
/** @type VEMap */ /** @type VEMap */
vemap: null, vemap: null,
@@ -29,14 +18,14 @@ OpenLayers.Layer.VirtualEarth.prototype =
* @param {String} name * @param {String} name
*/ */
initialize:function(name) { initialize:function(name) {
OpenLayers.Layer.prototype.initialize.apply(this, arguments); OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
}, },
/** /**
* @param {OpenLayers.Map} map * @param {OpenLayers.Map} map
*/ */
setMap:function(map) { setMap:function(map) {
OpenLayers.Layer.prototype.setMap.apply(this, arguments); OpenLayers.Layer.EventPane.prototype.setMap.apply(this, arguments);
// once our layer has been added to the map, we can load the vemap // once our layer has been added to the map, we can load the vemap
this.loadVEMap(); this.loadVEMap();
@@ -96,10 +85,10 @@ OpenLayers.Layer.VirtualEarth.prototype =
this.vemap.HideDashboard(); this.vemap.HideDashboard();
// catch pans and zooms from VE Map // catch pans and zooms from VE Map
this.vemap.AttachEvent("onendcontinuouspan", //this.vemap.AttachEvent("onendcontinuouspan",
this.catchPanZoom.bindAsEventListener(this)); // this.catchPanZoom.bindAsEventListener(this));
this.vemap.AttachEvent("onendzoom", //this.vemap.AttachEvent("onendzoom",
this.catchPanZoom.bindAsEventListener(this)); // this.catchPanZoom.bindAsEventListener(this));
} }
}, },