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
|
* @class
|
||||||
*/
|
*/
|
||||||
OpenLayers.Layer.Google = Class.create();
|
OpenLayers.Layer.Google = Class.create();
|
||||||
OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
OpenLayers.Layer.Google.prototype =
|
||||||
|
Object.extend( new OpenLayers.Layer.EventPane(), {
|
||||||
|
|
||||||
/** Google layer is always base layer
|
|
||||||
*
|
|
||||||
* @type Boolean
|
|
||||||
*/
|
|
||||||
isBaseLayer: true,
|
|
||||||
|
|
||||||
/** @type Boolean */
|
/** @type Boolean */
|
||||||
isFixed: true,
|
isFixed: true,
|
||||||
@@ -74,8 +68,7 @@ OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
* @param {String} name
|
* @param {String} name
|
||||||
*/
|
*/
|
||||||
initialize: function(name, options) {
|
initialize: function(name, options) {
|
||||||
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
|
OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
if (this.maxExtent == null) {
|
if (this.maxExtent == null) {
|
||||||
this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90);
|
this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90);
|
||||||
}
|
}
|
||||||
@@ -86,14 +79,14 @@ OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
*/
|
*/
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.gmap = null;
|
this.gmap = null;
|
||||||
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
|
OpenLayers.Layer.EventPane.prototype.destroy.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 it
|
// once our layer has been added to the map, we can load it
|
||||||
this.loadGMap();
|
this.loadGMap();
|
||||||
|
|||||||
Reference in New Issue
Block a user