From ca82f56185616a7b174a8a6cdbeeeaa4a6f1f69c Mon Sep 17 00:00:00 2001 From: James Lyne Date: Fri, 11 Dec 2020 21:38:50 +0000 Subject: [PATCH] Start layer control implementation --- src/api.ts | 4 +- src/components/Map.vue | 10 +-- src/components/map/layer/MapLayer.vue | 4 +- src/components/map/layer/MarkerSetLayer.vue | 7 +- src/components/map/layer/PlayersLayer.vue | 5 +- src/components/sidebar/WorldListItem.vue | 6 +- src/dynmap.d.ts | 4 +- src/leaflet/DynmapMap.ts | 49 +++++++++++++ src/leaflet/control/LayerControl.ts | 78 --------------------- src/leaflet/layer/LayerManager.ts | 32 +++++++++ src/leaflet/map.ts | 29 -------- src/leaflet/tileLayer/DynmapTileLayer.ts | 6 +- src/store/state.ts | 6 +- 13 files changed, 106 insertions(+), 134 deletions(-) create mode 100644 src/leaflet/DynmapMap.ts delete mode 100644 src/leaflet/control/LayerControl.ts create mode 100644 src/leaflet/layer/LayerManager.ts delete mode 100644 src/leaflet/map.ts diff --git a/src/api.ts b/src/api.ts index 85f4094..ba46716 100644 --- a/src/api.ts +++ b/src/api.ts @@ -5,7 +5,7 @@ import { DynmapComponentConfig, DynmapConfigurationResponse, DynmapLine, - DynmapMap, + DynmapWorldMap, DynmapMarker, DynmapMarkerSet, DynmapMarkerSetUpdates, @@ -60,7 +60,7 @@ function buildWorlds(response: AxiosResponse): Array { worlds: Array = []; (data.worlds || []).forEach((world: any) => { - const maps: Map = new Map(); + const maps: Map = new Map(); (world.maps || []).forEach((map: any) => { maps.set(map.name, { diff --git a/src/components/Map.vue b/src/components/Map.vue index c3c9637..e24f84f 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -14,7 +14,6 @@