forked from MapComplete/MapComplete
Refactoring: remove old and obsolete data fields in themes and layers
This commit is contained in:
parent
130ae82e90
commit
922cebf9d1
49 changed files with 574 additions and 664 deletions
|
@ -92,7 +92,6 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
|
|||
this._includeClosedNotesDays +
|
||||
"&bbox={x_min},{y_min},{x_max},{y_max}",
|
||||
geoJsonZoomLevel: 10,
|
||||
maxCacheAge: 0,
|
||||
},
|
||||
/* We need to set 'pass_all_features'
|
||||
There are probably many note_import-layers, and we don't want the first one to gobble up all notes and then discard them...
|
||||
|
|
|
@ -135,6 +135,10 @@ export class UpdateLegacyLayer extends DesugaringStep<
|
|||
delete config["rotation"]
|
||||
delete config["wayHandling"]
|
||||
delete config["hideUnderlayingFeaturesMinPercentage"]
|
||||
const src = config.source
|
||||
delete src["isOsmCache"]
|
||||
delete src["maxCacheAge"]
|
||||
delete src["widenFactor"]
|
||||
|
||||
for (const mapRenderingElement of config["mapRendering"] ?? []) {
|
||||
if (mapRenderingElement["iconOverlays"] !== undefined) {
|
||||
|
|
|
@ -1615,6 +1615,18 @@ export class ValidateLayer extends Conversion<
|
|||
context.enters("doCount").err("Use `isCounted` instead of `doCount`")
|
||||
}
|
||||
|
||||
if (json.source) {
|
||||
const src = json.source
|
||||
if (src["isOsmCache"] !== undefined) {
|
||||
context.enters("source").err("isOsmCache is deprecated")
|
||||
}
|
||||
if (src["maxCacheAge"] !== undefined) {
|
||||
context
|
||||
.enters("source")
|
||||
.err("maxCacheAge is deprecated; it is " + src["maxCacheAge"])
|
||||
}
|
||||
}
|
||||
|
||||
return { raw: json, parsed: layerConfig }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,15 +74,6 @@ export interface LayerConfigJson {
|
|||
* Every source must set which tags have to be present in order to load the given layer.
|
||||
*/
|
||||
osmTags: TagConfigJson
|
||||
/**
|
||||
* question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?
|
||||
* The maximum amount of seconds that a tile is allowed to linger in the cache
|
||||
*
|
||||
* type: nat
|
||||
* default: 30 days
|
||||
* group: expert
|
||||
*/
|
||||
maxCacheAge?: number
|
||||
}
|
||||
| {
|
||||
/**
|
||||
|
@ -109,17 +100,6 @@ export interface LayerConfigJson {
|
|||
* ifunset: This is not a tiled geojson
|
||||
*/
|
||||
geoJsonZoomLevel?: number
|
||||
/**
|
||||
* Indicates that the upstream geojson data is OSM-derived.
|
||||
* Useful for e.g. merging or for scripts generating this cache.
|
||||
* This also indicates that making changes on this data is possible
|
||||
*
|
||||
* question: Is this geojson a cache of OpenStreetMap data?
|
||||
* ifunset: This is not an OpenStreetMap cache
|
||||
* iftrue: this is based on OpenStreetMap and can thus be edited
|
||||
* group: expert
|
||||
*/
|
||||
isOsmCache?: boolean
|
||||
/**
|
||||
* Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true` in the source for this
|
||||
*
|
||||
|
|
|
@ -417,14 +417,6 @@ export interface LayoutConfigJson {
|
|||
*/
|
||||
overpassTimeout?: number
|
||||
|
||||
/**
|
||||
* When a query is run, the data within bounds of the visible map is loaded.
|
||||
* However, users tend to pan and zoom a lot. It is pretty annoying if every single pan means a reloading of the data.
|
||||
* For this, the bounds are widened in order to make a small pan still within bounds of the loaded data.
|
||||
*
|
||||
* IF widenfactor is 1, this feature is disabled. A recommended value is between 1 and 3
|
||||
*/
|
||||
widenFactor?: number
|
||||
/**
|
||||
* At low zoom levels, overpass is used to query features.
|
||||
* At high zoom level, the OSM api is used to fetch one or more BBOX aligning with a slippy tile.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue