diff --git a/Customizations/JSON/LayerConfigJson.ts b/Customizations/JSON/LayerConfigJson.ts index 9112b589e..1be2df7b7 100644 --- a/Customizations/JSON/LayerConfigJson.ts +++ b/Customizations/JSON/LayerConfigJson.ts @@ -24,13 +24,6 @@ export interface LayerConfigJson { description?: string | any; - /** - * The tags to load from overpass. Either a simple 'key=value'-string, otherwise an advanced configuration - * DEPRECATED - * shorthand for source: {osmTags: "key=value"} - */ - //overpassTags: AndOrTagConfigJson | string; - /** * This determines where the data for the layer is fetched. * There are some options: @@ -41,6 +34,10 @@ export interface LayerConfigJson { * source: {overpassScript: ""} when you want to do special things. _This should be really rare_. * This means that the data will be pulled from overpass with this script, and will ignore the osmTags for the query * However, for the rest of the pipeline, the OsmTags will _still_ be used. This is important to enable layers etc... + * + * + * NOTE: the previous format was 'overpassTags: AndOrTagCOnfigJson | string', which is interpreted as a shorthand for source: {osmTags: "key=value"} + * While still supported, this is considered deprecated */ source: {osmTags: AndOrTagConfigJson | string} | {geoJsonSource: string} | {overpassScript: string} diff --git a/Logic/Actors/TitleHandler.ts b/Logic/Actors/TitleHandler.ts index c31cff8fc..b8e47ef7e 100644 --- a/Logic/Actors/TitleHandler.ts +++ b/Logic/Actors/TitleHandler.ts @@ -39,7 +39,7 @@ class TitleElement extends UIElement { if(layer.title === undefined){ continue; } - if (layer.overpassTags.matchesProperties(properties)) { + if (layer.source.osmTags.matchesProperties(properties)) { const title = new TagRenderingAnswer( this._allElementsStorage.getEventSourceFor(feature), diff --git a/Logic/FeatureSource/FilteringFeatureSource.ts b/Logic/FeatureSource/FilteringFeatureSource.ts index bfa11d9ed..174356723 100644 --- a/Logic/FeatureSource/FilteringFeatureSource.ts +++ b/Logic/FeatureSource/FilteringFeatureSource.ts @@ -47,7 +47,7 @@ export default class FilteringFeatureSource implements FeatureSource { if (!FilteringFeatureSource.showLayer(toCheck, location)) { continue; } - if (toCheck.layerDef.overpassTags.matchesProperties(f.feature.properties)) { + if (toCheck.layerDef.source.osmTags.matchesProperties(f.feature.properties)) { return true; } } diff --git a/UI/CustomGenerator/LayerPanel.ts b/UI/CustomGenerator/LayerPanel.ts index 9dcaa9d33..5375eb60b 100644 --- a/UI/CustomGenerator/LayerPanel.ts +++ b/UI/CustomGenerator/LayerPanel.ts @@ -102,7 +102,7 @@ export default class LayerPanel extends UIElement { "Consider that we want to show 'Nature Reserves' and 'Forests'. Now, ofter, there are pieces of forest mapped _in_ the nature reserve.
" + "Now, showing those pieces of forest overlapping with the nature reserve truly clutters the map and is very user-unfriendly.
" + "The features are placed layer by layer. If a feature below a feature on this layer overlaps for more then 'x'-percent, the underlying feature is hidden."), - setting(new AndOrTagInput(), "overpassTags", "Overpass query", + setting(new AndOrTagInput(), ["osmSource","overpassTags"], "Overpass query", "The tags of the objects to load from overpass"), ],