Chore: move RasterLayerProperties into separate file in order for the schema generator to work

This commit is contained in:
Pieter Vander Vennet 2023-04-21 16:19:36 +02:00
parent 498b2bb8d6
commit e4e99c0b0a
11 changed files with 59342 additions and 1626 deletions

View file

@ -0,0 +1,34 @@
export interface RasterLayerProperties {
/**
* The name of the imagery source
*/
readonly name: string | Record<string, string>
readonly isOverlay?: boolean
readonly id: string
readonly url: string
readonly category?:
| string
| "photo"
| "map"
| "historicmap"
| "osmbasedmap"
| "historicphoto"
| "qa"
| "elevation"
| "other"
readonly attribution?: {
readonly url?: string
readonly text?: string
readonly html?: string
readonly required?: boolean
}
readonly min_zoom?: number
readonly max_zoom?: number
readonly best?: boolean
}

View file

@ -4,6 +4,7 @@ import * as globallayers from "../assets/global-raster-layers.json"
import { BBox } from "../Logic/BBox"
import { Store, Stores } from "../Logic/UIEventSource"
import { GeoOperations } from "../Logic/GeoOperations"
import { RasterLayerProperties } from "./RasterLayerProperties"
export class AvailableRasterLayers {
public static EditorLayerIndex: (Feature<Polygon, EditorLayerIndexProperties> &
@ -119,41 +120,6 @@ export class RasterLayerUtils {
export type RasterLayerPolygon = Feature<Polygon, RasterLayerProperties>
export interface RasterLayerProperties {
/**
* The name of the imagery source
*/
readonly name: string | Record<string, string>
readonly isOverlay?: boolean
readonly id: string
readonly url: string
readonly category?:
| string
| "photo"
| "map"
| "historicmap"
| "osmbasedmap"
| "historicphoto"
| "qa"
| "elevation"
| "other"
readonly attribution?: {
readonly url?: string
readonly text?: string
readonly html?: string
readonly required?: boolean
}
readonly min_zoom?: number
readonly max_zoom?: number
readonly best?: boolean
}
/**
* Information about a raster tile layer
*

View file

@ -1,6 +1,7 @@
import { LayerConfigJson } from "./LayerConfigJson"
import ExtraLinkConfigJson from "./ExtraLinkConfigJson"
import { RasterLayerProperties } from "../../RasterLayers"
import { RasterLayerProperties } from "../../RasterLayerProperties"
/**
* Defines the entire theme.

View file

@ -1,38 +0,0 @@
/**
* Configuration for a tilesource config
*/
export default interface TilesourceConfigJson {
/**
* Id of this overlay, used in the URL-parameters to set the state
*/
id: string
/**
* The path, where {x}, {y} and {z} will be substituted
*/
source: string
/**
* Wether or not this is an overlay. Default: true
*/
isOverlay?: boolean
/**
* How this will be shown in the selection menu.
* Make undefined if this may not be toggled
*/
name?: any | string
/**
* Only visible at this or a higher zoom level
*/
minZoom?: number
/**
* Only visible at this or a lower zoom level
*/
maxZoom?: number
/**
* The default state, set to false to hide by default
*/
defaultState: boolean
}

View file

@ -7,7 +7,8 @@ import { ExtractImages } from "./Conversion/FixImages"
import ExtraLinkConfig from "./ExtraLinkConfig"
import { Utils } from "../../Utils"
import LanguageUtils from "../../Utils/LanguageUtils"
import { RasterLayerProperties } from "../RasterLayers"
import { RasterLayerProperties } from "../RasterLayerProperties"
/**
* Minimal information about a theme