Skip to content

Commit f91bb12

Browse files
fix: map example
1 parent 01aae44 commit f91bb12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/map/src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { geoJSON, GeoJSON, Map } from "leaflet"
33
import { amdb, auth } from "./navigraph"
44
import "leaflet/dist/leaflet.css"
55
import "./style.css"
6-
import { allLayers, AmdbLayerName, AmdbSearchResult } from "@navigraph/amdb"
6+
import { allLayers, AmdbLayerName, AmdbSearchResponse } from "@navigraph/amdb"
77
import getAmdbLayers from "@navigraph/amdb/src/api/getAmdbLayers"
88

99
// Instantiate a Leaflet map and set view to Sweden
@@ -32,14 +32,14 @@ document.querySelectorAll<HTMLButtonElement>(".themes > button").forEach(el => {
3232
})
3333
})
3434

35-
let airport: AmdbSearchResult | null = null
35+
let airport: AmdbSearchResponse | null = null
3636

3737
const visibleAmdbLayers: AmdbLayerName[] = []
3838

3939
let currentAmdbLayer: GeoJSON | null = null
4040

4141
async function updateAmdb() {
42-
;(document.querySelectorAll(".amdb-layer") as NodeListOf<HTMLButtonElement>).forEach(element => {
42+
(document.querySelectorAll(".amdb-layer") as NodeListOf<HTMLButtonElement>).forEach(element => {
4343
element.style.backgroundColor = visibleAmdbLayers.includes(element.id as AmdbLayerName) ? "green" : ""
4444
})
4545

0 commit comments

Comments
 (0)