Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Nov 15, 2024
1 parent 893149b commit 7dd1b36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"build-ghpages": "tsc -b && vite build --base=/basemaps-themes/",
"build-ghpages": "tsc -b && vite build --base=/basemaps-themes/"
},
"dependencies": {
"maplibre-gl": "^4.7.1",
Expand Down
9 changes: 4 additions & 5 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
import { createSignal, createEffect, onMount } from "solid-js";
import { onMount } from "solid-js";
import "maplibre-gl/dist/maplibre-gl.css";
import "./App.css";
import maplibregl from "maplibre-gl";
import { LayerSpecification } from "maplibre-gl";
import { layersWithCustomTheme } from "protomaps-themes-base";

const THEMES = ["contrast"];

function App() {
let map: maplibregl.Map;

onMount(async () => {
maplibregl.setRTLTextPlugin(
"https://unpkg.com/@mapbox/[email protected]/mapbox-gl-rtl-text.min.js",
true,
);

let layers;
let layers: LayerSpecification[] = [];

for (let themeName of THEMES) {
let theme = await import(`../../themes/${themeName}.ts`);
layers = layersWithCustomTheme("protomaps", theme.default, "en");
}

map = new maplibregl.Map({
new maplibregl.Map({
container: "map",
style: {
version: 8,
Expand Down

0 comments on commit 7dd1b36

Please sign in to comment.