Remove last mentions of 'overpassTags' in the layerconfig
This commit is contained in:
parent
4da98ff86c
commit
d7c1f38d26
4 changed files with 7 additions and 10 deletions
|
@ -24,13 +24,6 @@ export interface LayerConfigJson {
|
||||||
description?: string | any;
|
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.
|
* This determines where the data for the layer is fetched.
|
||||||
* There are some options:
|
* There are some options:
|
||||||
|
@ -41,6 +34,10 @@ export interface LayerConfigJson {
|
||||||
* source: {overpassScript: "<custom overpass tags>"} when you want to do special things. _This should be really rare_.
|
* source: {overpassScript: "<custom overpass tags>"} 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
|
* 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...
|
* 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}
|
source: {osmTags: AndOrTagConfigJson | string} | {geoJsonSource: string} | {overpassScript: string}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class TitleElement extends UIElement {
|
||||||
if(layer.title === undefined){
|
if(layer.title === undefined){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (layer.overpassTags.matchesProperties(properties)) {
|
if (layer.source.osmTags.matchesProperties(properties)) {
|
||||||
|
|
||||||
const title = new TagRenderingAnswer(
|
const title = new TagRenderingAnswer(
|
||||||
this._allElementsStorage.getEventSourceFor(feature),
|
this._allElementsStorage.getEventSourceFor(feature),
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default class FilteringFeatureSource implements FeatureSource {
|
||||||
if (!FilteringFeatureSource.showLayer(toCheck, location)) {
|
if (!FilteringFeatureSource.showLayer(toCheck, location)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (toCheck.layerDef.overpassTags.matchesProperties(f.feature.properties)) {
|
if (toCheck.layerDef.source.osmTags.matchesProperties(f.feature.properties)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.<br/>" +
|
"Consider that we want to show 'Nature Reserves' and 'Forests'. Now, ofter, there are pieces of forest mapped _in_ the nature reserve.<br/>" +
|
||||||
"Now, showing those pieces of forest overlapping with the nature reserve truly clutters the map and is very user-unfriendly.<br/>" +
|
"Now, showing those pieces of forest overlapping with the nature reserve truly clutters the map and is very user-unfriendly.<br/>" +
|
||||||
"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."),
|
"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"),
|
"The tags of the objects to load from overpass"),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue