diff --git a/InitUiElements.ts b/InitUiElements.ts index 8fafd7677..e7113e2d6 100644 --- a/InitUiElements.ts +++ b/InitUiElements.ts @@ -454,7 +454,7 @@ export class InitUiElements { return false; } - if (z >= clustering.maxZoom) { + if (z > clustering.maxZoom) { return true } @@ -489,7 +489,7 @@ export class InitUiElements { } return true - }, [State.state.currentBounds] + }, [State.state.currentBounds, source.layer.isDisplayed] ) new ShowDataLayer( diff --git a/Logic/Actors/OverpassFeatureSource.ts b/Logic/Actors/OverpassFeatureSource.ts index 4f4f7a77f..62cf79998 100644 --- a/Logic/Actors/OverpassFeatureSource.ts +++ b/Logic/Actors/OverpassFeatureSource.ts @@ -38,8 +38,7 @@ export default class OverpassFeatureSource implements FeatureSource { readonly currentBounds: UIEventSource } private readonly _isActive: UIEventSource; - private readonly onBboxLoaded: (bbox: BBox, date: Date, layers: LayerConfig[]) => void; - + private readonly onBboxLoaded: (bbox: BBox, date: Date, layers: LayerConfig[], zoomlevel: number) => void; constructor( state: { readonly locationControl: UIEventSource, @@ -49,10 +48,11 @@ export default class OverpassFeatureSource implements FeatureSource { readonly overpassMaxZoom: UIEventSource, readonly currentBounds: UIEventSource }, - options?: { + options: { + padToTiles: UIEventSource, isActive?: UIEventSource, relationTracker: RelationsTracker, - onBboxLoaded?: (bbox: BBox, date: Date, layers: LayerConfig[]) => void + onBboxLoaded?: (bbox: BBox, date: Date, layers: LayerConfig[], zoomlevel: number) => void }) { this.state = state @@ -61,7 +61,7 @@ export default class OverpassFeatureSource implements FeatureSource { this.relationsTracker = options.relationTracker const self = this; state.currentBounds.addCallback(_ => { - self.update() + self.update(options.padToTiles.data) }) } @@ -84,21 +84,21 @@ export default class OverpassFeatureSource implements FeatureSource { return new Overpass(new Or(filters), extraScripts, interpreterUrl, this.state.overpassTimeout, this.relationsTracker); } - private update() { + private update(paddedZoomLevel: number) { if (!this._isActive.data) { return; } const self = this; - this.updateAsync().then(bboxDate => { + this.updateAsync(paddedZoomLevel).then(bboxDate => { if(bboxDate === undefined || self.onBboxLoaded === undefined){ return; } const [bbox, date, layers] = bboxDate - self.onBboxLoaded(bbox, date, layers) + self.onBboxLoaded(bbox, date, layers, paddedZoomLevel) }) } - private async updateAsync(): Promise<[BBox, Date, LayerConfig[]]> { + private async updateAsync(padToZoomLevel: number): Promise<[BBox, Date, LayerConfig[]]> { if (this.runningQuery.data) { console.log("Still running a query, not updating"); return undefined; @@ -109,7 +109,7 @@ export default class OverpassFeatureSource implements FeatureSource { return undefined; } - const bounds = this.state.currentBounds.data?.pad(this.state.layoutToUse.widenFactor)?.expandToTileBounds(14); + const bounds = this.state.currentBounds.data?.pad(this.state.layoutToUse.widenFactor)?.expandToTileBounds(padToZoomLevel); if (bounds === undefined) { return undefined; diff --git a/Logic/BBox.ts b/Logic/BBox.ts index a6f350cf8..0205b1533 100644 --- a/Logic/BBox.ts +++ b/Logic/BBox.ts @@ -116,16 +116,15 @@ export class BBox { return this.minLat } - pad(factor: number): BBox { - const latDiff = this.maxLat - this.minLat - const lat = (this.maxLat + this.minLat) / 2 - const lonDiff = this.maxLon - this.minLon - const lon = (this.maxLon + this.minLon) / 2 + pad(factor: number, maxIncrease = 2): BBox { + + const latDiff = Math.min(maxIncrease / 2, Math.abs(this.maxLat - this.minLat) * factor) + const lonDiff =Math.min(maxIncrease / 2, Math.abs(this.maxLon - this.minLon) * factor) return new BBox([[ - lon - lonDiff * factor, - lat - latDiff * factor - ], [lon + lonDiff * factor, - lat + latDiff * factor]]) + this.minLon - lonDiff, + this.minLat - latDiff + ], [this.maxLon + lonDiff, + this.maxLat + latDiff]]) } toLeaflet() { diff --git a/Logic/FeatureSource/Actors/SaveTileToLocalStorageActor.ts b/Logic/FeatureSource/Actors/SaveTileToLocalStorageActor.ts index b0fbc25de..092c1a402 100644 --- a/Logic/FeatureSource/Actors/SaveTileToLocalStorageActor.ts +++ b/Logic/FeatureSource/Actors/SaveTileToLocalStorageActor.ts @@ -4,11 +4,10 @@ * Technically, more an Actor then a featuresource, but it fits more neatly this ay */ import {FeatureSourceForLayer} from "../FeatureSource"; -import SimpleMetaTagger from "../../SimpleMetaTagger"; export default class SaveTileToLocalStorageActor { public static readonly storageKey: string = "cached-features"; - public static readonly formatVersion: string = "1" + public static readonly formatVersion: string = "2" constructor(source: FeatureSourceForLayer, tileIndex: number) { @@ -37,6 +36,5 @@ export default class SaveTileToLocalStorageActor { }catch(e){ console.error("Could not mark tile ", key, "as visited") } - } } \ No newline at end of file diff --git a/Logic/FeatureSource/FeaturePipeline.ts b/Logic/FeatureSource/FeaturePipeline.ts index 8d8b2e4b1..ee89ee6aa 100644 --- a/Logic/FeatureSource/FeaturePipeline.ts +++ b/Logic/FeatureSource/FeaturePipeline.ts @@ -58,7 +58,7 @@ export default class FeaturePipeline { private readonly freshnesses = new Map(); private readonly oldestAllowedDate: Date = new Date(new Date().getTime() - 60 * 60 * 24 * 30 * 1000); - private readonly osmSourceZoomLevel = 14 + private readonly osmSourceZoomLevel = 15 constructor( handleFeatureSource: (source: FeatureSourceForLayer & Tiled) => void, @@ -147,7 +147,7 @@ export default class FeaturePipeline { // We split them up into tiles anyway as it is an OSM source TiledFeatureSource.createHierarchy(src, { layer: src.layer, - minZoomLevel: 14, + minZoomLevel: this.osmSourceZoomLevel, dontEnforceMinZoom: true, registerTile: (tile) => { new RegisteringAllFromFeatureSourceActor(tile) @@ -155,7 +155,7 @@ export default class FeaturePipeline { tile.features.addCallbackAndRunD(_ => self.newDataLoadedSignal.setData(tile)) } }) - }else{ + } else { new RegisteringAllFromFeatureSourceActor(src) perLayerHierarchy.get(id).registerTile(src) src.features.addCallbackAndRunD(_ => self.newDataLoadedSignal.setData(src)) @@ -200,7 +200,7 @@ export default class FeaturePipeline { new PerLayerFeatureSourceSplitter(state.filteredLayers, (source) => TiledFeatureSource.createHierarchy(source, { layer: source.layer, - minZoomLevel: 14, + minZoomLevel: source.layer.layerDef.minzoom, dontEnforceMinZoom: true, maxFeatureCount: state.layoutToUse.clustering.minNeededElements, maxZoomLevel: state.layoutToUse.clustering.maxZoom, @@ -235,7 +235,7 @@ export default class FeaturePipeline { // Whenever fresh data comes in, we need to update the metatagging - self.newDataLoadedSignal.stabilized(1000).addCallback(src => { + self.newDataLoadedSignal.stabilized(1000).addCallback(_ => { self.updateAllMetaTagging() }) @@ -276,15 +276,15 @@ export default class FeaturePipeline { const self = this return this.state.currentBounds.map(bbox => { if (bbox === undefined) { - return + return undefined } if (!isSufficientlyZoomed.data) { - return; + return undefined; } const osmSourceZoomLevel = self.osmSourceZoomLevel const range = bbox.containingTileRange(osmSourceZoomLevel) const tileIndexes = [] - if (range.total > 100) { + if (range.total >= 100) { // Too much tiles! return [] } @@ -294,7 +294,7 @@ export default class FeaturePipeline { if (oldestDate !== undefined && oldestDate > this.oldestAllowedDate) { console.debug("Skipping tile", osmSourceZoomLevel, x, y, "as a decently fresh one is available") // The cached tiles contain decently fresh data - return; + return undefined; } tileIndexes.push(i) }) @@ -327,28 +327,30 @@ export default class FeaturePipeline { } const range = bbox.containingTileRange(zoom) - if (range.total > 100) { + if (range.total >= 5000) { return false } const self = this; const allFreshnesses = Tiles.MapRange(range, (x, y) => self.freshnessForVisibleLayers(zoom, x, y)) return allFreshnesses.some(freshness => freshness === undefined || freshness < this.oldestAllowedDate) - }, [state.locationControl]) const self = this; const updater = new OverpassFeatureSource(state, { + padToTiles: state.locationControl.map(l => Math.min(15, l.zoom + 1)), relationTracker: this.relationTracker, isActive: useOsmApi.map(b => !b && overpassIsActive.data, [overpassIsActive]), - onBboxLoaded: ((bbox, date, downloadedLayers) => { - Tiles.MapRange(bbox.containingTileRange(self.osmSourceZoomLevel), (x, y) => { + onBboxLoaded: (bbox, date, downloadedLayers, paddedToZoomLevel) => { + Tiles.MapRange(bbox.containingTileRange(paddedToZoomLevel), (x, y) => { + const tileIndex = Tiles.tile_index(paddedToZoomLevel, x, y) downloadedLayers.forEach(layer => { - SaveTileToLocalStorageActor.MarkVisited(layer.id, Tiles.tile_index(this.osmSourceZoomLevel, x, y), date) + self.freshnesses.get(layer.id).addTileLoad(tileIndex, date) + SaveTileToLocalStorageActor.MarkVisited(layer.id, tileIndex, date) }) }) - }) + } }); diff --git a/Logic/FeatureSource/TiledFeatureSource/TiledFromLocalStorageSource.ts b/Logic/FeatureSource/TiledFeatureSource/TiledFromLocalStorageSource.ts index 6f815f48d..a2cd50be0 100644 --- a/Logic/FeatureSource/TiledFeatureSource/TiledFromLocalStorageSource.ts +++ b/Logic/FeatureSource/TiledFeatureSource/TiledFromLocalStorageSource.ts @@ -1,14 +1,16 @@ import FilteredLayer from "../../../Models/FilteredLayer"; import {FeatureSourceForLayer, Tiled} from "../FeatureSource"; import {UIEventSource} from "../../UIEventSource"; -import Loc from "../../../Models/Loc"; import TileHierarchy from "./TileHierarchy"; import SaveTileToLocalStorageActor from "../Actors/SaveTileToLocalStorageActor"; import {Tiles} from "../../../Models/TileRange"; import {BBox} from "../../BBox"; export default class TiledFromLocalStorageSource implements TileHierarchy { - public loadedTiles: Map = new Map(); + public readonly loadedTiles: Map = new Map(); + private readonly layer: FilteredLayer; + private readonly handleFeatureSource: (src: FeatureSourceForLayer & Tiled, index: number) => void; + private readonly undefinedTiles: Set; public static GetFreshnesses(layerId: string): Map { const prefix = SaveTileToLocalStorageActor.storageKey + "-" + layerId + "-" @@ -29,14 +31,15 @@ export default class TiledFromLocalStorageSource implements TileHierarchy void, state: { - locationControl: UIEventSource - leafletMap: any + currentBounds: UIEventSource }) { + this.layer = layer; + this.handleFeatureSource = handleFeatureSource; - const undefinedTiles = new Set() + + this.undefinedTiles = new Set() const prefix = SaveTileToLocalStorageActor.storageKey + "-" + layer.layerDef.id + "-" - // @ts-ignore - const indexes: number[] = Object.keys(localStorage) + const knownTiles: number[] = Object.keys(localStorage) .filter(key => { return key.startsWith(prefix) && !key.endsWith("-time") && !key.endsWith("-format"); }) @@ -45,8 +48,8 @@ export default class TiledFromLocalStorageSource implements TileHierarchy !isNaN(i)) - console.debug("Layer", layer.layerDef.id, "has following tiles in available in localstorage", indexes.map(i => Tiles.tile_from_index(i).join("/")).join(", ")) - for (const index of indexes) { + console.debug("Layer", layer.layerDef.id, "has following tiles in available in localstorage", knownTiles.map(i => Tiles.tile_from_index(i).join("/")).join(", ")) + for (const index of knownTiles) { const prefix = SaveTileToLocalStorageActor.storageKey + "-" + layer.layerDef.id + "-" + index; const version = localStorage.getItem(prefix + "-format") @@ -55,78 +58,54 @@ export default class TiledFromLocalStorageSource implements TileHierarchy i % 100) - const indexesSet = new Set(indexes) - const maxZoom = Math.max(...zLevels) - const minZoom = Math.min(...zLevels) - const self = this; + const self = this + state.currentBounds.map(bounds => { - const neededTiles = state.locationControl.map( - location => { - if (!layer.isDisplayed.data) { - // No need to download! - the layer is disabled - return undefined; - } - - if (location.zoom < layer.layerDef.minzoom) { - // No need to download! - the layer is disabled - return undefined; - } - - // Yup, this is cheating to just get the bounds here - const bounds = state.leafletMap.data?.getBounds() - if (bounds === undefined) { - // We'll retry later - return undefined - } - - const needed = [] - for (let z = minZoom; z <= maxZoom; z++) { - - const tileRange = Tiles.TileRangeBetween(z, bounds.getNorth(), bounds.getEast(), bounds.getSouth(), bounds.getWest()) - const neededZ = Tiles.MapRange(tileRange, (x, y) => Tiles.tile_index(z, x, y)) - .filter(i => !self.loadedTiles.has(i) && !undefinedTiles.has(i) && indexesSet.has(i)) - needed.push(...neededZ) - } - - if (needed.length === 0) { - return undefined - } - return needed + if(bounds === undefined){ + return; } - , [layer.isDisplayed, state.leafletMap]).stabilized(50); - - neededTiles.addCallbackAndRunD(neededIndexes => { - for (const neededIndex of neededIndexes) { - // We load the features from localStorage - try { - const key = SaveTileToLocalStorageActor.storageKey + "-" + layer.layerDef.id + "-" + neededIndex - const data = localStorage.getItem(key) - const features = JSON.parse(data) - const src = { - layer: layer, - features: new UIEventSource<{ feature: any; freshness: Date }[]>(features), - name: "FromLocalStorage(" + key + ")", - tileIndex: neededIndex, - bbox: BBox.fromTileIndex(neededIndex) - } - handleFeatureSource(src, neededIndex) - self.loadedTiles.set(neededIndex, src) - } catch (e) { - console.error("Could not load data tile from local storage due to", e) - undefinedTiles.add(neededIndex) + for (const knownTile of knownTiles) { + + if(this.loadedTiles.has(knownTile)){ + continue; } + if(this.undefinedTiles.has(knownTile)){ + continue; + } + + if(!bounds.overlapsWith(BBox.fromTileIndex(knownTile))){ + continue; + } + self.loadTile(knownTile) } - - }) } + + private loadTile( neededIndex: number){ + try { + const key = SaveTileToLocalStorageActor.storageKey + "-" + this.layer.layerDef.id + "-" + neededIndex + const data = localStorage.getItem(key) + const features = JSON.parse(data) + const src = { + layer: this.layer, + features: new UIEventSource<{ feature: any; freshness: Date }[]>(features), + name: "FromLocalStorage(" + key + ")", + tileIndex: neededIndex, + bbox: BBox.fromTileIndex(neededIndex) + } + this.handleFeatureSource(src, neededIndex) + this.loadedTiles.set(neededIndex, src) + } catch (e) { + console.error("Could not load data tile from local storage due to", e) + this.undefinedTiles.add(neededIndex) + } + } } \ No newline at end of file diff --git a/Logic/SimpleMetaTagger.ts b/Logic/SimpleMetaTagger.ts index 4cf5a8c47..b0e4d50bf 100644 --- a/Logic/SimpleMetaTagger.ts +++ b/Logic/SimpleMetaTagger.ts @@ -209,7 +209,7 @@ export default class SimpleMetaTagger { configurable: true, get: () => { delete feature.properties._isOpen - feature.properties._isOpen = "" + feature.properties._isOpen = undefined const tagsSource = State.state.allElements.getEventSourceById(feature.properties.id); tagsSource.addCallbackAndRunD(tags => { if (tags.opening_hours === undefined || tags._country === undefined) { @@ -230,7 +230,8 @@ export default class SimpleMetaTagger { const oldNextChange = tags["_isOpen:nextTrigger"] ?? 0; if (oldNextChange > (new Date()).getTime() && - tags["_isOpen:oldvalue"] === tags["opening_hours"]) { + tags["_isOpen:oldvalue"] === tags["opening_hours"] + && tags["_isOpen"] !== undefined) { // Already calculated and should not yet be triggered return false; } @@ -267,7 +268,7 @@ export default class SimpleMetaTagger { } }) - return feature.properties["_isOpen"] + return undefined } }) diff --git a/Models/Constants.ts b/Models/Constants.ts index f5ad8596e..c1ef61f23 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,9 +2,7 @@ import {Utils} from "../Utils"; export default class Constants { - public static vNumber = "0.11.0-alpha-1"; - - + public static vNumber = "0.11.0-alpha-2"; public static ImgurApiKey = '7070e7167f0a25a' public static readonly mapillary_client_token_v3 = 'TXhLaWthQ1d4RUg0czVxaTVoRjFJZzowNDczNjUzNmIyNTQyYzI2' public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85" diff --git a/Models/ThemeConfig/LayoutConfig.ts b/Models/ThemeConfig/LayoutConfig.ts index e1fa4b9ef..ecf96c059 100644 --- a/Models/ThemeConfig/LayoutConfig.ts +++ b/Models/ThemeConfig/LayoutConfig.ts @@ -90,7 +90,7 @@ export default class LayoutConfig { throw "Widenfactor too small" }else{ // Unofficial themes get away with this - console.warn("Detected a very small widenfactor, bumping this above 1.") + console.warn("Detected a very small widenfactor for theme ", this.id ,", bumping this above 1.") json.widenFactor = json.widenFactor + 1 } } diff --git a/Models/TileRange.ts b/Models/TileRange.ts index 7a542a213..cccfe1964 100644 --- a/Models/TileRange.ts +++ b/Models/TileRange.ts @@ -15,7 +15,7 @@ export class Tiles { public static MapRange(tileRange: TileRange, f: (x: number, y: number) => T): T[] { const result: T[] = [] const total = tileRange.total - if(total > 5000){ + if(total > 100000){ throw "Tilerange too big" } for (let x = tileRange.xstart; x <= tileRange.xend; x++) { diff --git a/UI/BigComponents/ThemeIntroductionPanel.ts b/UI/BigComponents/ThemeIntroductionPanel.ts index fec58bb29..c7c096421 100644 --- a/UI/BigComponents/ThemeIntroductionPanel.ts +++ b/UI/BigComponents/ThemeIntroductionPanel.ts @@ -50,13 +50,11 @@ export default class ThemeIntroductionPanel extends Combine { ) super([ - layout.description.Clone(), - "

", + layout.description.Clone().SetClass("blcok mb-4"), toTheMap, - loginStatus, - layout.descriptionTail?.Clone(), - "
", - languagePicker, + loginStatus.SetClass("block"), + layout.descriptionTail?.Clone().SetClass("block mt-4"), + languagePicker.SetClass("block mt-4"), ...layout.CustomCodeSnippets() ]) diff --git a/UI/SpecialVisualizations.ts b/UI/SpecialVisualizations.ts index d289ca9cf..7c0092fe2 100644 --- a/UI/SpecialVisualizations.ts +++ b/UI/SpecialVisualizations.ts @@ -55,7 +55,11 @@ export default class SpecialVisualizations { if (!tags.hasOwnProperty(key)) { continue } - parts.push([key, tags[key] ?? "undefined"]); + let v = tags[key] + if(v === ""){ + v = "empty string" + } + parts.push([key, v ?? "undefined"]); } for(const key of calculatedTags){ diff --git a/assets/themes/postboxes/license_info.json b/assets/themes/postboxes/license_info.json new file mode 100644 index 000000000..0c50f7040 --- /dev/null +++ b/assets/themes/postboxes/license_info.json @@ -0,0 +1,25 @@ +[ + { + "path": "post_office.svg", + "license": "CC BY-SA 4.0", + "authors": [ + "https://github.com/emojione/emojione/graphs/contributors" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:Emojione_BW_1F3E4.svg", + "https://github.com/emojione/emojione/blob/2.2.7/assets/svg_bw/1f3e4.svg" + ] + }, + { + "path": "postbox.svg", + "license": "CC BY 4.0", + "authors": [ + "Vincent Le Moign", + "https://twitter.com/webalys" + ], + "sources": [ + "https://upload.wikimedia.org/wikipedia/commons/6/6d/726-postbox.svg", + "http://emoji.streamlineicons.com" + ] + } +] \ No newline at end of file diff --git a/assets/themes/postboxes/post_office.svg b/assets/themes/postboxes/post_office.svg new file mode 100644 index 000000000..ebdd76b49 --- /dev/null +++ b/assets/themes/postboxes/post_office.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/postboxes/postbox.svg b/assets/themes/postboxes/postbox.svg new file mode 100644 index 000000000..05e6d95d4 --- /dev/null +++ b/assets/themes/postboxes/postbox.svg @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json new file mode 100644 index 000000000..f19df492e --- /dev/null +++ b/assets/themes/postboxes/postboxes.json @@ -0,0 +1,174 @@ +{ + "id": "postboxes", + "title": { + "en": "Postbox and Post Office Map" + }, + "shortDescription": { + "en": "A map showing postboxes and post offices" + }, + "description": { + "en": "On this map you can find and add data of post offices and post boxes. You can use this map to find where you can mail your next postcard! :)
Spotted an error or is a post box missing? You can edit this map with a free OpenStreetMap account. " + }, + "language": [ + "en" + ], + "maintainer": "", + "icon": "./assets/themes/postboxes/postbox.svg", + "version": "0", + "startLat": 53.5511, + "startLon": 9.9937, + "startZoom": 13, + "widenFactor": 1.5, + "defaultBackgroundId": "CartoDB.Voyager", + "clustering": { + "maxZoom": 14, + "minNeededElements": 100 + }, + "layers": [ + { + "id": "postboxes", + "name": { + "en": "Postboxes" + }, + "minzoom": 12, + "source": { + "osmTags": "amenity=post_box" + }, + "title": { + "render": { + "en": "Postbox" + } + }, + "description": { + "en": "The layer showing postboxes." + }, + "tagRenderings": [ + "images", + { + "id": "minimap", + "render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }" + } + ], + "icon": { + "render": "./assets/themes/postboxes/postbox.svg" + }, + "width": { + "render": "1" + }, + "iconSize": { + "render": "40,40,bottom" + }, + "color": { + "render": "#DADADA" + }, + "presets": [ + { + "tags": [ + "amenity=post_box" + ], + "title": { + "en": "postbox" + } + } + ], + "wayHandling": 2, + "deletion": { + "softDeletion": { + "and": [ + "amenity=", + "razed:amenity=post_box" + ] + } + } + }, + { + "id": "postoffices", + "name": { + "en": "Post offices" + }, + "minzoom": 12, + "source": { + "osmTags": "amenity=post_office" + }, + "title": { + "render": { + "en": "Post Office" + } + }, + "description": { + "en": "A layer showing post offices." + }, + "tagRenderings": [ + "images", + { + "id": "minimap", + "render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }" + }, + { + "render": { + "en": "Opening Hours: {opening_hours_table()}" + }, + "freeform": { + "key": "opening_hours", + "type": "opening_hours" + }, + "question": { + "en": "What are the opening hours for this post office?" + }, + "mappings": [ + { + "if": "opening_hours=24/7", + "then": { + "en": "24/7 opened (including holidays)" + } + } + ], + "id": "OH" + } + ], + "icon": { + "render": "square:white;./assets/themes/postboxes/post_office.svg" + }, + "iconOverlays": [ + { + "if": "opening_hours~*", + "then": "isOpen", + "badge": true + } + ], + "width": { + "render": "1" + }, + "iconSize": { + "render": "40,40,bottom" + }, + "color": { + "render": "#DADADA" + }, + "presets": [ + { + "tags": [ + "amenity=post_office" + ], + "title": { + "en": "Post Office" + } + } + ], + "wayHandling": 2, + "filter": [ + { + "id": "is_open", + "options": [ + { + "question": { + "en": "Currently open" + }, + "osmTags": "_isOpen=yes" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json b/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json index 2b303ea14..489c36ed7 100644 --- a/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json +++ b/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json @@ -14,7 +14,10 @@ "nl": "Een kaart om toeristisch relevante info op aan te duiden" }, "description": { - "nl": "Op deze kaart kan je info zien die relevant is voor toerisme, zoals:
  • Eetgelegenheden
  • Cafés en bars
  • (Fiets)oplaadpunten
  • Fietspompen, fietserverhuur en fietswinkels
  • Uitkijktorens
  • ...
Zie je fouten op de kaart? Dan kan je zelf makkelijk aanpasingen maken, die zichtbaar zijn voor iedereen. Hiervoor dien je een gratis OpenStreetMap account voor te maken.

Met de steun van Toerisme Vlaanderen" + "nl": "Op deze kaart kan je info zien die relevant is voor toerisme, zoals:
  • Eetgelegenheden
  • Cafés en bars
  • (Fiets)oplaadpunten
  • Fietspompen, fietserverhuur en fietswinkels
  • Uitkijktorens
  • ...
Zie je fouten op de kaart? Dan kan je zelf makkelijk aanpasingen maken, die zichtbaar zijn voor iedereen. Hiervoor dien je een gratis OpenStreetMap account voor te maken." + }, + "descriptionTail": { + "nl": "Met de steun van Toerisme Vlaanderen" }, "icon": "./assets/svg/star.svg", "startZoom": 8, @@ -28,16 +31,38 @@ "cafe_pub" ], "override": { - "minzoom": 16 + "minzoom": 17 } }, - "charging_station", - "toilet", - "bench", - "waste_basket", - "bike_repair_station", - "binocular", - "observation_tower" + { + "builtin": [ + "bench", + "picnic_table", + "waste_basket" + ], + "override": { + "minzoom": 19 + } + }, + { + "builtin": [ + "charging_station", + "toilet", + "bike_repair_station" + ], + "override": { + "minzoom": 14 + } + }, + { + "builtin": [ + "binocular", + "observation_tower" + ], + "override": { + "minzoom": 10 + } + } ], "hideFromOverview": true } \ No newline at end of file diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json index 2114beac2..67cf0c600 100644 --- a/assets/themes/uk_addresses/uk_addresses.json +++ b/assets/themes/uk_addresses/uk_addresses.json @@ -151,7 +151,9 @@ }, "freeform": { "key": "addr:housenumber", - "addExtraTags": "nohousenumber=" + "addExtraTags": [ + "nohousenumber=" + ] }, "mappings": [ { diff --git a/langs/pt.json b/langs/pt.json index 577ee0f20..92db819cb 100644 --- a/langs/pt.json +++ b/langs/pt.json @@ -20,5 +20,20 @@ "uploadingMultiple": "A enviar {count} imagens…", "uploadingPicture": "A enviar a sua imagem…", "addPicture": "Adicionar imagem" + }, + "index": { + "#": "Estes textos são mostrados acima dos botões do tema quando nenhum tema é carregado", + "title": "Bem-vindo(a) ao MapComplete", + "intro": "O MapComplete é um visualizador e editor do OpenStreetMap, que mostra informações sobre um tema específico.", + "pickTheme": "Escolha um tema abaixo para começar." + }, + "delete": { + "reasons": { + "notFound": "Não foi possível encontrar este elemento" + }, + "explanations": { + "selectReason": "Por favor, selecione a razão porque este elemento deve ser eliminado", + "hardDelete": "Este ponto será eliminado no OpenStreetMap. Pode ser recuperado por um contribuidor com experiência" + } } } diff --git a/langs/shared-questions/id.json b/langs/shared-questions/id.json index 2af2d36dd..ba2382719 100644 --- a/langs/shared-questions/id.json +++ b/langs/shared-questions/id.json @@ -8,6 +8,25 @@ }, "website": { "question": "Apa situs web dari {name}?" + }, + "payment-options": { + "mappings": { + "1": { + "then": "Disini menerima pembayaran dengan kartu" + }, + "0": { + "then": "Disini menerima pembayaran tunai" + } + }, + "question": "Metode pembayaran manakah yang di terima disini?" + }, + "level": { + "question": "Pada tingkat apa fitur ini diletakkan?", + "mappings": { + "3": { + "then": "Berlokasi di lantai pertama" + } + } } } -} \ No newline at end of file +} diff --git a/langs/shared-questions/pt.json b/langs/shared-questions/pt.json index 9524e139d..a1622b21a 100644 --- a/langs/shared-questions/pt.json +++ b/langs/shared-questions/pt.json @@ -61,6 +61,23 @@ } }, "question": "Este lugar é acessível a utilizadores de cadeiras de rodas?" + }, + "dog-access": { + "mappings": { + "0": { + "then": "Os cães são permitidos" + }, + "1": { + "then": "Os cães não são permitidos" + }, + "2": { + "then": "Os cães são permitidos, mas têm de ser presos pela trela" + }, + "3": { + "then": "Os cães são permitidos e podem correr livremente" + } + }, + "question": "Os cães são permitidos neste estabelecimento?" } } -} \ No newline at end of file +} diff --git a/langs/themes/en.json b/langs/themes/en.json index cd96da916..918724d78 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1358,11 +1358,6 @@ "title": { "render": "Known address" } - }, - "2": { - "title": { - "render": "{name}" - } } }, "shortDescription": "Help to build an open dataset of UK addresses",