Skip to content

Commit

Permalink
final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanderp committed Nov 25, 2023
1 parent 59b476b commit e1b6e25
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 21 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"paren",
"plusplus",
"popperjs",
"rotatedmarker",
"sonarjs",
"wvdp",
"youtu.be",
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 82 additions & 16 deletions src/static/camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions utils/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,17 @@ const queryNominatim = async (lat: number, lon: number): Promise<NominatimRespon

const nominatim = await queryNominatim(r.lat, r.lon);

let direction = Number(r.tags['camera:direction']);
if (Number.isNaN(direction)) {
direction = Number(r.tags.direction);
}
const direction = [
r.tags['camera:direction'],
r.tags.direction
]
.map((d) => Number(d))
.find((d) => !Number.isNaN(d));

webcams.push({
lat: r.lat,
lon: r.lon,
direction: Number.isNaN(direction) ? undefined : direction,
direction: direction,

osmID: r.id,
user: r.user,
Expand Down

0 comments on commit e1b6e25

Please sign in to comment.