Skip to content

Commit

Permalink
Fix Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 2, 2024
1 parent d42703f commit 959fd1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/web/src/stores/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const useMapStore = defineStore('cloudtak', {

return null;
},
listTerrain: async function(): APIList<Basemap> {
listTerrain: async function(): Promise<APIList<Basemap>> {
// Courtesy add terrain data
const burl = stdurl('/api/basemap');
burl.searchParams.append('type', 'raster-dem');
Expand All @@ -114,13 +114,13 @@ export const useMapStore = defineStore('cloudtak', {
},

// TODO: Convert to overlay
addTerrain: async function(): void {
addTerrain: async function(): Promise<void> {
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({
Expand Down

0 comments on commit 959fd1b

Please sign in to comment.