diff --git a/Docs/Layers/artwork.md b/Docs/Layers/artwork.md index cfc4f8e15a..4a03b1e9a4 100644 --- a/Docs/Layers/artwork.md +++ b/Docs/Layers/artwork.md @@ -211,7 +211,6 @@ The question is `What is the corresponding Wikidata entity?` The question is `What does this artwork depict?` *This artwork depicts {wikidata_label(subject:wikidata)}{wikipedia(subject:wikidata)}* is shown if `subject:wikidata` is set -This tagrendering is only visible in the popup if the following condition is met: subject:wikidata~.+ This tagrendering has labels `artwork-question` diff --git a/Docs/Layers/artwork_on_wall.md b/Docs/Layers/artwork_on_wall.md index 6843cb604d..7b097869c2 100644 --- a/Docs/Layers/artwork_on_wall.md +++ b/Docs/Layers/artwork_on_wall.md @@ -214,7 +214,6 @@ The question is `What is the corresponding Wikidata entity?` The question is `What does this artwork depict?` *This artwork depicts {wikidata_label(subject:wikidata)}{wikipedia(subject:wikidata)}* is shown if `subject:wikidata` is set -This tagrendering is only visible in the popup if the following condition is met: subject:wikidata~.+ This tagrendering has labels `artwork-question` diff --git a/Docs/Layers/crab_address.md b/Docs/Layers/crab_address.md deleted file mode 100644 index ab46f6ae1b..0000000000 --- a/Docs/Layers/crab_address.md +++ /dev/null @@ -1,67 +0,0 @@ -[//]: # (WARNING: this file is automatically generated. Please find the sources at the bottom and edit those sources) - -# crab_address - -Address data for Flanders by the governement, suited for import into OpenStreetMap. Datadump from 2021-10-26. This layer contains only visualisation logic. Import buttons should be added via an override. Note that HNRLABEL contains the original value, whereas _HNRLABEL contains a slightly cleaned version - - - This layer is shown at zoomlevel **0** and higher - - - -This layer is loaded from an external source, namely - -`https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/CRAB_2021_10_26/tile_{z}_{x}_{y}.geojson` - -## Table of contents - -1. [Themes using this layer](#themes-using-this-layer) -2. [Basic tags for this layer](#basic-tags-for-this-layer) -3. [Supported attributes](#supported-attributes) -4. [Featureview elements and TagRenderings](#featureview-elements-and-tagrenderings) - - [render_crab](#render_crab) - - [leftover-questions](#leftover-questions) - - [lod](#lod) - -## Themes using this layer - - - [grb](https://mapcomplete.org/grb) - -## Basic tags for this layer - -Elements must match the expression **HUISNR~.+** - -[Execute on overpass](http://overpass-turbo.eu/?Q=%5Bout%3Ajson%5D%5Btimeout%3A90%5D%3B%28%20%20%20%20nwr%5B%22HUISNR%22%5D%28%7B%7Bbbox%7D%7D%29%3B%0A%29%3Bout%20body%3B%3E%3Bout%20skel%20qt%3B) - -## Supported attributes - -## Featureview elements and TagRenderings - -| id | question | labels | freeform key | ------|-----|-----|----- | -| [render_crab](#render_crab) | _Volgens het CRAB ligt hier {STRAATNM} {HUISNR} (label: {HNRLABEL})_ | | _Multiple choice only_ | -| [leftover-questions](#leftover-questions) | _{questions( ,hidden)}_ | ignore-docs, added_by_default | _Multiple choice only_ | -| [lod](#lod)
_(Original in [questions](./BuiltinQuestions.md#lod))_ | _{linked_data_from_website()}_ | added_by_default | _Multiple choice only_ | - -### render_crab - -_This tagrendering has no question and is thus read-only_ -*Volgens het CRAB ligt hier {STRAATNM} {HUISNR} (label: {HNRLABEL})* - -### leftover-questions - -_This tagrendering has no question and is thus read-only_ -*{questions( ,hidden)}* - -This tagrendering has labels -`ignore-docs` -`added_by_default` - -### lod - -_This tagrendering has no question and is thus read-only_ -*{linked_data_from_website()}* - -This tagrendering has labels -`added_by_default` - - -This document is autogenerated from [assets/layers/crab_address/crab_address.json](https://source.mapcomplete.org/MapComplete/MapComplete/src/branch/develop/assets/layers/crab_address/crab_address.json) diff --git a/Docs/Themes/ghostsigns.md b/Docs/Themes/ghostsigns.md index cd22283b3e..37b68125c3 100644 --- a/Docs/Themes/ghostsigns.md +++ b/Docs/Themes/ghostsigns.md @@ -418,7 +418,6 @@ The question is `What is the corresponding Wikidata entity?` The question is `What does this artwork depict?` *This artwork depicts {wikidata_label(subject:wikidata)}{wikipedia(subject:wikidata)}* is shown if `subject:wikidata` is set -This tagrendering is only visible in the popup if the following condition is met: subject:wikidata~.+ This tagrendering has labels `artwork-question` diff --git a/Docs/Themes/grb.md b/Docs/Themes/grb.md index 04f2117a9b..586c20f362 100644 --- a/Docs/Themes/grb.md +++ b/Docs/Themes/grb.md @@ -13,7 +13,6 @@ This theme contains the following layers: - [service_ways (defined in this theme)](#service_ways) - [generic_osm_object (defined in this theme)](#generic_osm_object) - [address](../Layers/address.md) - - [crab_address](../Layers/crab_address.md) - [current_view](../Layers/current_view.md) Available languages: diff --git a/Docs/URL_Parameters.md b/Docs/URL_Parameters.md index 53bd163d02..f850334b4c 100644 --- a/Docs/URL_Parameters.md +++ b/Docs/URL_Parameters.md @@ -419,7 +419,7 @@ The default value is _false_ The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics' -This documentation is defined in the source code at [generateDocs.ts](ervdvn/git2/MapComplete/scripts/generateDocs.ts#L452) +This documentation is defined in the source code at [generateDocs.ts](ervdvn/git2/MapComplete/scripts/generateDocs.ts#L455) The default value is _map_ diff --git a/package-lock.json b/package-lock.json index c07e0fa4c5..f39c058bc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12112,9 +12112,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001716", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz", - "integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==", + "version": "1.0.30001717", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001717.tgz", + "integrity": "sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==", "dev": true, "funding": [ { diff --git a/scripts/velopark/veloParkToGeojson.ts b/scripts/velopark/veloParkToGeojson.ts index 5173812039..1487f34726 100644 --- a/scripts/velopark/veloParkToGeojson.ts +++ b/scripts/velopark/veloParkToGeojson.ts @@ -186,7 +186,13 @@ class VeloParkToGeojson extends Script { [6.15665815596, 51.4750237087], ]) - const alreadyLinkedQuery = new Overpass(Constants.defaultOverpassUrls[0], new RegexTag("ref:velopark", /.+/), [], new ImmutableStore(60 * 5), false) + const alreadyLinkedQuery = new Overpass( + Constants.defaultOverpassUrls[0], + new RegexTag("ref:velopark", /.+/), + [], + new ImmutableStore(60 * 5), + false + ) const alreadyLinkedFeatures = (await alreadyLinkedQuery.queryGeoJson(bboxBelgium))[0] const seenIds = new Set( alreadyLinkedFeatures.features.map((f) => f.properties?.["ref:velopark"]) diff --git a/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts b/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts index e10a44fb10..85ab9d5f89 100644 --- a/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts +++ b/src/Logic/FeatureSource/Sources/OverpassFeatureSource.ts @@ -9,7 +9,7 @@ import { TagsFilter } from "../../Tags/TagsFilter" import { BBox } from "../../BBox" import { OsmTags } from "../../../Models/OsmFeature" -("use strict") +;("use strict") /** * A wrapper around the 'Overpass'-object. diff --git a/src/Logic/ImageProviders/ImageUploadManager.ts b/src/Logic/ImageProviders/ImageUploadManager.ts index d11466ba35..2b5de74d61 100644 --- a/src/Logic/ImageProviders/ImageUploadManager.ts +++ b/src/Logic/ImageProviders/ImageUploadManager.ts @@ -286,7 +286,7 @@ export class ImageUploadManager { let absoluteUrl: string try { - ({ key, value, absoluteUrl } = await this._uploader.uploadImage( + ;({ key, value, absoluteUrl } = await this._uploader.uploadImage( blob, location, author, diff --git a/src/Logic/Osm/Overpass.ts b/src/Logic/Osm/Overpass.ts index 085307abb4..b218ea107b 100644 --- a/src/Logic/Osm/Overpass.ts +++ b/src/Logic/Osm/Overpass.ts @@ -6,7 +6,7 @@ import osmtogeojson from "osmtogeojson" import { FeatureCollection, Geometry } from "geojson" import { OsmTags } from "../../Models/OsmFeature" -("use strict") +;("use strict") /** * Interfaces overpass to get all the latest data */ diff --git a/src/Logic/Web/NearbyImagesSearch.ts b/src/Logic/Web/NearbyImagesSearch.ts index a841ca94f8..4783ee643a 100644 --- a/src/Logic/Web/NearbyImagesSearch.ts +++ b/src/Logic/Web/NearbyImagesSearch.ts @@ -190,7 +190,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher { provider: "panoramax", direction: imageData.properties["view:azimuth"], osmTags: { - panoramax: imageData.id + panoramax: imageData.id, }, thumbUrl: imageData.assets.thumb.href, date: new Date(imageData.properties.datetime).getTime(), @@ -199,22 +199,26 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher { detailsUrl: imageData.id, details: { isSpherical: - imageData.properties["exif"]["Xmp.GPano.ProjectionType"] === "equirectangular" - } + imageData.properties["exif"]["Xmp.GPano.ProjectionType"] === "equirectangular", + }, } } public async fetchImages(lat: number, lon: number): Promise { - const radiusSettings = [{ - place_fov_tolerance: 180, - radius: 15 - }, { - place_fov_tolerance: 180, - radius: 25 - }, { - place_fov_tolerance: 90, - radius: 50 - }] + const radiusSettings = [ + { + place_fov_tolerance: 180, + radius: 15, + }, + { + place_fov_tolerance: 180, + radius: 25, + }, + { + place_fov_tolerance: 90, + radius: 50, + }, + ] const promises: Promise[] = [] const maxRadius = this._radius let prevRadius = 0 @@ -223,7 +227,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher { place: [lon, lat], place_distance: [prevRadius, Math.min(maxRadius, radiusSetting.radius)], place_fov_tolerance: radiusSetting.place_fov_tolerance, - limit: 50 + limit: 50, }) promises.push(promise) prevRadius = radiusSetting.radius diff --git a/src/Logic/Web/PlantNet.ts b/src/Logic/Web/PlantNet.ts index bd8b258ea6..54aba2b63d 100644 --- a/src/Logic/Web/PlantNet.ts +++ b/src/Logic/Web/PlantNet.ts @@ -16,15 +16,23 @@ export default class PlantNet { url += "&images=" + encodeURIComponent(image) } - const result = await Utils.downloadJsonCachedAdvanced(url, 365 * 24 * 60 * 60 * 1000, undefined, true, 1) + const result = await Utils.downloadJsonCachedAdvanced( + url, + 365 * 24 * 60 * 60 * 1000, + undefined, + true, + 1 + ) if (result["content"]) { return result["content"] } - const errResult = <{ - "statusCode": 404, - "error": "Not Found", - "message": "Species not found" | string - }>JSON.parse(result["errContent"]) + const errResult = < + { + statusCode: 404 + error: "Not Found" + message: "Species not found" | string + } + >JSON.parse(result["errContent"]) if (errResult.message === "Species not found") { return "no_plant_detected" } @@ -32,7 +40,6 @@ export default class PlantNet { console.log("Get error result:", err, ">>>>", result["errContent"]) throw err } - } export interface PlantNetSpeciesMatch { diff --git a/src/Logic/Web/ThemeViewStateHashActor.ts b/src/Logic/Web/ThemeViewStateHashActor.ts index b84fe0d05b..e02f23d195 100644 --- a/src/Logic/Web/ThemeViewStateHashActor.ts +++ b/src/Logic/Web/ThemeViewStateHashActor.ts @@ -105,7 +105,14 @@ export default class ThemeViewStateHashActor { if (found.properties.id.startsWith("last_click")) { return true } - console.log("Setting selected element based on hash", hash, "; found", found, "current:", selectedElement.data?.properties?.id) + console.log( + "Setting selected element based on hash", + hash, + "; found", + found, + "current:", + selectedElement.data?.properties?.id + ) selectedElement.setData(found) return true } diff --git a/src/Models/ThemeConfig/DependencyCalculator.ts b/src/Models/ThemeConfig/DependencyCalculator.ts index ccdd801b4c..af3129bbf9 100644 --- a/src/Models/ThemeConfig/DependencyCalculator.ts +++ b/src/Models/ThemeConfig/DependencyCalculator.ts @@ -124,7 +124,7 @@ export default class DependencyCalculator { "] which calculates the value for " + currentKey, neededBy: layer.id, - checkHasSnapName: false + checkHasSnapName: false, }) return [] @@ -132,7 +132,7 @@ export default class DependencyCalculator { const params: ExtraFuncParams = { getFeatureById: () => undefined, getFeaturesWithin: detectNearyFeatures, - getProbablyOverlapsWith: detectNearyFeatures + getProbablyOverlapsWith: detectNearyFeatures, } const helpers = ExtraFunctions.constructHelpers(params) // ... Run the calculated tag code, which will trigger the getFeaturesWithin above... diff --git a/src/UI/Image/UploadImage.svelte b/src/UI/Image/UploadImage.svelte index e0a030eb68..d12d7c2179 100644 --- a/src/UI/Image/UploadImage.svelte +++ b/src/UI/Image/UploadImage.svelte @@ -105,9 +105,9 @@ {/if} {#if noBlur} - - - + + + {/if} @@ -124,20 +124,21 @@ }} > -
- +
{#if labelText} -
+
{labelText}
@@ -145,12 +146,11 @@ {/if} {#if noBlur} - - - + + + {/if}
-
diff --git a/src/UI/Image/UploadingImageCounter.svelte b/src/UI/Image/UploadingImageCounter.svelte index 6f9d06fe2c..e094abe090 100644 --- a/src/UI/Image/UploadingImageCounter.svelte +++ b/src/UI/Image/UploadingImageCounter.svelte @@ -54,9 +54,8 @@ {#if $pending - $failed > 0}
-
- -
+
+
{#if $pending - $failed === 1} {:else if $pending - $failed > 1} @@ -67,8 +66,8 @@ {/if}
{#if $progress !== undefined} -
-
+
+
{/if}
diff --git a/src/UI/InspectorGUI.svelte b/src/UI/InspectorGUI.svelte index ad4fa9c41e..da04d37a58 100644 --- a/src/UI/InspectorGUI.svelte +++ b/src/UI/InspectorGUI.svelte @@ -135,8 +135,11 @@ step.setData("loading") featuresStore.set([]) - const overpass = new Overpass(Constants.defaultOverpassUrls[0], undefined, - user.split(";").map((user) => "nw(user_touched:\"" + user + "\");")) + const overpass = new Overpass( + Constants.defaultOverpassUrls[0], + undefined, + user.split(";").map((user) => 'nw(user_touched:"' + user + '");') + ) if (!maplibremap.bounds.data) { return } diff --git a/src/UI/PlantNet/PlantNet.svelte b/src/UI/PlantNet/PlantNet.svelte index 160451d7f2..0118ae61b8 100644 --- a/src/UI/PlantNet/PlantNet.svelte +++ b/src/UI/PlantNet/PlantNet.svelte @@ -48,7 +48,9 @@ error = undefined running = true try { - const result: PlantNetResult | "no_plant_detected" = await PlantNet.query(imageUrls.data.slice(0, 5)) + const result: PlantNetResult | "no_plant_detected" = await PlantNet.query( + imageUrls.data.slice(0, 5) + ) if (result === "no_plant_detected") { error = "no_plant_detected" expandExplanation = true @@ -65,26 +67,22 @@ } -
- +
{#if error === "no_plant_detected"} - {:else if error !== undefined} {/if} - {#if !done && !running && !selectedOption} -