new style

This commit is contained in:
Adam 2023-04-17 05:05:31 -04:00
parent 2dbbb6f7c7
commit b571c19cc8
6 changed files with 1492 additions and 40 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
tile_server
editor

View file

@ -1638,7 +1638,7 @@ packages:
'@babel/runtime': 7.21.0
dev: false
/@rollup/plugin-commonjs@24.1.0(rollup@3.20.3):
/@rollup/plugin-commonjs@24.1.0(rollup@3.20.4):
resolution: {integrity: sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
@ -1647,15 +1647,15 @@ packages:
rollup:
optional: true
dependencies:
'@rollup/pluginutils': 5.0.2(rollup@3.20.3)
'@rollup/pluginutils': 5.0.2(rollup@3.20.4)
commondir: 1.0.1
estree-walker: 2.0.2
glob: 8.1.0
is-reference: 1.2.1
magic-string: 0.27.0
rollup: 3.20.3
rollup: 3.20.4
/@rollup/plugin-json@6.0.0(rollup@3.20.3):
/@rollup/plugin-json@6.0.0(rollup@3.20.4):
resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==}
engines: {node: '>=14.0.0'}
peerDependencies:
@ -1664,10 +1664,10 @@ packages:
rollup:
optional: true
dependencies:
'@rollup/pluginutils': 5.0.2(rollup@3.20.3)
rollup: 3.20.3
'@rollup/pluginutils': 5.0.2(rollup@3.20.4)
rollup: 3.20.4
/@rollup/plugin-node-resolve@15.0.2(rollup@3.20.3):
/@rollup/plugin-node-resolve@15.0.2(rollup@3.20.4):
resolution: {integrity: sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==}
engines: {node: '>=14.0.0'}
peerDependencies:
@ -1676,15 +1676,15 @@ packages:
rollup:
optional: true
dependencies:
'@rollup/pluginutils': 5.0.2(rollup@3.20.3)
'@rollup/pluginutils': 5.0.2(rollup@3.20.4)
'@types/resolve': 1.20.2
deepmerge: 4.3.1
is-builtin-module: 3.2.1
is-module: 1.0.0
resolve: 1.22.3
rollup: 3.20.3
rollup: 3.20.4
/@rollup/pluginutils@5.0.2(rollup@3.20.3):
/@rollup/pluginutils@5.0.2(rollup@3.20.4):
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
engines: {node: '>=14.0.0'}
peerDependencies:
@ -1696,7 +1696,7 @@ packages:
'@types/estree': 1.0.0
estree-walker: 2.0.2
picomatch: 2.3.1
rollup: 3.20.3
rollup: 3.20.4
/@sideway/address@4.1.4:
resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==}
@ -2905,7 +2905,7 @@ packages:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
/rollup-plugin-visualizer@5.9.0(rollup@3.20.3):
/rollup-plugin-visualizer@5.9.0(rollup@3.20.4):
resolution: {integrity: sha512-bbDOv47+Bw4C/cgs0czZqfm8L82xOZssk4ayZjG40y9zbXclNk7YikrZTDao6p7+HDiGxrN0b65SgZiVm9k1Cg==}
engines: {node: '>=14'}
hasBin: true
@ -2917,21 +2917,21 @@ packages:
dependencies:
open: 8.4.2
picomatch: 2.3.1
rollup: 3.20.3
rollup: 3.20.4
source-map: 0.7.4
yargs: 17.7.1
/rollup-route-manifest@1.0.0(rollup@3.20.3):
/rollup-route-manifest@1.0.0(rollup@3.20.4):
resolution: {integrity: sha512-3CmcMmCLAzJDUXiO3z6386/Pt8/k9xTZv8gIHyXI8hYGoAInnYdOsFXiGGzQRMy6TXR1jUZme2qbdwjH2nFMjg==}
engines: {node: '>=8'}
peerDependencies:
rollup: '>=2.0.0'
dependencies:
rollup: 3.20.3
rollup: 3.20.4
route-sort: 1.0.0
/rollup@3.20.3:
resolution: {integrity: sha512-u6/O1X42CAZ79rbk+smyONJQLTpwFBL7InpRa/AVWia5lq60w5J/PUsVHCOgSolN0X9R2GjQ41fZm3x28Hk1lA==}
/rollup@3.20.4:
resolution: {integrity: sha512-n7J4tuctZXUErM9Uc916httwqmTc63zzCr2+TLCiSCpfO/Xuk3g/marGN1IlRJZi+QF3XMYx75PxXRfZDVgaRw==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true
optionalDependencies:
@ -3010,12 +3010,12 @@ packages:
undici: ^5.8.0
vite: '*'
dependencies:
'@rollup/plugin-commonjs': 24.1.0(rollup@3.20.3)
'@rollup/plugin-json': 6.0.0(rollup@3.20.3)
'@rollup/plugin-node-resolve': 15.0.2(rollup@3.20.3)
'@rollup/plugin-commonjs': 24.1.0(rollup@3.20.4)
'@rollup/plugin-json': 6.0.0(rollup@3.20.4)
'@rollup/plugin-node-resolve': 15.0.2(rollup@3.20.4)
compression: 1.7.4
polka: 1.0.0-next.22
rollup: 3.20.3
rollup: 3.20.4
sirv: 2.0.2
solid-start: 0.2.26(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.3)(solid-start-node@0.2.26)(vite@4.2.1)
terser: 5.16.9
@ -3080,9 +3080,9 @@ packages:
get-port: 6.1.2
parse-multipart-data: 1.5.0
picocolors: 1.0.0
rollup: 3.20.3
rollup-plugin-visualizer: 5.9.0(rollup@3.20.3)
rollup-route-manifest: 1.0.0(rollup@3.20.3)
rollup: 3.20.4
rollup-plugin-visualizer: 5.9.0(rollup@3.20.4)
rollup-route-manifest: 1.0.0(rollup@3.20.4)
sade: 1.8.1
set-cookie-parser: 2.6.0
sirv: 2.0.2
@ -3091,7 +3091,7 @@ packages:
terser: 5.16.9
undici: 5.21.2
vite: 4.2.1(@types/node@18.15.11)
vite-plugin-inspect: 0.7.22(rollup@3.20.3)(vite@4.2.1)
vite-plugin-inspect: 0.7.22(rollup@3.20.4)(vite@4.2.1)
vite-plugin-solid: 2.7.0(solid-js@1.7.3)(vite@4.2.1)
wait-on: 6.0.1(debug@4.3.4)
transitivePeerDependencies:
@ -3250,14 +3250,14 @@ packages:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
/vite-plugin-inspect@0.7.22(rollup@3.20.3)(vite@4.2.1):
/vite-plugin-inspect@0.7.22(rollup@3.20.4)(vite@4.2.1):
resolution: {integrity: sha512-Z4y3MPuvn//0/XcpNLwTBqjfSt+c2utIFZu8Dw+nbR2HrPoIrKHedvSuqC8mLzxOpRKRoW60HWvZUDz8J2zRIA==}
engines: {node: '>=14'}
peerDependencies:
vite: ^3.1.0 || ^4.0.0
dependencies:
'@antfu/utils': 0.7.2
'@rollup/pluginutils': 5.0.2(rollup@3.20.3)
'@rollup/pluginutils': 5.0.2(rollup@3.20.4)
debug: 4.3.4
fs-extra: 11.1.1
picocolors: 1.0.0
@ -3314,7 +3314,7 @@ packages:
esbuild: 0.17.17
postcss: 8.4.22
resolve: 1.22.3
rollup: 3.20.3
rollup: 3.20.4
optionalDependencies:
fsevents: 2.3.2

File diff suppressed because one or more lines are too long

View file

@ -1,15 +1,19 @@
import MapGL, { Viewport, Camera, Marker } from 'solid-map-gl';
import { createSignal, Show } from 'solid-js';
import * as maplibre from 'maplibre-gl';
import MapGL, { Viewport, Camera, Marker } from 'solid-map-gl';
import MapControls from './MapControls';
import MapScatLayer from './MapScatLayer';
import MapArcLayer from './MapArcLayer';
// deck.gl
import { unstable_clientOnly } from 'solid-start';
const MapScatLayer = unstable_clientOnly(() => import('~/components/MapScatLayer'));
const MapArcLayer = unstable_clientOnly(() => import('~/components/MapArcLayer'));
import type { JSX } from 'solid-js';
import type { MapOptions } from 'maplibre-gl';
import type { StyleSpecification } from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
import * as stylesheet from '~/style.json'
// test data
const FANEUIL_HALL: number[] = [-71.05625, 42.36]
@ -33,22 +37,27 @@ const SCAT_DATA = [
{ coordinates: PR_HOUSE },
];
const TILES_URL: string = 'https://api.maptiler.com/maps/024da34e-fa66-4cb3-8f5f-0466b51e972e/style.json?key=Ukl2QNcQUCPAwuelQOvM';
const TILES_STYLE: StyleSpecification = {
};
function BadassMap(): JSX.Element {
const TILES_URL: string = 'https://api.maptiler.com/maps/024da34e-fa66-4cb3-8f5f-0466b51e972e/style.json?key=Ukl2QNcQUCPAwuelQOvM'
const MY_LOC = FANEUIL_HALL;
const options: MapOptions = {
container: 'solid-map-gl will override me',
style: TILES_URL,
style: stylesheet,
maxPitch: 85,
antialias: true,
};
const INITIAL_VIEW_STATE: Viewport = {
center: FANEUIL_HALL,
center: MY_LOC,
zoom: 15.5,
bearing: 160,
pitch: 60,
};
const [viewport, setViewport] = createSignal<Viewport>(INITIAL_VIEW_STATE);
const [rotate, setRotate] = createSignal<boolean>(true);
const toggleRotate = () => setRotate<boolean>(!rotate());
@ -64,7 +73,7 @@ function BadassMap(): JSX.Element {
<MapArcLayer data={ARC_DATA} />
<Marker
lngLat={FANEUIL_HALL}
lngLat={MY_LOC}
options={{ color: '#900' }}
>
hi
@ -74,6 +83,7 @@ function BadassMap(): JSX.Element {
rotateViewport={rotate()}
reverse={true}
/>
<Show
when={rotate()}
fallback={<button onClick={toggleRotate}> Rotation On </button>}

View file

@ -11,10 +11,9 @@ import {
Routes,
Scripts,
Title,
unstable_clientOnly,
} from "solid-start";
import "./root.css";
const BadassMap = unstable_clientOnly(() => import('~/components/BadassMap'));
import BadassMap from '~/components/BadassMap';
export default function Root() {
return (
@ -29,7 +28,7 @@ export default function Root() {
<ErrorBoundary>
<A href="/">Map</A>
<A href="/about">About</A>
<BadassMap fallback={<div>hi</div>} />
<BadassMap />
<Routes>
<FileRoutes />
</Routes>

1440
lightning/src/style.json Normal file

File diff suppressed because it is too large Load diff