From ca3aa5eabbb8440631ad8611bcb11e1e47e418a5 Mon Sep 17 00:00:00 2001 From: john gravois Date: Thu, 13 Nov 2014 09:32:19 -0800 Subject: [PATCH] only add logo control to map once remove blank line make private --- src/Controls/Logo.js | 2 +- src/Layers/BasemapLayer.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Controls/Logo.js b/src/Controls/Logo.js index f3da2b8df..5d751890f 100644 --- a/src/Controls/Logo.js +++ b/src/Controls/Logo.js @@ -12,7 +12,7 @@ EsriLeaflet.Controls.Logo = L.Control.extend({ div.style.marginLeft = this.options.marginLeft; div.style.marginBottom = this.options.marginBottom; div.style.marginRight = this.options.marginRight; - div.innerHTML = ''; + div.innerHTML = ''; return div; } }); diff --git a/src/Layers/BasemapLayer.js b/src/Layers/BasemapLayer.js index a653c6072..7b6f56c17 100644 --- a/src/Layers/BasemapLayer.js +++ b/src/Layers/BasemapLayer.js @@ -208,12 +208,14 @@ if(config.attributionUrl){ this._getAttributionData(config.attributionUrl); } + this._logo = new EsriLeaflet.Controls.Logo({ + position: this.options.logoPosition + }); }, onAdd: function(map){ - if(!this.options.hideLogo){ - this._logo = new EsriLeaflet.Controls.Logo({ - position: this.options.logoPosition - }).addTo(map); + if(!this.options.hideLogo && !map._hasEsriLogo){ + this._logo.addTo(map); + map._hasEsriLogo = true; } // if(this.options.pane && EsriLeaflet.Support.pointerEvents){