([])
tagRenderings = tagRenderings
@@ -33,7 +34,7 @@ export default class QuestionBox extends VariableUiElement {
{
units: units,
afterSave: () => {
- // We save
+ // We save and indicate progress by pinging and recalculating
skippedQuestions.ping();
},
cancelButton: Translations.t.general.skip.Clone()
@@ -45,7 +46,7 @@ export default class QuestionBox extends VariableUiElement {
}
)));
- const skippedQuestionsButton = Translations.t.general.skippedQuestions.Clone()
+ const skippedQuestionsButton = Translations.t.general.skippedQuestions
.onClick(() => {
skippedQuestions.setData([]);
})
diff --git a/UI/ShowDataLayer/ShowDataLayer.ts b/UI/ShowDataLayer/ShowDataLayer.ts
index 2f957ed15a..e8cfb43dae 100644
--- a/UI/ShowDataLayer/ShowDataLayer.ts
+++ b/UI/ShowDataLayer/ShowDataLayer.ts
@@ -6,6 +6,7 @@ import LayerConfig from "../../Models/ThemeConfig/LayerConfig";
import FeatureInfoBox from "../Popup/FeatureInfoBox";
import {ShowDataLayerOptions} from "./ShowDataLayerOptions";
import {ElementStorage} from "../../Logic/ElementStorage";
+import Hash from "../../Logic/Web/Hash";
export default class ShowDataLayer {
@@ -237,7 +238,6 @@ export default class ShowDataLayer {
infobox.isShown.addCallback(isShown => {
if (!isShown) {
- this._selectedElement?.setData(undefined);
leafletLayer.closePopup()
}
});
@@ -249,7 +249,7 @@ export default class ShowDataLayer {
}
});
-
+
// Add the feature to the index to open the popup when needed
this.leafletLayersPerId.set(feature.properties.id + feature.geometry.type, {
diff --git a/assets/themes/grb_import/grb.json b/assets/themes/grb_import/grb.json
index 4f0d99d9db..ed5a02aac3 100644
--- a/assets/themes/grb_import/grb.json
+++ b/assets/themes/grb_import/grb.json
@@ -20,13 +20,99 @@
"startZoom": 14,
"widenFactor": 2,
"socialImage": "",
+ "overpassMaxZoom": 18,
+ "osmApiTileSize": 17,
"layers": [
+ {
+ "id": "OSM-buildings",
+ "name": "All OSM-buildings",
+ "source": {
+ "osmTags": "building~*",
+ "maxCacheAge": 0
+ },
+ "minzoom": 18,
+ "width": {
+ "render": "2"
+ },
+ "color": {
+ "render": "#00c",
+ "mappings": [
+ {
+ "if": "building=house",
+ "then": "#a00"
+ },
+ {
+ "if": "building=shed",
+ "then": "#563e02"
+ },
+ {
+ "if": {
+ "or": ["building=garage","building=garages"]
+ },
+ "then": "#f9bfbb"
+ },
+ {
+ "if": "building=yes",
+ "then": "#0774f2"
+ }
+ ]
+ },
+ "title": "OSM-gebouw",
+ "tagRenderings": [
+ "all_tags"
+ ]
+ },
+ {
+ "id": "All OSM objects",
+ "name": "All OSM Objects",
+ "source": {
+ "osmTags":{
+ "and": [
+ "id~*",
+ "landuse=",
+ "place=",
+ "disused:power=",
+ "power=",
+ "type!=boundary",
+ "boundary=",
+ {
+ "or": [
+ "level=",
+ "level=0"
+ ]
+ },
+ {
+ "or": [
+ "layer=0",
+ "layer="
+ ]
+ }
+ ]
+ },
+ "maxCacheAge": 0
+ },
+ "minzoom": 18,
+ "color": {
+ "render": "#00c"
+ },
+ "width": {
+ "render": "1"
+ },
+ "title": {
+ "render": {
+ "*": "OSM-Object"
+ }
+ },
+ "tagRenderings": [
+ "all_tags"
+ ]
+ },
{
"id": "osm-fixmes",
"name": {
"nl": "Fixmes op gebouwen"
},
- "minzoom": 12,
+ "minzoom": 21,
"source": {
"maxCacheAge": 0,
"osmTags": {
@@ -232,9 +318,29 @@
"name": "GRB geometries",
"title": "GRB outline",
"minzoom": 19,
+ "calculatedTags": [
+ "_overlaps_with=feat.overlapWith('OSM-buildings').filter(f => f.overlap > 1 && feat.properties._surface - f.overlap < 5)[0]",
+ "_osm_obj:source:ref=JSON.parse(feat.properties._overlaps_with).feat.properties['source:geometry:ref']",
+ "_osm_obj:source:date=JSON.parse(feat.properties._overlaps_with).feat.properties['source:geometry:date']",
+ "_imported_osm_object_found= feat.properties['_osm_obj:source:ref'] == feat.properties['source:geometry:entity'] + '/' + feat.properties['source:geometry:oidn']",
+ "_grb_date=feat.properties['source:geometry:date'].replace(/\\//g,'-')",
+ "_imported_osm_still_fresh= feat.properties['_osm_obj:source:date'] == feat.properties._grb_date"
+
+ ],
"tagRenderings": [
"all_tags"
- ]
+ ],
+ "color": {
+ "render": "#00a",
+ "mappings": [
+ {
+ "if": {
+ "and": ["_imported_osm_object_found=true","_imported_osm_still_fresh=true"]
+ },
+ "then": "#0f0"
+ }
+ ]
+ }
}
],
"hideFromOverview": true,
diff --git a/assets/themes/uk_addresses/license_info.json b/assets/themes/uk_addresses/license_info.json
index 7d805cee45..4bcce8003e 100644
--- a/assets/themes/uk_addresses/license_info.json
+++ b/assets/themes/uk_addresses/license_info.json
@@ -1,4 +1,34 @@
[
+ {
+ "path": "Commemorative_plaque_on_Elizabeth_House_-_geograph.org.uk_-_2693028.jpg",
+ "license": "CC-BY-SA 2.0 Unported",
+ "authors": [
+ "Basher Eyre"
+ ],
+ "sources": [
+ "https://commons.wikimedia.org/wiki/File:Commemorative_plaque_on_Elizabeth_House_-_geograph.org.uk_-_2693028.jpg"
+ ]
+ },
+ {
+ "path": "Plaque,_Raphoe_House_-_geograph.org.uk_-_1925685.jpg",
+ "license": "CC-BY-SA 2.0",
+ "authors": [
+ "Kenneth Allen"
+ ],
+ "sources": [
+ "https://commons.wikimedia.org/wiki/File:Plaque,_Raphoe_House_-_geograph.org.uk_-_1925685.jpg"
+ ]
+ },
+ {
+ "path": "Plaque,_Séamus_Roddy_House_-_geograph.org.uk_-_2000318.jpg",
+ "license": "CC-BY-SA 2.0 Unported",
+ "authors": [
+ "Kenneth Allen"
+ ],
+ "sources": [
+ "https://commons.wikimedia.org/wiki/File:Plaque,_S%C3%A9amus_Roddy_House_-_geograph.org.uk_-_2000318.jpg"
+ ]
+ },
{
"path": "housenumber_add.svg",
"license": "CC0",
diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json
index aa0aeed0b4..88d6dec279 100644
--- a/assets/themes/uk_addresses/uk_addresses.json
+++ b/assets/themes/uk_addresses/uk_addresses.json
@@ -27,6 +27,9 @@
"widenFactor": 1.01,
"socialImage": "",
"hideFromOverview": true,
+ "enableShareScreen": false,
+ "enableMoreQuests": false,
+
"clustering": {
"minNeededFeatures": 25,
"maxZoom": 16
@@ -52,11 +55,12 @@
"#geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete/develop/assets/themes/uk_addresses/islington_small_piece.geojson",
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
"osmTags": "inspireid~*",
- "geoJsonZoomLevel": 16,
- "isOsmCache": false
+ "geoJsonZoomLevel": 18,
+ "isOsmCache": false,
+ "maxCacheAge": 0
},
"name": "Addresses to check",
- "minzoom": 14,
+ "minzoom": 18,
"wayHandling": 1,
"icon": {
"render": "./assets/themes/uk_addresses/housenumber_unknown.svg",
@@ -123,6 +127,7 @@
},
"minzoom": 18,
"source": {
+ "maxCacheAge": 0,
"osmTags": {
"or": [
"addr:housenumber~*",
@@ -188,6 +193,33 @@
}
]
},
+ {
+ "id": "uk_addresses_housename",
+ "question": "What is the name of this house?
This is normally indicated on a plaque.
Do NOT add names of inhabitants!
",
+ "render": "This house is named {addr:housename}",
+ "freeform": {
+ "key": "addr:housename",
+ "addExtraTags": [
+ "nohousename="
+ ]
+ },
+ "mappings": [
+ {
+ "if": "nohousename=yes",
+ "then": "This building has no housename"
+ },
+ {
+ "if": {
+ "and": [
+ "addr:housename=",
+ "nohousenumber!=yes"
+ ]
+ },
+ "then": "This building has no housename",
+ "hideInAnswer": true
+ }
+ ]
+ },
{
"id": "uk_addresses_street",
"render": {
@@ -219,10 +251,40 @@
}
],
"condition": {
- "and": [
- "nohousenumber!~yes"
+ "or": [
+ "nohousenumber!=yes",
+ "nohousename!=yes"
]
}
+ },
+ {
+ "id": "fixme",
+ "render": "Fixme description{render}",
+ "question": {
+ "en": "What should be fixed here? Please explain"
+ },
+ "freeform": {
+ "key": "fixme"
+ },
+ "mappings": [
+ {
+ "if": "fixme=",
+ "then": "No fixme - write something here to explain complicated cases"
+ }
+ ]
+ },
+ "questions",
+ {
+ "id": "address-sign-image",
+ "render": {
+ "en": "{image_carousel(image:address)}
{image_upload(image:address, Add image of the address)}"
+ }
+ },
+ {
+ "id": "general_images",
+ "render": {
+ "en": "{image_carousel()}"
+ }
}
],
"icon": {
@@ -245,7 +307,7 @@
]
},
"width": {
- "render": "8"
+ "render": "1"
},
"iconSize": {
"render": "40,40,center"
@@ -274,6 +336,7 @@
"id": "named_streets",
"minzoom": 18,
"source": {
+ "maxCacheAge": 0,
"osmTags": {
"and": [
"highway~*",
diff --git a/scripts/slice.ts b/scripts/slice.ts
index 74673035b5..342dc22f90 100644
--- a/scripts/slice.ts
+++ b/scripts/slice.ts
@@ -106,7 +106,7 @@ async function main(args: string[]) {
console.log("Loaded all", allFeatures.length, "points")
- const keysToRemove = ["ID", "STRAATNMID", "NISCODE", "GEMEENTE", "POSTCODE", "HERKOMST"]
+ const keysToRemove = ["STRAATNMID", "GEMEENTE", "POSTCODE"]
for (const f of allFeatures) {
for (const keyToRm of keysToRemove) {
delete f.properties[keyToRm]