import L from "leaflet"; import { DEBUG } from "./main"; export default class Location extends L.ImageOverlay { public Name: string; constructor(Raw: { img: string; name: string; bounds: { min: { lat: number; lon: number; }; max: { lat: number; lon: number; }; }; }) { super( `map/${Raw.img}`, new L.LatLngBounds([ [Raw.bounds.min.lat, Raw.bounds.min.lon], [Raw.bounds.max.lat, Raw.bounds.max.lon] ]) ); this.Name = Raw.name; if (DEBUG) console.log(`new Location() with Name = ${this.Name}`); } }