forked from MapComplete/MapComplete
Remove leaflet import, remove unused import
This commit is contained in:
parent
04753f39c4
commit
d8d9487784
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
|
@ -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]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue