diff --git a/src/map/map.ts b/src/map/map.ts index cb5ae3a..01d9c29 100644 --- a/src/map/map.ts +++ b/src/map/map.ts @@ -321,10 +321,10 @@ export abstract class BaseMap extends Events implements BaseMapDefinition { mapLayers: LayerGroup[] = []; get markerIcons(): Map { return new Map( - [...this.plugin.markerIcons, ...(this.options.localMarkerTypes ?? [])].map((markerIcon) => [ - markerIcon.type, - markerIcon - ]) + [ + ...this.plugin.markerIcons, + ...(this.options.localMarkerTypes ?? []) + ].map((markerIcon) => [markerIcon.type, markerIcon]) ); } get markerTypes() { @@ -1481,10 +1481,9 @@ export class RealMap extends BaseMap { this.log("Building initial map layer."); - const tileServer = - this.plugin.app.vault.config.theme == "moonstone" - ? this.plugin.data.defaultTile - : this.plugin.data.defaultTileDark; + const tileServer = document.body.hasClass("theme-light") + ? this.plugin.data.defaultTile + : this.plugin.data.defaultTileDark; let osmLayer = { id: "real",