@stadiamaps/ferrostar-webcomponents
Version:
Ferrostar is a modern SDK for building turn-by-turn navigation applications.
65 lines • 2.27 kB
TypeScript
import { LitElement, PropertyValues } from 'lit';
import { default as maplibregl, GeolocateControl, Map } from 'maplibre-gl';
import { JsNavState, NavigationController, RouteAdapter, TripState } from '@stadiamaps/ferrostar';
/**
* A MapLibre-based map component specialized for navigation.
*/
export declare class FerrostarMap extends LitElement {
valhallaEndpointUrl: string;
profile: string;
httpClient?: Function;
locationProvider: any;
options: object;
protected _navState: JsNavState | null;
onNavigationStart?: (map: Map) => void;
onNavigationStop?: (map: Map) => void;
onTripStateChange?: (newState: TripState | null) => void;
/**
* Styles to load which will apply inside the component
*/
customStyles?: object | null;
/**
* Enables voice guidance via the web speech synthesis API.
* Defaults to false.
*/
useVoiceGuidance: boolean;
/**
* Automatically geolocates the user on map load.
*
* Defaults to true.
* Has no effect if `addGeolocateControl` is false.
*/
geolocateOnLoad: boolean;
/**
* Optionally adds a geolocate control to the map.
*
* Defaults to true.
* Set this to false if you want to disable the geolocation control or bring your own.
*/
addGeolocateControl: boolean;
routeAdapter: RouteAdapter | null;
/**
* The MapLibre map instance.
*
* You have to explicitly set this value when initializing
* the web component to provide your own map instance.
*
*/
map: maplibregl.Map;
geolocateControl: GeolocateControl | null;
navigationController: NavigationController | null;
simulatedLocationMarker: maplibregl.Marker | null;
lastSpokenUtteranceId: string | null;
static styles: import('lit').CSSResult[];
constructor();
updated(changedProperties: PropertyValues<this>): void;
firstUpdated(): void;
getRoutes(initialLocation: any, waypoints: any): Promise<any>;
startNavigation(route: any, config: any): void;
stopNavigation(): Promise<void>;
private navStateUpdate;
private onLocationUpdated;
private clearMap;
render(): import('lit-html').TemplateResult<1>;
}
//# sourceMappingURL=ferrostar-map.d.ts.map