forked from MapComplete/MapComplete
Merge branch 'develop' into feature/studio
This commit is contained in:
commit
d9417f4937
135 changed files with 242 additions and 356 deletions
|
@ -50,12 +50,13 @@
|
|||
on:mousemove={(e) => {
|
||||
if (isDown) {
|
||||
onPosChange(e.clientX, e.clientY)
|
||||
e.preventDefault()
|
||||
}
|
||||
}}
|
||||
on:mouseup={() => {
|
||||
isDown = false
|
||||
}}
|
||||
on:touchmove={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
|
||||
on:touchmove={(e) =>{ onPosChange(e.touches[0].clientX, e.touches[0].clientY); e.preventDefault() }}
|
||||
on:touchstart={(e) => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}
|
||||
>
|
||||
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
<div class="min-h-32 relative h-full cursor-pointer overflow-hidden">
|
||||
<div class="absolute top-0 left-0 h-full w-full cursor-pointer">
|
||||
<MaplibreMap {map} />
|
||||
<MaplibreMap center={({lng: initialCoordinate.lon, lat: initialCoordinate.lat})}} {map} />
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
import { onMount } from "svelte"
|
||||
import { Map } from "@onsvisual/svelte-maps"
|
||||
import type { Map as MaplibreMap } from "maplibre-gl"
|
||||
import type { Writable } from "svelte/store"
|
||||
import type {Readable, Writable} from "svelte/store"
|
||||
import { AvailableRasterLayers } from "../../Models/RasterLayers"
|
||||
import {writable} from "svelte/store";
|
||||
|
||||
/**
|
||||
* Beware: this map will _only_ be set by this component
|
||||
|
@ -17,7 +18,7 @@
|
|||
export let map: Writable<MaplibreMap>
|
||||
|
||||
export let attribution = false
|
||||
let center = {}
|
||||
export let center: Readable<{ lng: number ,lat : number }> = writable({lng: 0, lat: 0})
|
||||
|
||||
onMount(() => {
|
||||
$map.on("load", function () {
|
||||
|
|
|
@ -17,7 +17,7 @@ import SvelteUIElement from "./Base/SvelteUIElement"
|
|||
import Filterview from "./BigComponents/Filterview.svelte"
|
||||
import FilteredLayer from "../Models/FilteredLayer"
|
||||
|
||||
class StatisticsForOverviewFile extends Combine {
|
||||
class StatsticsForOverviewFile extends Combine {
|
||||
constructor(homeUrl: string, paths: string[]) {
|
||||
paths = paths.filter((p) => !p.endsWith("file-overview.json"))
|
||||
const layer = new LayoutConfig(<any>mcChanges, true).layers[0]
|
||||
|
@ -177,7 +177,7 @@ class StatisticsForOverviewFile extends Combine {
|
|||
}
|
||||
}
|
||||
|
||||
export default class StatisticsGUI extends VariableUiElement {
|
||||
class StatisticsGUI extends VariableUiElement {
|
||||
private static readonly homeUrl =
|
||||
"https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/changeset-metadata/"
|
||||
private static readonly stats_files = "file-overview.json"
|
||||
|
@ -192,7 +192,7 @@ export default class StatisticsGUI extends VariableUiElement {
|
|||
return new Loading("Loading overview...")
|
||||
}
|
||||
|
||||
return new StatisticsForOverviewFile(StatisticsGUI.homeUrl, paths)
|
||||
return new StatsticsForOverviewFile(StatisticsGUI.homeUrl, paths)
|
||||
})
|
||||
)
|
||||
this.SetClass("block w-full h-full")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue