initial commit

This commit is contained in:
2025-09-04 13:47:54 -04:00
commit 67c94197e1
13 changed files with 443 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import { IMapAdapter, LatLng, MapOptions } from './map-adapter.interface';
export declare class LeafletAdapter implements IMapAdapter {
private map;
init(container: HTMLElement, options: MapOptions): void;
setCenter(latLng: LatLng): void;
setZoom(zoom: number): void;
addMarker(latLng: LatLng, options?: {
color?: string;
}): void;
destroy(): void;
}
+11
View File
@@ -0,0 +1,11 @@
import { IMapAdapter, LatLng, MapOptions } from './map-adapter.interface';
export declare class LibreAdapter implements IMapAdapter {
private map;
init(container: HTMLElement, options: MapOptions): void;
setCenter(latLng: LatLng): void;
setZoom(zoom: number): void;
addMarker(latLng: LatLng, options?: {
color?: string;
}): void;
destroy(): void;
}
+17
View File
@@ -0,0 +1,17 @@
export interface MapOptions {
center: LatLng;
zoom: number;
styleUrl: string;
tileUrl: string;
}
export type LatLng = [number, number];
export declare function getLngLat(latLng: LatLng): [number, number];
export interface IMapAdapter {
init(container: HTMLElement, options: MapOptions): void;
setCenter(latLng: LatLng): void;
setZoom(zoom: number): void;
addMarker(latLng: LatLng, options?: {
color?: string;
}): void;
destroy(): void;
}
+13
View File
@@ -0,0 +1,13 @@
import { IMapAdapter, MapOptions, LatLng } from './map-adapter.interface';
export declare class MapFacade implements IMapAdapter {
private readonly adapter;
private readonly leafletZoomOffset;
constructor(forceRaster: boolean, webglAvailable: boolean);
init(container: HTMLElement, options: MapOptions): void;
setCenter(latLng: LatLng): void;
setZoom(zoom: number): void;
addMarker(latLng: LatLng, options?: {
color?: string;
}): void;
destroy(): void;
}
+21
View File
@@ -0,0 +1,21 @@
import { AfterViewInit, ElementRef } from '@angular/core';
import { MapOptions } from '../../adapters/map-adapter.interface';
import { MapFacade } from '../../adapters/map-facade';
import * as i0 from "@angular/core";
export interface OpenMapOptions extends MapOptions {
forceRaster: boolean;
}
export declare class OpenMapComponent implements AfterViewInit {
private readonly platformId;
private readonly injector;
webglSupported?: boolean;
map?: MapFacade;
mapContainer: ElementRef<HTMLDivElement>;
options: import("@angular/core").InputSignal<OpenMapOptions>;
mapReady: import("@angular/core").OutputEmitterRef<MapFacade>;
ngAfterViewInit(): void;
webglDetection(supported: boolean): void;
private initializeMap;
static ɵfac: i0.ɵɵFactoryDeclaration<OpenMapComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<OpenMapComponent, "open-map", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "mapReady": "mapReady"; }, never, never, true, never>;
}
+10
View File
@@ -0,0 +1,10 @@
import { OnInit } from '@angular/core';
import * as i0 from "@angular/core";
export declare class WebglDetectionDirective implements OnInit {
private readonly platformId;
webglSupport: import("@angular/core").OutputEmitterRef<boolean>;
ngOnInit(): void;
private checkWebGLSupport;
static ɵfac: i0.ɵɵFactoryDeclaration<WebglDetectionDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<WebglDetectionDirective, "[webglDetection]", never, {}, { "webglSupport": "webglSupport"; }, never, never, true, never>;
}