Add capability to load tiled geojsons, eventually as overpass-cache

This commit is contained in:
Pieter Vander Vennet 2021-04-22 03:30:46 +02:00
parent 475cdae19f
commit 2da52501a3
16 changed files with 520 additions and 76 deletions

View file

@ -85,6 +85,7 @@ export default class LayerConfig {
this.source = new SourceConfig({
osmTags: osmTags,
geojsonSource: json.source["geoJson"],
geojsonSourceLevel: json.source["geoJsonZoomLevel"],
overpassScript: json.source["overpassScript"],
});
} else {
@ -159,7 +160,7 @@ export default class LayerConfig {
if (renderingJson === "questions") {
if (readOnly) {
throw `A tagrendering has a question, but asking a question does not make sense here: is it a title icon or a geojson-layer? ${context}`
throw `A tagrendering has a question, but asking a question does not make sense here: is it a title icon or a geojson-layer? ${context}. The offending tagrendering is ${JSON.stringify(renderingJson)}`
}
return new TagRenderingConfig("questions", undefined)
@ -176,7 +177,7 @@ export default class LayerConfig {
});
}
this.tagRenderings = trs(json.tagRenderings, this.source.geojsonSource !== undefined);
this.tagRenderings = trs(json.tagRenderings, false);
const titleIcons = [];