This commit is contained in:
Pieter Vander Vennet 2021-07-29 10:37:23 +02:00
parent 5aa2f7f2a2
commit 1e63dc4be6
3 changed files with 529 additions and 486 deletions

View file

@ -1,18 +1,18 @@
import { FixedUiElement } from "./UI/Base/FixedUiElement"; import {FixedUiElement} from "./UI/Base/FixedUiElement";
import Toggle from "./UI/Input/Toggle"; import Toggle from "./UI/Input/Toggle";
import { Basemap } from "./UI/BigComponents/Basemap"; import {Basemap} from "./UI/BigComponents/Basemap";
import State from "./State"; import State from "./State";
import LoadFromOverpass from "./Logic/Actors/OverpassFeatureSource"; import LoadFromOverpass from "./Logic/Actors/OverpassFeatureSource";
import { UIEventSource } from "./Logic/UIEventSource"; import {UIEventSource} from "./Logic/UIEventSource";
import { QueryParameters } from "./Logic/Web/QueryParameters"; import {QueryParameters} from "./Logic/Web/QueryParameters";
import StrayClickHandler from "./Logic/Actors/StrayClickHandler"; import StrayClickHandler from "./Logic/Actors/StrayClickHandler";
import SimpleAddUI from "./UI/BigComponents/SimpleAddUI"; import SimpleAddUI from "./UI/BigComponents/SimpleAddUI";
import CenterMessageBox from "./UI/CenterMessageBox"; import CenterMessageBox from "./UI/CenterMessageBox";
import UserBadge from "./UI/BigComponents/UserBadge"; import UserBadge from "./UI/BigComponents/UserBadge";
import SearchAndGo from "./UI/BigComponents/SearchAndGo"; import SearchAndGo from "./UI/BigComponents/SearchAndGo";
import GeoLocationHandler from "./Logic/Actors/GeoLocationHandler"; import GeoLocationHandler from "./Logic/Actors/GeoLocationHandler";
import { LocalStorageSource } from "./Logic/Web/LocalStorageSource"; import {LocalStorageSource} from "./Logic/Web/LocalStorageSource";
import { Utils } from "./Utils"; import {Utils} from "./Utils";
import Svg from "./Svg"; import Svg from "./Svg";
import Link from "./UI/Base/Link"; import Link from "./UI/Base/Link";
import * as personal from "./assets/themes/personal/personal.json"; import * as personal from "./assets/themes/personal/personal.json";
@ -33,14 +33,14 @@ import MapControlButton from "./UI/MapControlButton";
import Combine from "./UI/Base/Combine"; import Combine from "./UI/Base/Combine";
import SelectedFeatureHandler from "./Logic/Actors/SelectedFeatureHandler"; import SelectedFeatureHandler from "./Logic/Actors/SelectedFeatureHandler";
import LZString from "lz-string"; import LZString from "lz-string";
import { LayoutConfigJson } from "./Customizations/JSON/LayoutConfigJson"; import {LayoutConfigJson} from "./Customizations/JSON/LayoutConfigJson";
import AttributionPanel from "./UI/BigComponents/AttributionPanel"; import AttributionPanel from "./UI/BigComponents/AttributionPanel";
import ContributorCount from "./Logic/ContributorCount"; import ContributorCount from "./Logic/ContributorCount";
import FeatureSource from "./Logic/FeatureSource/FeatureSource"; import FeatureSource from "./Logic/FeatureSource/FeatureSource";
import AllKnownLayers from "./Customizations/AllKnownLayers"; import AllKnownLayers from "./Customizations/AllKnownLayers";
import LayerConfig from "./Customizations/JSON/LayerConfig"; import LayerConfig from "./Customizations/JSON/LayerConfig";
import AvailableBaseLayers from "./Logic/Actors/AvailableBaseLayers"; import AvailableBaseLayers from "./Logic/Actors/AvailableBaseLayers";
import { TagsFilter } from "./Logic/Tags/TagsFilter"; import {TagsFilter} from "./Logic/Tags/TagsFilter";
import FilterView from "./UI/BigComponents/FilterView"; import FilterView from "./UI/BigComponents/FilterView";
export class InitUiElements { export class InitUiElements {
@ -57,7 +57,8 @@ export class InitUiElements {
`Error: incorrect layout <i>${layoutName}</i><br/><a href='https://${window.location.host}/'>Go back</a>` `Error: incorrect layout <i>${layoutName}</i><br/><a href='https://${window.location.host}/'>Go back</a>`
) )
.AttachTo("centermessage") .AttachTo("centermessage")
.onClick(() => {}); .onClick(() => {
});
throw "Incorrect layout"; throw "Incorrect layout";
} }
@ -184,7 +185,7 @@ export class InitUiElements {
iconSize: [30, 30], iconSize: [30, 30],
iconAnchor: [15, 15], iconAnchor: [15, 15],
}); });
const marker = L.marker([home.lat, home.lon], { icon: icon }); const marker = L.marker([home.lat, home.lon], {icon: icon});
marker.addTo(State.state.leafletMap.data); marker.addTo(State.state.leafletMap.data);
}); });

View file

@ -7,7 +7,9 @@
"minzoom": 12, "minzoom": 12,
"source": { "source": {
"osmTags": { "osmTags": {
"and": ["man_made=watermill"] "and": [
"man_made=watermill"
]
} }
}, },
"title": { "title": {
@ -17,7 +19,9 @@
"mappings": [ "mappings": [
{ {
"if": { "if": {
"and": ["name:nl~*"] "and": [
"name:nl~*"
]
}, },
"then": { "then": {
"nl": "{name:nl}" "nl": "{name:nl}"
@ -25,7 +29,9 @@
}, },
{ {
"if": { "if": {
"and": ["name~*"] "and": [
"name~*"
]
}, },
"then": { "then": {
"nl": "{name}" "nl": "{name}"
@ -52,7 +58,10 @@
"mappings": [ "mappings": [
{ {
"if": { "if": {
"and": ["access=yes", "fee="] "and": [
"access=yes",
"fee="
]
}, },
"then": { "then": {
"nl": "Vrij toegankelijk" "nl": "Vrij toegankelijk"
@ -60,7 +69,10 @@
}, },
{ {
"if": { "if": {
"and": ["access=no", "fee="] "and": [
"access=no",
"fee="
]
}, },
"then": { "then": {
"nl": "Niet toegankelijk" "nl": "Niet toegankelijk"
@ -68,7 +80,10 @@
}, },
{ {
"if": { "if": {
"and": ["access=private", "fee="] "and": [
"access=private",
"fee="
]
}, },
"then": { "then": {
"nl": "Niet toegankelijk, want privégebied" "nl": "Niet toegankelijk, want privégebied"
@ -76,7 +91,10 @@
}, },
{ {
"if": { "if": {
"and": ["access=permissive", "fee="] "and": [
"access=permissive",
"fee="
]
}, },
"then": { "then": {
"nl": "Toegankelijk, ondanks dat het privegebied is" "nl": "Toegankelijk, ondanks dat het privegebied is"
@ -84,7 +102,10 @@
}, },
{ {
"if": { "if": {
"and": ["access=guided", "fee="] "and": [
"access=guided",
"fee="
]
}, },
"then": { "then": {
"nl": "Enkel toegankelijk met een gids of tijdens een activiteit" "nl": "Enkel toegankelijk met een gids of tijdens een activiteit"
@ -92,7 +113,10 @@
}, },
{ {
"if": { "if": {
"and": ["access=yes", "fee=yes"] "and": [
"access=yes",
"fee=yes"
]
}, },
"then": { "then": {
"nl": "Toegankelijk mits betaling" "nl": "Toegankelijk mits betaling"
@ -114,7 +138,9 @@
"mappings": [ "mappings": [
{ {
"if": { "if": {
"and": ["operator=Natuurpunt"] "and": [
"operator=Natuurpunt"
]
}, },
"then": { "then": {
"nl": "<img src=\"./assets/themes/buurtnatuur/Natuurpunt.jpg\" style=\"width:1.5em\">Dit gebied wordt beheerd door Natuurpunt" "nl": "<img src=\"./assets/themes/buurtnatuur/Natuurpunt.jpg\" style=\"width:1.5em\">Dit gebied wordt beheerd door Natuurpunt"
@ -122,7 +148,9 @@
}, },
{ {
"if": { "if": {
"and": ["operator~(n|N)atuurpunt.*"] "and": [
"operator~(n|N)atuurpunt.*"
]
}, },
"then": { "then": {
"nl": "<img src=\"./assets/themes/buurtnatuur/Natuurpunt.jpg\" style=\"width:1.5em\">Dit gebied wordt beheerd door {operator}" "nl": "<img src=\"./assets/themes/buurtnatuur/Natuurpunt.jpg\" style=\"width:1.5em\">Dit gebied wordt beheerd door {operator}"

View file

@ -13,7 +13,9 @@
"nl": "Op deze kaart vind je alle natuurgebieden die Natuurpunt ter beschikking stelt", "nl": "Op deze kaart vind je alle natuurgebieden die Natuurpunt ter beschikking stelt",
"en": "On this map you can find all the nature reserves that Natuurpunt offers " "en": "On this map you can find all the nature reserves that Natuurpunt offers "
}, },
"language": ["nl"], "language": [
"nl"
],
"maintainer": "", "maintainer": "",
"icon": "./assets/themes/natuurpunt/natuurpunt.png", "icon": "./assets/themes/natuurpunt/natuurpunt.png",
"version": "0", "version": "0",
@ -31,7 +33,9 @@
"name": null, "name": null,
"source": { "source": {
"osmTags": { "osmTags": {
"+and": ["operator~.*[nN]atuurpunt.*"] "+and": [
"operator~.*[nN]atuurpunt.*"
]
}, },
"geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_{layer}_{z}_{x}_{y}.geojson", "geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_{layer}_{z}_{x}_{y}.geojson",
"geoJsonZoomLevel": 12, "geoJsonZoomLevel": 12,
@ -58,7 +62,9 @@
"override": { "override": {
"source": { "source": {
"osmTags": { "osmTags": {
"+and": ["operator~.*[nN]atuurpunt.*"] "+and": [
"operator~.*[nN]atuurpunt.*"
]
}, },
"geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_nature_reserve_points.geojson", "geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_nature_reserve_points.geojson",
"isOsmCache": "duplicate" "isOsmCache": "duplicate"
@ -82,7 +88,9 @@
"override": { "override": {
"source": { "source": {
"osmTags": { "osmTags": {
"+and": ["operator~.*[nN]atuurpunt.*"] "+and": [
"operator~.*[nN]atuurpunt.*"
]
}, },
"geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_{layer}_points.geojson", "geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_{layer}_points.geojson",
"isOsmCache": true "isOsmCache": true
@ -106,7 +114,9 @@
"override": { "override": {
"source": { "source": {
"osmTags": { "osmTags": {
"+and": ["operator~.*[nN]atuurpunt.*"] "+and": [
"operator~.*[nN]atuurpunt.*"
]
}, },
"geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_{layer}_{z}_{x}_{y}.geojson", "geoJson": "https://pietervdvn.github.io/natuurpunt_cache/natuurpunt_{layer}_{z}_{x}_{y}.geojson",
"geoJsonZoomLevel": 12, "geoJsonZoomLevel": 12,
@ -128,7 +138,11 @@
}, },
"deletion": { "deletion": {
"hardDeletionTags": { "hardDeletionTags": {
"and": ["route=hiking", "route=bycicle", "route=horse"] "and": [
"route=hiking",
"route=bycicle",
"route=horse"
]
} }
} }
} }