reduce memory usage for icon cache a bit.

This commit is contained in:
Matthias Wirth
2020-03-16 08:15:17 +01:00
parent 82b650a147
commit ea010179ec
2 changed files with 11 additions and 15 deletions

View File

@@ -723,14 +723,10 @@ PlaneObject.prototype.updateIcon = function() {
this.rotationCache = this.rotation;
if (iconCache[svgKey] == undefined) {
var svgKey2 = col + '!' + this.shape + '!' + outline;
var svgKey3 = col + '!' + this.shape + '!' + '';
var svgURI2 = svgPathToURI(this.baseMarker.svg, OutlineADSBColor, col, outline);
var svgURI3 = svgPathToURI(this.baseMarker.svg, OutlineADSBColor, col, '');
addToIconCache.push([svgKey2, null, svgURI2]);
addToIconCache.push([svgKey3, null, svgURI3]);
var svgURI = svgPathToURI(this.baseMarker.svg, OutlineADSBColor, col, add_stroke);
addToIconCache.push([svgKey, null, svgURI]);
this.markerIcon = new ol.style.Icon({
scale: this.scale,
imgSize: this.baseMarker.size,