Skip to content

Commit

Permalink
2024 map app
Browse files Browse the repository at this point in the history
  • Loading branch information
russss committed Mar 3, 2024
1 parent bcc7409 commit 17977c4
Show file tree
Hide file tree
Showing 297 changed files with 9,806 additions and 15,271 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
output/
tegola-cache/
web-assets/
.vscode
1 change: 1 addition & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build: ../buildmap
volumes:
- ../buildmap:/buildmap
- ../powerplan:/powerplan
web:
build:
context: ./web
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ services:
image: "ghcr.io/emfcamp/buildmap:latest"
volumes:
- .:/config
- ../gis-2022:/gis-2022
- ../gis-2024:/gis-2024
- ./output:/output
- ./web-assets:/web
command: "/gis-2022/map.json /config/local.conf.json"
command: "/gis-2024/map.json /config/local.conf.json"
networks:
- default
depends_on:
- db

db:
image: "postgis/postgis:13-3.2-alpine"
image: "postgis/postgis:15-3.4-alpine"
networks:
- default
environment:
Expand All @@ -23,7 +23,7 @@ services:
restart: unless-stopped

tegola:
image: "gospatial/tegola:v0.14.0"
image: "gospatial/tegola:v0.19.0"
ports:
- 127.0.0.1:8888:8080
volumes:
Expand Down
17 changes: 17 additions & 0 deletions web/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off"
},
"env": {
"browser": true,
"es2021": true
}
}
5 changes: 5 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
node_modules
dist

public/pwa-*.png
public/maskable-icon-*.png
public/apple-touch-icon-*.png
public/favicon.ico
10 changes: 10 additions & 0 deletions web/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import("prettier").Options} */
const config = {
trailingComma: "es5",
tabWidth: 4,
semi: false,
singleQuote: true,
printWidth: 110,
};

export default config;
2 changes: 1 addition & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:17-alpine
FROM node:18-slim

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion web/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:17
FROM node:18-slim

# Source mounted into /app
WORKDIR /app
Expand Down
17 changes: 17 additions & 0 deletions web/export_style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import path from 'node:path'
import fs from 'node:fs'
import generateStyle from './src/style'

const styles_path = path.join('./public', 'styles')

fs.mkdirSync(styles_path, { recursive: true })

fs.writeFileSync(
path.join(styles_path, 'style-basic.json'),
JSON.stringify(generateStyle('basic', 'https://map.emfcamp.org', '/'))
)

fs.writeFileSync(
path.join(styles_path, 'style-basic-dark.json'),
JSON.stringify(generateStyle('basic', 'https://map.emfcamp.org', '/', 'dark'))
)
27 changes: 27 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html lang="en">
<head>
<script type="module" rel="preload" src="/src/index.ts"></script>
<meta
name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"
/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="description" content="Electromagnetic Field 2024 Map" />
<meta name="theme-color" content="#171123" />
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="icon" href="/icon.svg" sizes="any" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
<title>Electromagnetic Field 2024 Map</title>
</head>
<body>
<noscript>You need Javascript enabled to view this map.</noscript>
<div id="map">
<header>
<h1>Electromagnetic Field 2024</h1>
<div id="subtitle">Eastnor Castle Deer Park, Herefordshire, UK</div>
</header>
</div>
<div id="distance" class="distance-container"></div>
</body>
</html>
11 changes: 11 additions & 0 deletions web/map.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"folders": [
{
"path": ".."
},
{
"path": "../../buildmap"
}
],
"settings": {}
}
Loading

0 comments on commit 17977c4

Please sign in to comment.