forked from hgoebl/Leaflet.MultiOptionsPolyline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
32 lines (25 loc) · 1.11 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// <reference types="leaflet" />
declare namespace L {
export type PolylineOptionsFn = (optionIdx: number) => PolylineOptions;
export interface MultiOptions {
optionIdxFn: (latLng, prevLatLng, index, allLatlngs) => number;
// options for the index returned by optionIdxFn. If supplied with a function then it will be called with the index
options: PolylineOptions[] | PolylineOptionsFn;
// the context to call optionIdxFn (optional)
fnContext?: any;
copyBaseOptions?: boolean;
}
export interface MultiOptionsPolylineOptions extends MarkerOptions {
multiOptions: MultiOptions;
}
export interface MultiOptionsPolyline extends FeatureGroup {
initialize(latlng: LatLng[], options?: MultiOptionsPolylineOptions): void;
setLatLngs(latlngs: LatLng[]): MultiOptionsPolyline;
getLatLngs(): LatLng[];
getLatLngsSegments(): LatLng[];
}
export function multiOptionsPolyline(latlng: LatLng[], options?: MultiOptionsPolylineOptions): MultiOptionsPolyline;
}
declare module 'Leaflet.MultiOptionsPolyline' {
export = L;
}