fix for maps without attribution control
This commit is contained in:
parent
71399daf00
commit
862cde1056
@ -117,6 +117,7 @@ L.BingLayer = L.TileLayer.extend({
|
|||||||
_update_attribution: function() {
|
_update_attribution: function() {
|
||||||
var bounds = this._map.getBounds();
|
var bounds = this._map.getBounds();
|
||||||
var zoom = this._map.getZoom();
|
var zoom = this._map.getZoom();
|
||||||
|
if(this._map.attributionControl) // check if attributionControl is active
|
||||||
for (var i = 0; i < this._providers.length; i++) {
|
for (var i = 0; i < this._providers.length; i++) {
|
||||||
var p = this._providers[i];
|
var p = this._providers[i];
|
||||||
if ((zoom <= p.zoomMax && zoom >= p.zoomMin) &&
|
if ((zoom <= p.zoomMax && zoom >= p.zoomMin) &&
|
||||||
@ -133,6 +134,7 @@ L.BingLayer = L.TileLayer.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onRemove: function(map) {
|
onRemove: function(map) {
|
||||||
|
if(this._map.attributionControl) // check if attributionControl is activ
|
||||||
for (var i = 0; i < this._providers.length; i++) {
|
for (var i = 0; i < this._providers.length; i++) {
|
||||||
var p = this._providers[i];
|
var p = this._providers[i];
|
||||||
if (p.active) {
|
if (p.active) {
|
||||||
|
Loading…
Reference in New Issue
Block a user