Fixed Layer.Google to subclass Layer.EventPane. Still need to fix z-index of copyright divs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1195 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -35,14 +35,8 @@ if (typeof GMap2 != "undefined") {
|
||||
* @class
|
||||
*/
|
||||
OpenLayers.Layer.Google = Class.create();
|
||||
OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
|
||||
|
||||
/** Google layer is always base layer
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
isBaseLayer: true,
|
||||
OpenLayers.Layer.Google.prototype =
|
||||
Object.extend( new OpenLayers.Layer.EventPane(), {
|
||||
|
||||
/** @type Boolean */
|
||||
isFixed: true,
|
||||
@@ -74,8 +68,7 @@ OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
* @param {String} name
|
||||
*/
|
||||
initialize: function(name, options) {
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
|
||||
|
||||
OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
|
||||
if (this.maxExtent == null) {
|
||||
this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90);
|
||||
}
|
||||
@@ -86,14 +79,14 @@ OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
*/
|
||||
destroy: function() {
|
||||
this.gmap = null;
|
||||
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
|
||||
OpenLayers.Layer.EventPane.prototype.destroy.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 it
|
||||
this.loadGMap();
|
||||
@@ -489,4 +482,4 @@ OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Layer.Google"
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user