From 46afd73d0a8fcddb0cf8b26189a3a0eb709ce7a9 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Sat, 15 Apr 2023 22:01:38 -0400 Subject: [PATCH] housekeeping --- lightning/src/components/BadassMap.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lightning/src/components/BadassMap.tsx b/lightning/src/components/BadassMap.tsx index 1ad5fd0..8223bb2 100644 --- a/lightning/src/components/BadassMap.tsx +++ b/lightning/src/components/BadassMap.tsx @@ -8,19 +8,25 @@ import type { MapOptions } from 'maplibre-gl'; import MapControls from './MapControls'; import 'maplibre-gl/dist/maplibre-gl.css'; +const TILES_URL: string = 'https://api.maptiler.com/maps/024da34e-fa66-4cb3-8f5f-0466b51e972e/style.json?key=Ukl2QNcQUCPAwuelQOvM' + function BadassMap(): JSX.Element { const options: MapOptions = { - container: '', - style: 'https://api.maptiler.com/maps/024da34e-fa66-4cb3-8f5f-0466b51e972e/style.json?key=Ukl2QNcQUCPAwuelQOvM', + container: 'solid-map-gl will override me', + style: TILES_URL, maxPitch: 85, antialias: true, + } + + const INITIAL_VIEW_STATE: Viewport = { center: [-71.05625, 42.36], zoom: 15.5, bearing: 160, pitch: 60, + } - const [viewport, setViewport] = createSignal(options); + const [viewport, setViewport] = createSignal(INITIAL_VIEW_STATE); const [rotate, setRotate] = createSignal(true) const toggleRotate = () => setRotate(!rotate())