UNPKG

maplibre-gl-js-amplify

Version:

MapLibre Plugin to Support Amplify Geo Integration

31 lines (30 loc) 1.13 kB
/// <reference types="mapbox__mapbox-gl-draw" /> import MapboxDraw from '@mapbox/mapbox-gl-draw'; import { Map } from 'maplibre-gl'; import { Feature, Geometry } from 'geojson'; export declare class AmplifyMapDraw { _map: Map; _ui: any; _mapBoxDraw: MapboxDraw; constructor(map: Map, ui: any); get(id: string): Feature<Geometry, { [name: string]: any; }>; add(data: Feature<Geometry, { [name: string]: any; }>): void; delete(id: string): void; disable(): void; enable(isCircle?: boolean): void; /** * Draws a polygonal geofence around the center of the current map view. The polygon defaults to 3/4 the size of the current map bounds * @param id the geofence geojson id */ drawPolygonGeofence(id: string): void; /** * Draws a cicular geofence around the center of the current map view * @param id the geofence geojson id * @param radius optional parameter for setting the radius of the cicular geofence, default to 1/8th of the current map bounds length */ drawCircularGeofence(id: string, radius?: number): void; }