import type { layer, MapInterface } from "./map.d"; import { MapLeaflet } from "./map.leaflet"; interface MapClassInterface extends MapInterface { layers: Map; view: any; } export const mapServerBaseUrl = localStorage.getItem("gisurl") || "http://210.72.227.199:18084/"; export class MapClass implements MapClassInterface { layers: Map; view: any; private static instance: MapClass; private service: MapInterface; static getInstance(): MapClass { if (!this.instance) { this.instance = new MapClass(); } return this.instance; } constructor() { this.layers = new Map(); this.view = null; this.service = new MapLeaflet(); } }