remove redundant layer check...it's done in removeLabel function too

This commit is contained in:
Philipp Schaefer 2014-03-25 01:09:10 +01:00
parent e6c7858eca
commit 16212b2032

View File

@ -52,10 +52,8 @@ window.plugin.portalLevelNumbers.removeLabel = function(guid) {
} }
window.plugin.portalLevelNumbers.addLabel = function(guid,latLng) { window.plugin.portalLevelNumbers.addLabel = function(guid,latLng) {
// remove old layer before updating // remove old layer before updating
var previousLayer = window.plugin.portalLevelNumbers.levelLayers[guid]; window.plugin.portalLevelNumbers.removeLabel(guid);
if (previousLayer) window.plugin.portalLevelNumbers.removeLabel(guid);
// add portal level to layers // add portal level to layers
var p = window.portals[guid]; var p = window.portals[guid];