From ca00a84dc52bb12792503e37abbd2f72202eecdd Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sat, 24 Dec 2011 22:09:18 -0600 Subject: [PATCH] Fix cleanup of area outlines with minzoom when switching maps --- web/js/markers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/js/markers.js b/web/js/markers.js index cc765e8c..98c2aec0 100644 --- a/web/js/markers.js +++ b/web/js/markers.js @@ -109,6 +109,9 @@ componentconstructors['markers'] = function(dynmap, configuration) { function createArea(set, area, ts) { var style = { color: area.color, opacity: area.opacity, weight: area.weight, fillOpacity: area.fillopacity, fillColor: area.fillcolor, smoothFactor: 0.0 }; + if(area.our_area && dynmap.map.hasLayer(area.our_area)) + set.layergroup.removeLayer(area.our_area); + if(area.x.length == 2) { /* Only 2 points */ if(area.ytop == area.ybottom) { area.our_area = create2DBoxLayer(area.x[0], area.x[1], area.ytop, area.ybottom, area.z[0], area.z[1], style);