Remove leaflet import, remove unused import

This commit is contained in:
Pieter Vander Vennet 2023-02-02 14:09:28 +01:00
parent 04753f39c4
commit d8d9487784
2 changed files with 5 additions and 4 deletions

View file

@ -1,9 +1,7 @@
import { TileLayer } from "leaflet"
export default interface BaseLayer { export default interface BaseLayer {
id: string id: string
name: string name: string
layer: () => TileLayer layer: () => any /*leaflet.TileLayer - not importing as it breaks scripts*/
max_zoom: number max_zoom: number
min_zoom: number min_zoom: number
feature: any feature: any

View file

@ -12,7 +12,6 @@ import { FixedUiElement } from "../../UI/Base/FixedUiElement"
import Img from "../../UI/Base/Img" import Img from "../../UI/Base/Img"
import Combine from "../../UI/Base/Combine" import Combine from "../../UI/Base/Combine"
import { VariableUiElement } from "../../UI/Base/VariableUIElement" import { VariableUiElement } from "../../UI/Base/VariableUIElement"
import { TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
export default class PointRenderingConfig extends WithContextLoader { export default class PointRenderingConfig extends WithContextLoader {
private static readonly allowed_location_codes = new Set<string>([ private static readonly allowed_location_codes = new Set<string>([
@ -37,6 +36,10 @@ export default class PointRenderingConfig extends WithContextLoader {
constructor(json: PointRenderingConfigJson, context: string) { constructor(json: PointRenderingConfigJson, context: string) {
super(json, context) super(json, context)
if (json === undefined || json === null) {
throw "Invalid PointRenderingConfig: undefined or null"
}
if (typeof json.location === "string") { if (typeof json.location === "string") {
json.location = [json.location] json.location = [json.location]
} }