Various small fixes
This commit is contained in:
parent
b8f912e00f
commit
e35c85fc55
12 changed files with 26 additions and 49 deletions
|
@ -20,17 +20,17 @@ export class AllKnownLayouts {
|
|||
|
||||
public static layoutsList: Layout[] = [
|
||||
new CustomLayout(),
|
||||
new Groen(),
|
||||
new Natuurpunt(),
|
||||
new GRB(),
|
||||
new Cyclofix(),
|
||||
new GhostBikes(),
|
||||
new Bookcases(),
|
||||
new MetaMap(),
|
||||
new StreetWidth(),
|
||||
new Natuurpunt(),
|
||||
new ClimbingTrees(),
|
||||
new Artworks(),
|
||||
new Smoothness(),
|
||||
new Groen(),
|
||||
/*
|
||||
new Toilets(),
|
||||
*/
|
||||
|
|
|
@ -95,11 +95,11 @@ export class InformationBoard extends LayerDefinition {
|
|||
mappings: [
|
||||
{
|
||||
k: new Tag("map_source:attribution", "yes"),
|
||||
txt: "OpenStreetMap is clearly attribute, including the ODBL-license"
|
||||
txt: "OpenStreetMap is clearly attributed, including the ODBL-license"
|
||||
},
|
||||
{
|
||||
k: new Tag("map_source:attribution", "incomplete"),
|
||||
txt: "OpenStreetMap is clearly attribute, but the license is not mentioned"
|
||||
txt: "OpenStreetMap is clearly attributed, but the license is not mentioned"
|
||||
},
|
||||
{
|
||||
k: new Tag("map_source:attribution", "sticker"),
|
||||
|
|
|
@ -68,11 +68,11 @@ export class Map extends LayerDefinition {
|
|||
mappings: [
|
||||
{
|
||||
k: new Tag("map_source:attribution", "yes"),
|
||||
txt: "OpenStreetMap is clearly attribute, including the ODBL-license"
|
||||
txt: "OpenStreetMap is clearly attributed, including the ODBL-license"
|
||||
},
|
||||
{
|
||||
k: new Tag("map_source:attribution", "incomplete"),
|
||||
txt: "OpenStreetMap is clearly attribute, but the license is not mentioned"
|
||||
txt: "OpenStreetMap is clearly attributed, but the license is not mentioned"
|
||||
},
|
||||
{
|
||||
k: new Tag("map_source:attribution", "sticker"),
|
||||
|
|
|
@ -14,7 +14,7 @@ export class Natuurpunt extends Layout{
|
|||
12,
|
||||
51.20875,
|
||||
3.22435,
|
||||
"<h3>Natuurpuntstuff</h3>",
|
||||
"<h3>Natuurstuff</h3>Geef meer gegevens over natuurgebieden en hun infoborden",
|
||||
"",
|
||||
""
|
||||
);
|
||||
|
|
|
@ -5,7 +5,8 @@ import {UIElement} from "../../UI/UIElement";
|
|||
|
||||
export class BaseLayers {
|
||||
|
||||
public static readonly defaultLayer: { name: string, layer: any } = {
|
||||
public static readonly defaultLayer: { name: string, layer: any, id: string } = {
|
||||
id: "osm",
|
||||
name: "Kaart van OpenStreetMap", layer: L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{
|
||||
attribution: '',
|
||||
|
@ -13,9 +14,10 @@ export class BaseLayers {
|
|||
minZoom: 1
|
||||
})
|
||||
};
|
||||
public static readonly baseLayers: { name: string, layer: any } [] = [
|
||||
public static readonly baseLayers: { name: string, layer: any, id: string } [] = [
|
||||
|
||||
{
|
||||
id: "aiv-latest",
|
||||
name: "Luchtfoto Vlaanderen (recentste door AIV)",
|
||||
layer: L.tileLayer("https://tile.informatievlaanderen.be/ws/raadpleegdiensten/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&" +
|
||||
"LAYER=omwrgbmrvl&STYLE=&FORMAT=image/png&tileMatrixSet=GoogleMapsVL&tileMatrix={z}&tileRow={y}&tileCol={x}",
|
||||
|
@ -29,6 +31,7 @@ export class BaseLayers {
|
|||
},
|
||||
BaseLayers.defaultLayer,
|
||||
{
|
||||
id: "aiv-13-15",
|
||||
name: "Luchtfoto Vlaanderen (2013-2015, door AIV)",
|
||||
layer: L.tileLayer.wms('https://geoservices.informatievlaanderen.be/raadpleegdiensten/OGW/wms?s',
|
||||
{
|
||||
|
@ -37,6 +40,7 @@ export class BaseLayers {
|
|||
})
|
||||
},
|
||||
{
|
||||
id:"grb",
|
||||
name: "Kaart Grootschalig ReferentieBestand Vlaanderen (GRB) door AIV",
|
||||
layer: L.tileLayer("https://tile.informatievlaanderen.be/ws/raadpleegdiensten/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=grb_bsk&STYLE=&FORMAT=image/png&tileMatrixSet=GoogleMapsVL&tileMatrix={z}&tileCol={x}&tileRow={y}",
|
||||
{
|
||||
|
@ -62,6 +66,7 @@ export class Basemap {
|
|||
public LastClickLocation: UIEventSource<{ lat: number, lon: number }> = new UIEventSource<{ lat: number, lon: number }>(undefined)
|
||||
private _previousLayer: L.tileLayer = undefined;
|
||||
public CurrentLayer: UIEventSource<{
|
||||
id: string,
|
||||
name: string,
|
||||
layer: L.tileLayer
|
||||
}> = new UIEventSource<L.tileLayer>(BaseLayers.defaultLayer);
|
||||
|
|
|
@ -12,7 +12,6 @@ export class LocalStorageSource {
|
|||
|
||||
source.addCallback((data) => {
|
||||
localStorage.setItem(key, data);
|
||||
console.log("Writing to local storage", key, data)
|
||||
});
|
||||
return source;
|
||||
} catch (e) {
|
||||
|
|
3
State.ts
3
State.ts
|
@ -165,7 +165,7 @@ export class State {
|
|||
|
||||
Locale.language.addCallback((currentLanguage) => {
|
||||
if (layoutToUse.supportedLanguages.indexOf(currentLanguage) < 0) {
|
||||
console.log("Resetting languate to", layoutToUse.supportedLanguages[0], "as", currentLanguage, " is unsupported")
|
||||
console.log("Resetting language to", layoutToUse.supportedLanguages[0], "as", currentLanguage, " is unsupported")
|
||||
// The current language is not supported -> switch to a supported one
|
||||
Locale.language.setData(layoutToUse.supportedLanguages[0]);
|
||||
}
|
||||
|
@ -199,7 +199,6 @@ export class State {
|
|||
|
||||
public GetFilteredLayerFor(id: string) : FilteredLayer{
|
||||
for (const flayer of this.filteredLayers.data) {
|
||||
console.log(flayer.layerDef.id, id)
|
||||
if(flayer.layerDef.id === id){
|
||||
return flayer;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ export class SimpleAddUI extends UIElement {
|
|||
}
|
||||
|
||||
|
||||
return header.Render() + html;
|
||||
return header.Render() + new Combine([html], "add-popup-all-buttons").Render();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1240,6 +1240,11 @@ form {
|
|||
font-size: large;
|
||||
}
|
||||
|
||||
.add-popup-all-buttons{
|
||||
max-height: 50vh;
|
||||
display: inline-block;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.custom-layer-panel {
|
||||
|
||||
|
|
4
index.ts
4
index.ts
|
@ -173,7 +173,3 @@ if ((window != window.top && !State.state.featureSwitchWelcomeMessage) || State.
|
|||
|
||||
|
||||
new GeoLocationHandler().AttachTo("geolocate-button");
|
||||
|
||||
|
||||
// State.state.locationControl.ping()
|
||||
|
||||
|
|
10
package-lock.json
generated
10
package-lock.json
generated
|
@ -2577,11 +2577,6 @@
|
|||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
|
||||
"integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8="
|
||||
},
|
||||
"diffie-hellman": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
||||
|
@ -4397,6 +4392,11 @@
|
|||
"ms": "0.7.1"
|
||||
}
|
||||
},
|
||||
"diff": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
|
||||
"integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8="
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href="index.css" rel="stylesheet"/>
|
||||
<title>Preferences editor</title>
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>Preferences editor - developers only</h1>
|
||||
Only use if you know what you're doing. To prevent newbies to make mistakes here, editing a mapcomplete-preference is only available if over 500 changes<br/>
|
||||
Editing any preference -including non-mapcomplete ones- is available when you have more then 2500 changesets. Until that point, only editing mapcomplete-preferences is possible.
|
||||
<div id="maindiv">'maindiv' not attached</div>
|
||||
<script src="./preferences.ts"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue