Updated for leaflet-polylinedecorator 1.6 (#37552)

This commit is contained in:
BePo65
2019-08-14 12:49:02 -07:00
committed by Pranav Senthilnathan
parent 9a703a8d7c
commit 2425015e3e
+18 -1
View File
@@ -1,7 +1,8 @@
// Type definitions for leaflet-polylinedecorator 1.1
// Type definitions for leaflet-polylinedecorator 1.6
// Project: https://github.com/bbecquet/Leaflet.PolylineDecorator#readme
// Definitions by: Viktor Soucek <https://github.com/soucekv>
// Michael Faisst <https://github.com/michaelfaisst>
// BePo65 <https://github.com/BePo65>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -16,6 +17,8 @@ declare module 'leaflet' {
class Dash {
constructor(options?: DashOptions);
initialize(options?: DashOptions): void;
buildSymbol(dirPoint: Point, latLngs: LatLng[], map: Map, index: number, total: number): Polyline;
}
function dash(options?: DashOptions): Dash;
@@ -29,6 +32,8 @@ declare module 'leaflet' {
class ArrowHead {
constructor(options?: ArrowHeadOptions);
initialize(options?: ArrowHeadOptions): void;
buildSymbol(dirPoint: Point, latLngs: LatLng[], map: Map, index: number, total: number): Polygon | Polyline;
}
function arrowHead(options?: ArrowHeadOptions): ArrowHead;
@@ -40,11 +45,16 @@ declare module 'leaflet' {
class Marker {
constructor(options?: MarkerOptions);
initialize(options?: MarkerOptions): void;
buildSymbol(dirPoint: Point, latLngs: LatLng[], map: Map, index: number, total: number): Marker;
}
function marker(options?: MarkerOptions): Marker;
}
function isCoord(c: any): boolean;
function isCoordArray(c: any): boolean;
interface Pattern {
offset?: number | string;
endOffset?: number | string;
@@ -58,6 +68,13 @@ declare module 'leaflet' {
class PolylineDecorator extends FeatureGroup {
constructor(paths: Polyline | Polygon | LatLngExpression[] | Polyline[] | Polygon[] | LatLngExpression[][], options?: PolylineDecoratorOptions);
initialize(paths: Polyline | Polygon | LatLngExpression[] | Polyline[] | Polygon[] | LatLngExpression[][], options?: PolylineDecoratorOptions): void;
setPatterns(patterns: Pattern[]): void;
setPaths(paths: Polyline | Polygon | LatLngExpression[] | Polyline[] | Polygon[] | LatLngExpression[][]): void;
onAdd(map: Map): this;
onRemove(map: Map): this;
getBounds(): LatLngBounds;
redraw(): void;
}
function polylineDecorator(paths: Polyline | Polyline[], options?: PolylineDecoratorOptions): PolylineDecorator;