@maplibre/maplibre-gl-directions
Version:
A plugin to show routing directions on a MapLibre GL JS map. Supports any [OSRM](http://project-osrm.org/) or [Mapbox Directions API](https://docs.mapbox.com/api/navigation/directions/) compatible Routing-provider.
28 lines (27 loc) • 948 B
TypeScript
import type { IControl } from "maplibre-gl";
import type { LoadingIndicatorControlConfiguration } from "./types";
import type MapLibreGlDirections from "../../directions/main";
/**
* Creates an instance of LoadingControl that could be added to the map using the
* {@link https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addcontrol|`addControl`} method.
*
* @example
* ```typescript
* import MapLibreGlDirections, { LoadingControl } from "@maplibre/maplibre-gl-directions";
* map.addControl(new LoadingControl(new MapLibreGlDirections(map)));
* ```
*/
export default class LoadingControl implements IControl {
constructor(directions: MapLibreGlDirections, configuration?: Partial<LoadingIndicatorControlConfiguration>);
private controlElement;
private readonly directions;
private readonly configuration;
/**
* @private
*/
onAdd(): HTMLElement;
/**
* @private
*/
onRemove(): void;
}