Loading src/js/AstroMap.js +1 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,6 @@ export default L.Map.AstroMap = L.Map.extend({ this.SLDStyler.symbolize_with_icons(this._geoLayers[i], this); } else { this._geoLayers[i].removeFrom(this); this.SLDStyler.remove_symbols(); } } } Loading @@ -240,6 +239,7 @@ export default L.Map.AstroMap = L.Map.extend({ if(this._geoLayers[i] && this._geoLayers[i].options.id === collectionId){ let wrappedFeatures = this.cloneWestEast(myFeatures); this._geoLayers[i].addData(wrappedFeatures); this.SLDStyler.symbolize_with_icons(this._geoLayers[i], this); } } Loading src/leaflet.sld.js +8 −8 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ L.SLDStyler = L.Class.extend({ } }, initialize: function(sldStringOrXml, options) { this.symbols = []; L.Util.setOptions(this, options); if (sldStringOrXml !== undefined) { this.featureTypeStylesNameMap = {}; Loading Loading @@ -522,15 +523,14 @@ L.SLDStyler = L.Class.extend({ svgElement.innerHTML = symbol; svgElementBounds = [ [ point.y - 0.05, point.x + 0.05 ], [ point.y , point.x ] ]; L.svgOverlay(svgElement, svgElementBounds).addTo(map); const addedSymbol = L.svgOverlay(svgElement, svgElementBounds).addTo(map); this.symbols.push(addedSymbol); }, remove_symbols: function(){ let element = null // for (var i in svg_ids) // { // element = document.getElementById(i); // element.remove(); // } remove_symbols: function(map){ for (var i = 0; i < this.symbols.length; i++) { this.symbols[i].removeFrom(map); } this.symbols = []; } }); Loading Loading
src/js/AstroMap.js +1 −1 Original line number Diff line number Diff line Loading @@ -229,7 +229,6 @@ export default L.Map.AstroMap = L.Map.extend({ this.SLDStyler.symbolize_with_icons(this._geoLayers[i], this); } else { this._geoLayers[i].removeFrom(this); this.SLDStyler.remove_symbols(); } } } Loading @@ -240,6 +239,7 @@ export default L.Map.AstroMap = L.Map.extend({ if(this._geoLayers[i] && this._geoLayers[i].options.id === collectionId){ let wrappedFeatures = this.cloneWestEast(myFeatures); this._geoLayers[i].addData(wrappedFeatures); this.SLDStyler.symbolize_with_icons(this._geoLayers[i], this); } } Loading
src/leaflet.sld.js +8 −8 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ L.SLDStyler = L.Class.extend({ } }, initialize: function(sldStringOrXml, options) { this.symbols = []; L.Util.setOptions(this, options); if (sldStringOrXml !== undefined) { this.featureTypeStylesNameMap = {}; Loading Loading @@ -522,15 +523,14 @@ L.SLDStyler = L.Class.extend({ svgElement.innerHTML = symbol; svgElementBounds = [ [ point.y - 0.05, point.x + 0.05 ], [ point.y , point.x ] ]; L.svgOverlay(svgElement, svgElementBounds).addTo(map); const addedSymbol = L.svgOverlay(svgElement, svgElementBounds).addTo(map); this.symbols.push(addedSymbol); }, remove_symbols: function(){ let element = null // for (var i in svg_ids) // { // element = document.getElementById(i); // element.remove(); // } remove_symbols: function(map){ for (var i = 0; i < this.symbols.length; i++) { this.symbols[i].removeFrom(map); } this.symbols = []; } }); Loading