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.
|
/* 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") {
|
||||||
|
|
||||||
|
|||||||
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user