Compare commits
10 commits
3b1730386b
...
fa281bfc8a
Author | SHA1 | Date | |
---|---|---|---|
|
fa281bfc8a | ||
|
03352b4644 | ||
|
ee60d47cc2 | ||
|
98cef012af | ||
|
62f876ed52 | ||
|
3527ad1f52 | ||
|
5efa3fb452 | ||
|
ddf9229b3e | ||
|
ad38b676d6 | ||
|
f63787fd03 |
8 changed files with 1864 additions and 1393 deletions
6
lightning/Dockerfile
Normal file
6
lightning/Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# syntax=docker/dockerfile:experimental
|
||||||
|
|
||||||
|
FROM node:alpine
|
||||||
|
COPY . .
|
||||||
|
CMD npm run start
|
||||||
|
EXPOSE 3000
|
5
lightning/build
Executable file
5
lightning/build
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pnpm install &&
|
||||||
|
pnpm run build &&
|
||||||
|
docker build -t lightning .
|
|
@ -7,28 +7,28 @@
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.16.12",
|
"@types/node": "^18.19.3",
|
||||||
"esbuild": "^0.14.54",
|
"esbuild": "^0.14.54",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.32",
|
||||||
"solid-start-node": "^0.2.26",
|
"solid-start-node": "^0.2.32",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"vite": "^4.3.7"
|
"vite": "^4.5.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@deck.gl/layers": "^8.9.15",
|
"@deck.gl/layers": "^8.9.33",
|
||||||
"@deck.gl/mapbox": "^8.9.15",
|
"@deck.gl/mapbox": "^8.9.33",
|
||||||
"@deck.gl/mesh-layers": "^8.9.15",
|
"@deck.gl/mesh-layers": "^8.9.33",
|
||||||
"@solidjs/meta": "^0.28.5",
|
"@solidjs/meta": "^0.28.7",
|
||||||
"@solidjs/router": "^0.8.2",
|
"@solidjs/router": "^0.8.4",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.16",
|
||||||
"mapbox-gl": "npm:empty-npm-package@^1.0.0",
|
"mapbox-gl": "npm:empty-npm-package@^1.0.0",
|
||||||
"maplibre-gl": "^2.4.0",
|
"maplibre-gl": "^2.4.0",
|
||||||
"solid-headless": "^0.13.1",
|
"solid-headless": "^0.13.1",
|
||||||
"solid-js": "^1.7.5",
|
"solid-js": "^1.8.7",
|
||||||
"solid-map-gl": "^1.7.2",
|
"solid-map-gl": "^1.10.2",
|
||||||
"solid-start": "^0.2.26",
|
"solid-start": "^0.2.32",
|
||||||
"tailwindcss": "^3.3.2",
|
"tailwindcss": "^3.3.6",
|
||||||
"undici": "^5.22.1"
|
"undici": "^5.28.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.8"
|
"node": ">=16.8"
|
||||||
|
|
3193
lightning/pnpm-lock.yaml
generated
3193
lightning/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,6 @@ const MapIconLayer = unstable_clientOnly(() => import('~/components/map/MapIconL
|
||||||
import 'maplibre-gl/dist/maplibre-gl.css';
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
||||||
import StyleJson from '~/style/style.json';
|
import StyleJson from '~/style/style.json';
|
||||||
|
|
||||||
export const [mapIcons, setMapIcons] = createSignal([]);
|
|
||||||
|
|
||||||
export const [mapRotate, setMapRotate] = createSignal(false);
|
export const [mapRotate, setMapRotate] = createSignal(false);
|
||||||
createEffect(() => console.log('Rotate:', mapRotate()));
|
createEffect(() => console.log('Rotate:', mapRotate()));
|
||||||
|
|
|
@ -15,6 +15,11 @@ export default function MapIconLayer(props: any) {
|
||||||
|
|
||||||
createEffect(() => console.log("Watch me update but not trigger a render!", stations()));
|
createEffect(() => console.log("Watch me update but not trigger a render!", stations()));
|
||||||
|
|
||||||
|
function deezCompare() {
|
||||||
|
console.log('comparing');
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Show when={stations()}>
|
<Show when={stations()}>
|
||||||
<Layer customLayer={
|
<Layer customLayer={
|
||||||
|
@ -30,6 +35,8 @@ export default function MapIconLayer(props: any) {
|
||||||
getPosition: d => [d.Loc.Coordinates[1], d.Loc.Coordinates[0]],
|
getPosition: d => [d.Loc.Coordinates[1], d.Loc.Coordinates[0]],
|
||||||
getSize: d => 3,
|
getSize: d => 3,
|
||||||
getColor: d => [d.Dist * 100, 140 - (d.Dist * 50), 0],
|
getColor: d => [d.Dist * 100, 140 - (d.Dist * 50), 0],
|
||||||
|
dataComparator: deezCompare,
|
||||||
|
_dataDiff: () => console.log('datadiff'),
|
||||||
parameters: {
|
parameters: {
|
||||||
depthTest: false,
|
depthTest: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,8 +29,8 @@ fi
|
||||||
cd ../dist
|
cd ../dist
|
||||||
if [ ! -f martin ]; then
|
if [ ! -f martin ]; then
|
||||||
echo Downloading and extracting martin...
|
echo Downloading and extracting martin...
|
||||||
wget -c https://github.com/maplibre/martin/releases/latest/download/martin-Linux-x86_64.tar.gz &&
|
wget -c https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-unknown-linux-gnu.tar.gz &&
|
||||||
tar -xzvf martin-Linux-x86_64.tar.gz
|
tar -xzvf martin-x86_64-unknown-linux-gnu.tar.gz
|
||||||
else
|
else
|
||||||
echo martin already exists
|
echo martin already exists
|
||||||
fi
|
fi
|
||||||
|
|
11
readme.md
Normal file
11
readme.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Maps
|
||||||
|
|
||||||
|
[lightning.doordesk.net](https://lightning.doordesk.net)
|
||||||
|
|
||||||
|
Some data vis about EV charging stations using
|
||||||
|
[EVChargerFinder](https://github.com/kevin-fwu/EVChargerFinder)
|
||||||
|
made by my friend [Kevin](https://github.com/kevin-fwu).
|
||||||
|
|
||||||
|
|
||||||
|
It mainly leans on the [MapLibre Project](https://maplibre.org)
|
||||||
|
and [DeckGL](https://deck.gl)
|
Loading…
Add table
Reference in a new issue