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:
@@ -1,6 +1,7 @@
|
||||
/* 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/Layer/EventPane.js
|
||||
|
||||
if (typeof GMap2 != "undefined") {
|
||||
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
/* 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/Layer/EventPane.js
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Layer.js
|
||||
*/
|
||||
OpenLayers.Layer.VirtualEarth = Class.create();
|
||||
OpenLayers.Layer.VirtualEarth.prototype =
|
||||
Object.extend( new OpenLayers.Layer(), {
|
||||
|
||||
/** Virtual Earth layer is always a base layer.
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
isBaseLayer: true,
|
||||
|
||||
/** @type Boolean */
|
||||
isFixed: true,
|
||||
|
||||
Object.extend( new OpenLayers.Layer.EventPane(), {
|
||||
/** @type VEMap */
|
||||
vemap: null,
|
||||
|
||||
@@ -29,14 +18,14 @@ OpenLayers.Layer.VirtualEarth.prototype =
|
||||
* @param {String} name
|
||||
*/
|
||||
initialize:function(name) {
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
|
||||
OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Map} 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
|
||||
this.loadVEMap();
|
||||
@@ -96,10 +85,10 @@ OpenLayers.Layer.VirtualEarth.prototype =
|
||||
this.vemap.HideDashboard();
|
||||
|
||||
// catch pans and zooms from VE Map
|
||||
this.vemap.AttachEvent("onendcontinuouspan",
|
||||
this.catchPanZoom.bindAsEventListener(this));
|
||||
this.vemap.AttachEvent("onendzoom",
|
||||
this.catchPanZoom.bindAsEventListener(this));
|
||||
//this.vemap.AttachEvent("onendcontinuouspan",
|
||||
// this.catchPanZoom.bindAsEventListener(this));
|
||||
//this.vemap.AttachEvent("onendzoom",
|
||||
// this.catchPanZoom.bindAsEventListener(this));
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user