Add sunny theme for protomaps

This commit is contained in:
Pieter Vander Vennet 2024-03-25 03:05:00 +01:00
parent c3634edc6e
commit 94d8b18166
4 changed files with 3508 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "mapcomplete",
"version": "0.41.1",
"version": "0.41.2",
"repository": "https://github.com/pietervdvn/MapComplete",
"description": "A small website to edit OSM easily",
"bugs": "https://github.com/pietervdvn/MapComplete/issues",

3475
public/assets/sunny.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,22 @@
<script lang="ts">
import MaplibreMap from "./Map/MaplibreMap.svelte"
import { UIEventSource } from "../Logic/UIEventSource"
import { MapLibreAdaptor } from "./Map/MapLibreAdaptor"
import { Map as MlMap } from "maplibre-gl"
import { AvailableRasterLayers } from "../Models/RasterLayers"
import { QueryParameters } from "../Logic/Web/QueryParameters"
const map = new UIEventSource<MlMap>(undefined)
const mla = new MapLibreAdaptor(map, {
location: new UIEventSource<{ lon: number; lat: number }>({
lon: 3.1929, lat: 51.2190
}),
zoom: UIEventSource.asFloat(QueryParameters.GetQueryParameter("z", 13+"")),
rasterLayer: new UIEventSource(AvailableRasterLayers.globalLayers.at(-1))
})
</script>
No tests
<div class="w-full h-screen">
<MaplibreMap {map} />
</div>

View file

@ -229,6 +229,19 @@
"text": "Protomaps",
"url": "https://protomaps.com/"
}
},
{
"url": "pmtiles://https://api.protomaps.com/tiles/v3.json?key=2af8b969a9e8b692",
"style": "assets/sunny.json",
"connect-src": ["https://protomaps.github.io"],
"id": "protomaps.sunny",
"name": "Protomaps Sunny",
"type": "vector",
"category": "osmbasedmap",
"attribution": {
"text": "Protomaps",
"url": "https://protomaps.com/"
}
}
]
}