add addzone and update zone in map-adapter interface

This commit is contained in:
2025-09-29 14:55:14 -04:00
parent 67c94197e1
commit db3ec6cddd
7851 changed files with 833548 additions and 18 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
import { IMapAdapter, LatLng, MapOptions } from './map-adapter.interface';
import {DeliveryZone, IMapAdapter, LatLng, MapOptions} from './map-adapter.interface';
export declare class LeafletAdapter implements IMapAdapter {
private map;
init(container: HTMLElement, options: MapOptions): void;
@@ -8,4 +8,6 @@ export declare class LeafletAdapter implements IMapAdapter {
color?: string;
}): void;
destroy(): void;
addZone(zone: DeliveryZone[]): void;
updateZone(one: DeliveryZone[]): void;
}
+3 -1
View File
@@ -1,4 +1,4 @@
import { IMapAdapter, LatLng, MapOptions } from './map-adapter.interface';
import {DeliveryZone, IMapAdapter, LatLng, MapOptions} from './map-adapter.interface';
export declare class LibreAdapter implements IMapAdapter {
private map;
init(container: HTMLElement, options: MapOptions): void;
@@ -8,4 +8,6 @@ export declare class LibreAdapter implements IMapAdapter {
color?: string;
}): void;
destroy(): void;
addZone(zone: DeliveryZone[]): void;
updateZone(one: DeliveryZone[]): void;
}
+15
View File
@@ -1,9 +1,22 @@
import * as maplibregl from 'maplibre-gl';
import * as L from 'leaflet';
export interface MapOptions {
center: LatLng;
zoom: number;
styleUrl: string;
tileUrl: string;
}
export interface GeoPoint {
x: number;
y: number;
}
export interface DeliveryZone {
id: string;
name?: string;
color?: string;
polygon: GeoPoint[];
}
export type LatLng = [number, number];
export declare function getLngLat(latLng: LatLng): [number, number];
export interface IMapAdapter {
@@ -14,4 +27,6 @@ export interface IMapAdapter {
color?: string;
}): void;
destroy(): void;
addZone(zone: DeliveryZone[]): void;
updateZone(one: DeliveryZone[]): void;
}
+3 -1
View File
@@ -1,4 +1,4 @@
import { IMapAdapter, MapOptions, LatLng } from './map-adapter.interface';
import {IMapAdapter, MapOptions, LatLng, DeliveryZone} from './map-adapter.interface';
export declare class MapFacade implements IMapAdapter {
private readonly adapter;
private readonly leafletZoomOffset;
@@ -10,4 +10,6 @@ export declare class MapFacade implements IMapAdapter {
color?: string;
}): void;
destroy(): void;
addZone(zone: DeliveryZone[]): void;
updateZone(one: DeliveryZone[]): void;
}