diff --git a/src/providers/Pl3xmapMapProvider.ts b/src/providers/Pl3xmapMapProvider.ts index 40a8770..7bd2982 100644 --- a/src/providers/Pl3xmapMapProvider.ts +++ b/src/providers/Pl3xmapMapProvider.ts @@ -205,10 +205,10 @@ export default class Pl3xmapMapProvider extends MapProvider { const id = set.id; - const markers: Map = new Map(), - circles: Map = new Map(), - areas: Map = new Map(), - lines: Map = new Map(); + const markers: Map = Object.freeze(new Map()), + circles: Map = Object.freeze(new Map()), + areas: Map = Object.freeze(new Map()), + lines: Map = Object.freeze(new Map()); (set.markers || []).forEach((marker: any) => { switch(marker.type) { @@ -258,7 +258,7 @@ export default class Pl3xmapMapProvider extends MapProvider { } private static buildMarker(marker: any): LiveAtlasMarker { - return { + return Object.seal({ location: { x: marker.point?.x || 0, y: 0, @@ -269,7 +269,7 @@ export default class Pl3xmapMapProvider extends MapProvider { label: (marker.tooltip || '').trim(), isLabelHTML: true - }; + }); } private static buildRectangle(area: any): LiveAtlasArea {