making attribution as Terms of Service compliant as we possibly can. p=bartvde (closes #3330)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12070 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-06-07 23:49:35 +00:00
parent f27073e6d3
commit 576b210657
5 changed files with 157 additions and 57 deletions

View File

@@ -86,7 +86,9 @@ OpenLayers.Tile.Google = OpenLayers.Class(OpenLayers.Tile, {
* {Boolean} Always returns true.
*/
draw: function() {
var layerType = this.layer.mapObject.mapTypes[this.layer.type];
var layerType = OpenLayers.Layer.GoogleNG.mapObject.mapTypes[
this.layer.type
];
if (layerType && OpenLayers.Tile.prototype.draw.apply(this, arguments)) {
var xyz = this.layer.getXYZ(this.bounds);
var point = new google.maps.Point(xyz.x, xyz.y);
@@ -143,7 +145,9 @@ OpenLayers.Tile.Google = OpenLayers.Class(OpenLayers.Tile, {
if (this.node) {
this.node.parentNode &&
this.node.parentNode.removeChild(this.node);
this.layer.mapObject.mapTypes[this.layer.type].releaseTile(this.node);
OpenLayers.Layer.GoogleNG.mapObject.mapTypes[
this.layer.type
].releaseTile(this.node);
}
},