From 959fd1b9f4c85ab71f12dcd5261a98fc9a088377 Mon Sep 17 00:00:00 2001 From: ingalls Date: Wed, 2 Oct 2024 10:55:18 -0400 Subject: [PATCH] Fix Lints --- api/web/src/stores/map.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/web/src/stores/map.ts b/api/web/src/stores/map.ts index dcafb6b29..28e131bbd 100644 --- a/api/web/src/stores/map.ts +++ b/api/web/src/stores/map.ts @@ -103,7 +103,7 @@ export const useMapStore = defineStore('cloudtak', { return null; }, - listTerrain: async function(): APIList { + listTerrain: async function(): Promise> { // Courtesy add terrain data const burl = stdurl('/api/basemap'); burl.searchParams.append('type', 'raster-dem'); @@ -114,13 +114,13 @@ export const useMapStore = defineStore('cloudtak', { }, // TODO: Convert to overlay - addTerrain: async function(): void { + addTerrain: async function(): Promise { const basemaps = await this.listTerrain(); - if (basemaps.items.length && !this.map.getSource('-2')) { + if (this.map && basemaps.items.length && !this.map.getSource('-2')) { this.map.addSource('-2', { type: 'raster-dem', url: String(stdurl(`/api/basemap/${basemaps.items[0].id}/tiles?token=${localStorage.token}`)), - tileSize: 256 + tileSize: 256 }) this.map.setTerrain({