forked from MapComplete/MapComplete
Add detection for negative tagging in layers, fix issue with 'key!=' being interpreted as 'key!=*', add tests
This commit is contained in:
parent
360f83f04f
commit
b5e289764e
10 changed files with 49 additions and 3 deletions
|
@ -2,7 +2,7 @@ import {Utils} from "../Utils";
|
|||
|
||||
export default class Constants {
|
||||
|
||||
public static vNumber = "0.17.0";
|
||||
public static vNumber = "0.17.1";
|
||||
|
||||
public static ImgurApiKey = '7070e7167f0a25a'
|
||||
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
||||
|
|
|
@ -101,6 +101,10 @@ export default class LayerConfig extends WithContextLoader {
|
|||
context + "source.osmTags"
|
||||
);
|
||||
|
||||
if(Constants.priviliged_layers.indexOf(this.id) < 0 && osmTags.isNegative()){
|
||||
throw context + "The source states tags which give a very wide selection: it only uses negative expressions, which will result in too much and unexpected data. Add at least one required tag. The tags are:\n\t"+osmTags.asHumanString(false, false, {});
|
||||
}
|
||||
|
||||
if (json.source["geoJsonSource"] !== undefined) {
|
||||
throw context + "Use 'geoJson' instead of 'geoJsonSource'";
|
||||
}
|
||||
|
@ -108,6 +112,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
if (json.source["geojson"] !== undefined) {
|
||||
throw context + "Use 'geoJson' instead of 'geojson' (the J is a capital letter)";
|
||||
}
|
||||
|
||||
|
||||
this.source = new SourceConfig(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue