1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export as namespace L;
|
15 |
|
16 | import * as geojson from 'geojson';
|
17 |
|
18 |
|
19 | export const version: string;
|
20 |
|
21 | export class Class {
|
22 | static extend(props: any): {new(...args: any[]): any} & typeof Class;
|
23 | static include(props: any): any & typeof Class;
|
24 | static mergeOptions(props: any): any & typeof Class;
|
25 |
|
26 | static addInitHook(initHookFn: () => void): any & typeof Class;
|
27 | static addInitHook(methodName: string, ...args: any[]): any & typeof Class;
|
28 |
|
29 | static callInitHooks(): void;
|
30 | }
|
31 |
|
32 | export class Transformation {
|
33 | constructor(a: number, b: number, c: number, d: number);
|
34 | transform(point: Point, scale?: number): Point;
|
35 | untransform(point: Point, scale?: number): Point;
|
36 | }
|
37 |
|
38 | /** Instantiates a Transformation object with the given coefficients. */
|
39 | export function transformation(a: number, b: number, c: number, d: number): Transformation;
|
40 |
|
41 | /** Expects an coefficients array of the form `[a: Number, b: Number, c: Number, d: Number]`. */
|
42 | export function transformation(coefficients: [number, number, number, number]): Transformation;
|
43 |
|
44 | /**
|
45 | * @see https://github.com/Leaflet/Leaflet/blob/bc918d4bdc2ba189807bc207c77080fb41ecc196/src/geometry/LineUtil.js#L118
|
46 | */
|
47 | export namespace LineUtil {
|
48 | function simplify(points: Point[], tolerance: number): Point[];
|
49 | function pointToSegmentDistance(p: Point, p1: Point, p2: Point): number;
|
50 | function closestPointOnSegment(p: Point, p1: Point, p2: Point): Point;
|
51 | function isFlat(latlngs: LatLngExpression[]): boolean;
|
52 | function clipSegment(
|
53 | a: Point,
|
54 | b: Point,
|
55 | bounds: Bounds,
|
56 | useLastCode?: boolean,
|
57 | round?: boolean,
|
58 | ): [Point, Point] | false;
|
59 | function polylineCenter(latlngs: LatLngExpression[], crs: CRS): LatLng;
|
60 | }
|
61 |
|
62 | export namespace PolyUtil {
|
63 | function clipPolygon(points: Point[], bounds: BoundsExpression, round?: boolean): Point[];
|
64 | function polygonCenter(latlngs: LatLngExpression[], crs: CRS): LatLng;
|
65 | }
|
66 |
|
67 | export namespace DomUtil {
|
68 | |
69 |
|
70 |
|
71 | function get(element: string | HTMLElement): HTMLElement | null;
|
72 | function getStyle(el: HTMLElement, styleAttrib: string): string | null;
|
73 | |
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 | function create<T extends keyof HTMLElementTagNameMap>(tagName: T, className?: string, container?: HTMLElement): HTMLElementTagNameMap[T];
|
80 | function create(tagName: string, className?: string, container?: HTMLElement): HTMLElement;
|
81 | function remove(el: HTMLElement): void;
|
82 | function empty(el: HTMLElement): void;
|
83 | function toFront(el: HTMLElement): void;
|
84 | function toBack(el: HTMLElement): void;
|
85 | function hasClass(el: HTMLElement, name: string): boolean;
|
86 | function addClass(el: HTMLElement, name: string): void;
|
87 | function removeClass(el: HTMLElement, name: string): void;
|
88 | function setClass(el: HTMLElement, name: string): void;
|
89 | function getClass(el: HTMLElement): string;
|
90 | function setOpacity(el: HTMLElement, opacity: number): void;
|
91 | function testProp(props: string[]): string | false;
|
92 | function setTransform(el: HTMLElement, offset: Point, scale?: number): void;
|
93 | function setPosition(el: HTMLElement, position: Point): void;
|
94 | function getPosition(el: HTMLElement): Point;
|
95 | function getScale(el: HTMLElement): { x: number, y: number, boundingClientRect: DOMRect};
|
96 | function getSizedParentNode(el: HTMLElement): HTMLElement;
|
97 | function disableTextSelection(): void;
|
98 | function enableTextSelection(): void;
|
99 | function disableImageDrag(): void;
|
100 | function enableImageDrag(): void;
|
101 | function preventOutline(el: HTMLElement): void;
|
102 | function restoreOutline(): void;
|
103 |
|
104 | let TRANSFORM: string;
|
105 | let TRANSITION: string;
|
106 | let TRANSITION_END: string;
|
107 | }
|
108 |
|
109 | export class PosAnimation extends Evented {
|
110 | run(el: HTMLElement, newPos: Point, duration?: number, easeLinearity?: number): void;
|
111 | stop(): void;
|
112 | }
|
113 |
|
114 | export interface CRS {
|
115 | latLngToPoint(latlng: LatLngExpression, zoom: number): Point;
|
116 | pointToLatLng(point: PointExpression, zoom: number): LatLng;
|
117 | project(latlng: LatLng | LatLngLiteral): Point;
|
118 | unproject(point: PointExpression): LatLng;
|
119 | scale(zoom: number): number;
|
120 | zoom(scale: number): number;
|
121 | getProjectedBounds(zoom: number): Bounds;
|
122 | distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number;
|
123 | wrapLatLng(latlng: LatLng | LatLngLiteral): LatLng;
|
124 |
|
125 | code?: string | undefined;
|
126 | wrapLng?: [number, number] | undefined;
|
127 | wrapLat?: [number, number] | undefined;
|
128 | infinite: boolean;
|
129 | }
|
130 |
|
131 | export namespace CRS {
|
132 | const EPSG3395: CRS;
|
133 | const EPSG3857: CRS;
|
134 | const EPSG4326: CRS;
|
135 | const EPSG900913: CRS;
|
136 | const Earth: CRS;
|
137 | const Simple: CRS;
|
138 | }
|
139 |
|
140 | export interface Projection {
|
141 | project(latlng: LatLng | LatLngLiteral): Point;
|
142 | unproject(point: PointExpression): LatLng;
|
143 |
|
144 | bounds: Bounds;
|
145 | }
|
146 |
|
147 | export namespace Projection {
|
148 | const LonLat: Projection;
|
149 | const Mercator: Projection;
|
150 | const SphericalMercator: Projection;
|
151 | }
|
152 |
|
153 | export class LatLng {
|
154 | constructor(latitude: number, longitude: number, altitude?: number);
|
155 | equals(otherLatLng: LatLngExpression, maxMargin?: number): boolean;
|
156 | toString(): string;
|
157 | distanceTo(otherLatLng: LatLngExpression): number;
|
158 | wrap(): LatLng;
|
159 | toBounds(sizeInMeters: number): LatLngBounds;
|
160 | clone(): LatLng;
|
161 |
|
162 | lat: number;
|
163 | lng: number;
|
164 | alt?: number | undefined;
|
165 | }
|
166 |
|
167 | export interface LatLngLiteral {
|
168 | lat: number;
|
169 | lng: number;
|
170 | }
|
171 |
|
172 | export type LatLngTuple = [number, number];
|
173 |
|
174 | export type LatLngExpression = LatLng | LatLngLiteral | LatLngTuple;
|
175 |
|
176 | export function latLng(latitude: number, longitude: number, altitude?: number): LatLng;
|
177 |
|
178 | export function latLng(coords: LatLngTuple | [number, number, number] | LatLngLiteral | {lat: number, lng: number, alt?: number | undefined}): LatLng;
|
179 |
|
180 | export class LatLngBounds {
|
181 | constructor(southWest: LatLngExpression, northEast: LatLngExpression);
|
182 | constructor(latlngs: LatLngBoundsLiteral);
|
183 | extend(latlngOrBounds: LatLngExpression | LatLngBoundsExpression): this;
|
184 | pad(bufferRatio: number): LatLngBounds; // Returns a new LatLngBounds
|
185 | getCenter(): LatLng;
|
186 | getSouthWest(): LatLng;
|
187 | getNorthEast(): LatLng;
|
188 | getNorthWest(): LatLng;
|
189 | getSouthEast(): LatLng;
|
190 | getWest(): number;
|
191 | getSouth(): number;
|
192 | getEast(): number;
|
193 | getNorth(): number;
|
194 | contains(otherBoundsOrLatLng: LatLngBoundsExpression | LatLngExpression): boolean;
|
195 | intersects(otherBounds: LatLngBoundsExpression): boolean;
|
196 | overlaps(otherBounds: LatLngBoundsExpression): boolean;
|
197 | toBBoxString(): string;
|
198 | equals(otherBounds: LatLngBoundsExpression): boolean;
|
199 | isValid(): boolean;
|
200 | }
|
201 |
|
202 | export type LatLngBoundsLiteral = LatLngTuple[]; // Must be [LatLngTuple, LatLngTuple], cant't change because Map.setMaxBounds
|
203 |
|
204 | export type LatLngBoundsExpression = LatLngBounds | LatLngBoundsLiteral;
|
205 |
|
206 | export function latLngBounds(southWest: LatLngExpression, northEast: LatLngExpression): LatLngBounds;
|
207 |
|
208 | export function latLngBounds(latlngs: LatLngExpression[]): LatLngBounds;
|
209 |
|
210 | export type PointTuple = [number, number];
|
211 |
|
212 | export class Point {
|
213 | constructor(x: number, y: number, round?: boolean);
|
214 | clone(): Point;
|
215 | add(otherPoint: PointExpression): Point; // non-destructive, returns a new point
|
216 | subtract(otherPoint: PointExpression): Point;
|
217 | divideBy(num: number): Point;
|
218 | multiplyBy(num: number): Point;
|
219 | scaleBy(scale: PointExpression): Point;
|
220 | unscaleBy(scale: PointExpression): Point;
|
221 | round(): Point;
|
222 | floor(): Point;
|
223 | ceil(): Point;
|
224 | trunc(): Point;
|
225 | distanceTo(otherPoint: PointExpression): number;
|
226 | equals(otherPoint: PointExpression): boolean;
|
227 | contains(otherPoint: PointExpression): boolean;
|
228 | toString(): string;
|
229 | x: number;
|
230 | y: number;
|
231 | }
|
232 |
|
233 | export interface Coords extends Point {
|
234 | z: number;
|
235 | }
|
236 |
|
237 | export type PointExpression = Point | PointTuple;
|
238 |
|
239 | export function point(x: number, y: number, round?: boolean): Point;
|
240 |
|
241 | export function point(coords: PointTuple | {x: number, y: number}): Point;
|
242 |
|
243 | export type BoundsLiteral = [PointTuple, PointTuple];
|
244 |
|
245 | export class Bounds {
|
246 | constructor(topLeft: PointExpression, bottomRight: PointExpression);
|
247 | constructor(points?: Point[] | BoundsLiteral);
|
248 |
|
249 | // tslint:disable:unified-signatures
|
250 | extend(point: PointExpression): this;
|
251 | extend(otherBounds: BoundsExpression): this;
|
252 | // tslint:enable:unified-signatures
|
253 |
|
254 | getCenter(round?: boolean): Point;
|
255 | getBottomLeft(): Point;
|
256 | getBottomRight(): Point;
|
257 | getTopLeft(): Point;
|
258 | getTopRight(): Point;
|
259 | getSize(): Point;
|
260 | contains(pointOrBounds: BoundsExpression | PointExpression): boolean;
|
261 | intersects(otherBounds: BoundsExpression): boolean;
|
262 | overlaps(otherBounds: BoundsExpression): boolean;
|
263 | isValid(): boolean;
|
264 | pad(bufferRatio: number): Bounds; // Returns a new Bounds
|
265 | equals(otherBounds: BoundsExpression): boolean;
|
266 |
|
267 | min?: Point | undefined;
|
268 | max?: Point | undefined;
|
269 | }
|
270 |
|
271 | export type BoundsExpression = Bounds | BoundsLiteral;
|
272 |
|
273 | export function bounds(topLeft: PointExpression, bottomRight: PointExpression): Bounds;
|
274 |
|
275 | export function bounds(points: Point[] | BoundsLiteral): Bounds;
|
276 |
|
277 | // Event handler types
|
278 |
|
279 | export type LeafletEventHandlerFn = (event: LeafletEvent) => void;
|
280 |
|
281 | export type LayersControlEventHandlerFn = (event: LayersControlEvent) => void;
|
282 |
|
283 | export type LayerEventHandlerFn = (event: LayerEvent) => void;
|
284 |
|
285 | export type ResizeEventHandlerFn = (event: ResizeEvent) => void;
|
286 |
|
287 | export type PopupEventHandlerFn = (event: PopupEvent) => void;
|
288 |
|
289 | export type TooltipEventHandlerFn = (event: TooltipEvent) => void;
|
290 |
|
291 | export type ErrorEventHandlerFn = (event: ErrorEvent) => void;
|
292 |
|
293 | export type LocationEventHandlerFn = (event: LocationEvent) => void;
|
294 |
|
295 | export type LeafletMouseEventHandlerFn = (event: LeafletMouseEvent) => void;
|
296 |
|
297 | export type LeafletKeyboardEventHandlerFn = (event: LeafletKeyboardEvent) => void;
|
298 |
|
299 | export type ZoomAnimEventHandlerFn = (event: ZoomAnimEvent) => void;
|
300 |
|
301 | export type DragEndEventHandlerFn = (event: DragEndEvent) => void;
|
302 |
|
303 | export type TileEventHandlerFn = (event: TileEvent) => void;
|
304 |
|
305 | export type TileErrorEventHandlerFn = (event: TileErrorEvent) => void;
|
306 |
|
307 | export interface LeafletEventHandlerFnMap {
|
308 | baselayerchange?: LayersControlEventHandlerFn | undefined;
|
309 | overlayadd?: LayersControlEventHandlerFn | undefined;
|
310 | overlayremove?: LayersControlEventHandlerFn | undefined;
|
311 |
|
312 | layeradd?: LayerEventHandlerFn | undefined;
|
313 | layerremove?: LayerEventHandlerFn | undefined;
|
314 |
|
315 | zoomlevelschange?: LeafletEventHandlerFn | undefined;
|
316 | unload?: LeafletEventHandlerFn | undefined;
|
317 | viewreset?: LeafletEventHandlerFn | undefined;
|
318 | load?: LeafletEventHandlerFn | undefined;
|
319 | zoomstart?: LeafletEventHandlerFn | undefined;
|
320 | movestart?: LeafletEventHandlerFn | undefined;
|
321 | zoom?: LeafletEventHandlerFn | undefined;
|
322 | move?: LeafletEventHandlerFn | undefined;
|
323 | zoomend?: LeafletEventHandlerFn | undefined;
|
324 | moveend?: LeafletEventHandlerFn | undefined;
|
325 | autopanstart?: LeafletEventHandlerFn | undefined;
|
326 | dragstart?: LeafletEventHandlerFn | undefined;
|
327 | drag?: LeafletEventHandlerFn | undefined;
|
328 | add?: LeafletEventHandlerFn | undefined;
|
329 | remove?: LeafletEventHandlerFn | undefined;
|
330 | loading?: LeafletEventHandlerFn | undefined;
|
331 | error?: LeafletEventHandlerFn | undefined;
|
332 | update?: LeafletEventHandlerFn | undefined;
|
333 | down?: LeafletEventHandlerFn | undefined;
|
334 | predrag?: LeafletEventHandlerFn | undefined;
|
335 |
|
336 | resize?: ResizeEventHandlerFn | undefined;
|
337 |
|
338 | popupopen?: PopupEventHandlerFn | undefined;
|
339 | popupclose?: PopupEventHandlerFn | undefined;
|
340 |
|
341 | tooltipopen?: TooltipEventHandlerFn | undefined;
|
342 | tooltipclose?: TooltipEventHandlerFn | undefined;
|
343 |
|
344 | locationerror?: ErrorEventHandlerFn | undefined;
|
345 |
|
346 | locationfound?: LocationEventHandlerFn | undefined;
|
347 |
|
348 | click?: LeafletMouseEventHandlerFn | undefined;
|
349 | dblclick?: LeafletMouseEventHandlerFn | undefined;
|
350 | mousedown?: LeafletMouseEventHandlerFn | undefined;
|
351 | mouseup?: LeafletMouseEventHandlerFn | undefined;
|
352 | mouseover?: LeafletMouseEventHandlerFn | undefined;
|
353 | mouseout?: LeafletMouseEventHandlerFn | undefined;
|
354 | mousemove?: LeafletMouseEventHandlerFn | undefined;
|
355 | contextmenu?: LeafletMouseEventHandlerFn | undefined;
|
356 | preclick?: LeafletMouseEventHandlerFn | undefined;
|
357 |
|
358 | keypress?: LeafletKeyboardEventHandlerFn | undefined;
|
359 | keydown?: LeafletKeyboardEventHandlerFn | undefined;
|
360 | keyup?: LeafletKeyboardEventHandlerFn | undefined;
|
361 |
|
362 | zoomanim?: ZoomAnimEventHandlerFn | undefined;
|
363 |
|
364 | dragend?: DragEndEventHandlerFn | undefined;
|
365 |
|
366 | tileunload?: TileEventHandlerFn | undefined;
|
367 | tileloadstart?: TileEventHandlerFn | undefined;
|
368 | tileload?: TileEventHandlerFn | undefined;
|
369 | tileabort?: TileEventHandlerFn | undefined;
|
370 |
|
371 | tileerror?: TileErrorEventHandlerFn | undefined;
|
372 |
|
373 | // [name: string]: any;
|
374 | // You are able add additional properties, but it makes this interface uncheckable.
|
375 | }
|
376 |
|
377 | /**
|
378 | * A set of methods shared between event-powered classes (like Map and Marker).
|
379 | * Generally, events allow you to execute some function when something happens
|
380 | * with an object (e.g. the user clicks on the map, causing the map to fire
|
381 | * 'click' event).
|
382 | */
|
383 | // tslint:disable:strict-export-declare-modifiers
|
384 | declare class Events {
|
385 | |
386 |
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 | on(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
393 | fn: LayersControlEventHandlerFn, context?: any): this;
|
394 | on(type: 'layeradd' | 'layerremove',
|
395 | fn: LayerEventHandlerFn, context?: any): this;
|
396 | on(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
397 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
398 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
399 | 'down' | 'predrag',
|
400 | fn: LeafletEventHandlerFn, context?: any): this;
|
401 | on(type: 'resize',
|
402 | fn: ResizeEventHandlerFn, context?: any): this;
|
403 | on(type: 'popupopen' | 'popupclose',
|
404 | fn: PopupEventHandlerFn, context?: any): this;
|
405 | on(type: 'tooltipopen' | 'tooltipclose',
|
406 | fn: TooltipEventHandlerFn, context?: any): this;
|
407 | on(type: 'locationerror',
|
408 | fn: ErrorEventHandlerFn, context?: any): this;
|
409 | on(type: 'locationfound',
|
410 | fn: LocationEventHandlerFn, context?: any): this;
|
411 | on(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
412 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
413 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
414 | on(type: 'keypress' | 'keydown' | 'keyup',
|
415 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
416 | on(type: 'zoomanim',
|
417 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
418 | on(type: 'dragend',
|
419 | fn: DragEndEventHandlerFn, context?: any): this;
|
420 | on(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
421 | fn: TileEventHandlerFn, context?: any): this;
|
422 | on(type: 'tileerror',
|
423 | fn: TileErrorEventHandlerFn, context?: any): this;
|
424 | on(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
425 |
|
426 | |
427 |
|
428 |
|
429 | on(eventMap: LeafletEventHandlerFnMap): this;
|
430 |
|
431 |
|
432 | |
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 | off(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
440 | fn?: LayersControlEventHandlerFn, context?: any): this;
|
441 | off(type: 'layeradd' | 'layerremove',
|
442 | fn?: LayerEventHandlerFn, context?: any): this;
|
443 | off(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
444 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
445 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
446 | 'down' | 'predrag',
|
447 | fn?: LeafletEventHandlerFn, context?: any): this;
|
448 | off(type: 'resize',
|
449 | fn?: ResizeEventHandlerFn, context?: any): this;
|
450 | off(type: 'popupopen' | 'popupclose',
|
451 | fn?: PopupEventHandlerFn, context?: any): this;
|
452 | off(type: 'tooltipopen' | 'tooltipclose',
|
453 | fn?: TooltipEventHandlerFn, context?: any): this;
|
454 | off(type: 'locationerror',
|
455 | fn?: ErrorEventHandlerFn, context?: any): this;
|
456 | off(type: 'locationfound',
|
457 | fn?: LocationEventHandlerFn, context?: any): this;
|
458 | off(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
459 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
460 | fn?: LeafletMouseEventHandlerFn, context?: any): this;
|
461 | off(type: 'keypress' | 'keydown' | 'keyup',
|
462 | fn?: LeafletKeyboardEventHandlerFn, context?: any): this;
|
463 | off(type: 'zoomanim',
|
464 | fn?: ZoomAnimEventHandlerFn, context?: any): this;
|
465 | off(type: 'dragend',
|
466 | fn?: DragEndEventHandlerFn, context?: any): this;
|
467 | off(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
468 | fn?: TileEventHandlerFn, context?: any): this;
|
469 | off(type: 'tileerror',
|
470 | fn?: TileErrorEventHandlerFn, context?: any): this;
|
471 | off(type: string, fn?: LeafletEventHandlerFn, context?: any): this;
|
472 |
|
473 | |
474 |
|
475 |
|
476 |
|
477 | off(eventMap: LeafletEventHandlerFnMap): this;
|
478 |
|
479 | |
480 |
|
481 |
|
482 | off(): this;
|
483 |
|
484 |
|
485 | |
486 |
|
487 |
|
488 |
|
489 |
|
490 | fire(type: string, data?: any, propagate?: boolean): this;
|
491 |
|
492 | |
493 |
|
494 |
|
495 |
|
496 | listens(type: 'baselayerchange' | 'overlayadd' | 'overlayremove' | 'layeradd' | 'layerremove' | 'zoomlevelschange' |
|
497 | 'unload' | 'viewreset' | 'load' | 'zoomstart' | 'movestart' | 'zoom' | 'move' | 'zoomend' |
|
498 | 'moveend' | 'autopanstart' | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' |
|
499 | 'update' | 'down' | 'predrag' | 'resize' | 'popupopen' | 'tooltipopen' | 'tooltipclose' |
|
500 | 'locationerror' | 'locationfound' | 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
501 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick' | 'keypress' | 'keydown' | 'keyup' |
|
502 | 'zoomanim' | 'dragend' | 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort' | 'tileerror', propagate?: boolean): boolean;
|
503 |
|
504 | listens(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
505 | fn: LayersControlEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
506 | listens(type: 'layeradd' | 'layerremove',
|
507 | fn: LayerEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
508 | listens(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
509 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
510 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
511 | 'down' | 'predrag',
|
512 | fn: LeafletEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
513 | listens(type: 'resize',
|
514 | fn: ResizeEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
515 | listens(type: 'popupopen' | 'popupclose',
|
516 | fn: PopupEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
517 | listens(type: 'tooltipopen' | 'tooltipclose',
|
518 | fn: TooltipEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
519 | listens(type: 'locationerror',
|
520 | fn: ErrorEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
521 | listens(type: 'locationfound',
|
522 | fn: LocationEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
523 | listens(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
524 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
525 | fn: LeafletMouseEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
526 | listens(type: 'keypress' | 'keydown' | 'keyup',
|
527 | fn: LeafletKeyboardEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
528 | listens(type: 'zoomanim',
|
529 | fn: ZoomAnimEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
530 | listens(type: 'dragend',
|
531 | fn: DragEndEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
532 | listens(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
533 | fn: TileEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
534 | listens(type: 'tileerror',
|
535 | fn: TileEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
536 | listens(type: string, fn: LeafletEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
537 |
|
538 | |
539 |
|
540 |
|
541 |
|
542 | once(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
543 | fn: LayersControlEventHandlerFn, context?: any): this;
|
544 | once(type: 'layeradd' | 'layerremove',
|
545 | fn: LayerEventHandlerFn, context?: any): this;
|
546 | once(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
547 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
548 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
549 | 'down' | 'predrag',
|
550 | fn: LeafletEventHandlerFn, context?: any): this;
|
551 | once(type: 'resize',
|
552 | fn: ResizeEventHandlerFn, context?: any): this;
|
553 | once(type: 'popupopen' | 'popupclose',
|
554 | fn: PopupEventHandlerFn, context?: any): this;
|
555 | once(type: 'tooltipopen' | 'tooltipclose',
|
556 | fn: TooltipEventHandlerFn, context?: any): this;
|
557 | once(type: 'locationerror',
|
558 | fn: ErrorEventHandlerFn, context?: any): this;
|
559 | once(type: 'locationfound',
|
560 | fn: LocationEventHandlerFn, context?: any): this;
|
561 | once(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
562 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
563 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
564 | once(type: 'keypress' | 'keydown' | 'keyup',
|
565 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
566 | once(type: 'zoomanim',
|
567 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
568 | once(type: 'dragend',
|
569 | fn: DragEndEventHandlerFn, context?: any): this;
|
570 | once(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
571 | fn: TileEventHandlerFn, context?: any): this;
|
572 | once(type: 'tileerror',
|
573 | fn: TileEventHandlerFn, context?: any): this;
|
574 | once(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
575 |
|
576 | |
577 |
|
578 |
|
579 | once(eventMap: LeafletEventHandlerFnMap): this;
|
580 |
|
581 |
|
582 | |
583 |
|
584 |
|
585 | addEventParent(obj: Evented): this;
|
586 |
|
587 | |
588 |
|
589 |
|
590 | removeEventParent(obj: Evented): this;
|
591 |
|
592 | |
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 | addEventListener(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
602 | fn: LayersControlEventHandlerFn, context?: any): this;
|
603 | addEventListener(type: 'layeradd' | 'layerremove',
|
604 | fn: LayerEventHandlerFn, context?: any): this;
|
605 | addEventListener(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
606 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
607 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
608 | 'down' | 'predrag',
|
609 | fn: LeafletEventHandlerFn, context?: any): this;
|
610 | addEventListener(type: 'resize',
|
611 | fn: ResizeEventHandlerFn, context?: any): this;
|
612 | addEventListener(type: 'popupopen' | 'popupclose',
|
613 | fn: PopupEventHandlerFn, context?: any): this;
|
614 | addEventListener(type: 'tooltipopen' | 'tooltipclose',
|
615 | fn: TooltipEventHandlerFn, context?: any): this;
|
616 | addEventListener(type: 'locationerror',
|
617 | fn: ErrorEventHandlerFn, context?: any): this;
|
618 | addEventListener(type: 'locationfound',
|
619 | fn: LocationEventHandlerFn, context?: any): this;
|
620 | addEventListener(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
621 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
622 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
623 | addEventListener(type: 'keypress' | 'keydown' | 'keyup',
|
624 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
625 | addEventListener(type: 'zoomanim',
|
626 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
627 | addEventListener(type: 'dragend',
|
628 | fn: DragEndEventHandlerFn, context?: any): this;
|
629 | addEventListener(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
630 | fn: TileEventHandlerFn, context?: any): this;
|
631 | addEventListener(type: 'tileerror',
|
632 | fn: TileErrorEventHandlerFn, context?: any): this;
|
633 | addEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
634 |
|
635 | |
636 |
|
637 |
|
638 |
|
639 |
|
640 | addEventListener(eventMap: LeafletEventHandlerFnMap): this;
|
641 |
|
642 |
|
643 | |
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 | removeEventListener(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
653 | fn?: LayersControlEventHandlerFn, context?: any): this;
|
654 | removeEventListener(type: 'layeradd' | 'layerremove',
|
655 | fn?: LayerEventHandlerFn, context?: any): this;
|
656 | removeEventListener(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
657 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
658 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
659 | 'down' | 'predrag',
|
660 | fn?: LeafletEventHandlerFn, context?: any): this;
|
661 | removeEventListener(type: 'resize',
|
662 | fn?: ResizeEventHandlerFn, context?: any): this;
|
663 | removeEventListener(type: 'popupopen' | 'popupclose',
|
664 | fn?: PopupEventHandlerFn, context?: any): this;
|
665 | removeEventListener(type: 'tooltipopen' | 'tooltipclose',
|
666 | fn?: TooltipEventHandlerFn, context?: any): this;
|
667 | removeEventListener(type: 'locationerror',
|
668 | fn?: ErrorEventHandlerFn, context?: any): this;
|
669 | removeEventListener(type: 'locationfound',
|
670 | fn?: LocationEventHandlerFn, context?: any): this;
|
671 | removeEventListener(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
672 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
673 | fn?: LeafletMouseEventHandlerFn, context?: any): this;
|
674 | removeEventListener(type: 'keypress' | 'keydown' | 'keyup',
|
675 | fn?: LeafletKeyboardEventHandlerFn, context?: any): this;
|
676 | removeEventListener(type: 'zoomanim',
|
677 | fn?: ZoomAnimEventHandlerFn, context?: any): this;
|
678 | removeEventListener(type: 'dragend',
|
679 | fn?: DragEndEventHandlerFn, context?: any): this;
|
680 | removeEventListener(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
681 | fn?: TileEventHandlerFn, context?: any): this;
|
682 | removeEventListener(type: 'tileerror',
|
683 | fn?: TileErrorEventHandlerFn, context?: any): this;
|
684 | removeEventListener(type: string, fn?: LeafletEventHandlerFn, context?: any): this;
|
685 |
|
686 | |
687 |
|
688 |
|
689 |
|
690 |
|
691 | removeEventListener(eventMap: LeafletEventHandlerFnMap): this;
|
692 |
|
693 |
|
694 | |
695 |
|
696 |
|
697 |
|
698 |
|
699 | clearAllEventListeners(): this;
|
700 |
|
701 | |
702 |
|
703 |
|
704 |
|
705 |
|
706 |
|
707 | addOneTimeEventListener(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
708 | fn: LayersControlEventHandlerFn, context?: any): this;
|
709 | addOneTimeEventListener(type: 'layeradd' | 'layerremove',
|
710 | fn: LayerEventHandlerFn, context?: any): this;
|
711 | addOneTimeEventListener(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
712 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
713 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
714 | 'down' | 'predrag',
|
715 | fn: LeafletEventHandlerFn, context?: any): this;
|
716 | addOneTimeEventListener(type: 'resize',
|
717 | fn: ResizeEventHandlerFn, context?: any): this;
|
718 | addOneTimeEventListener(type: 'popupopen' | 'popupclose',
|
719 | fn: PopupEventHandlerFn, context?: any): this;
|
720 | addOneTimeEventListener(type: 'tooltipopen' | 'tooltipclose',
|
721 | fn: TooltipEventHandlerFn, context?: any): this;
|
722 | addOneTimeEventListener(type: 'locationerror',
|
723 | fn: ErrorEventHandlerFn, context?: any): this;
|
724 | addOneTimeEventListener(type: 'locationfound',
|
725 | fn: LocationEventHandlerFn, context?: any): this;
|
726 | addOneTimeEventListener(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
727 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
728 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
729 | addOneTimeEventListener(type: 'keypress' | 'keydown' | 'keyup',
|
730 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
731 | addOneTimeEventListener(type: 'zoomanim',
|
732 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
733 | addOneTimeEventListener(type: 'dragend',
|
734 | fn: DragEndEventHandlerFn, context?: any): this;
|
735 | addOneTimeEventListener(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
736 | fn: TileEventHandlerFn, context?: any): this;
|
737 | addOneTimeEventListener(type: 'tileerror',
|
738 | fn: TileErrorEventHandlerFn, context?: any): this;
|
739 | addOneTimeEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
740 |
|
741 | |
742 |
|
743 |
|
744 |
|
745 |
|
746 | addOneTimeEventListener(eventMap: LeafletEventHandlerFnMap): this;
|
747 |
|
748 |
|
749 | |
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 | fireEvent(type: string, data?: any, propagate?: boolean): this;
|
757 |
|
758 | |
759 |
|
760 |
|
761 |
|
762 |
|
763 | hasEventListeners(type: string): boolean;
|
764 | }
|
765 |
|
766 |
|
767 | declare class MixinType {
|
768 | Events: Events;
|
769 | }
|
770 |
|
771 | export const Mixin: MixinType;
|
772 |
|
773 |
|
774 |
|
775 |
|
776 | export abstract class Evented extends Class {
|
777 | |
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 | on(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
785 | fn: LayersControlEventHandlerFn, context?: any): this;
|
786 | on(type: 'layeradd' | 'layerremove',
|
787 | fn: LayerEventHandlerFn, context?: any): this;
|
788 | on(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
789 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
790 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
791 | 'down' | 'predrag',
|
792 | fn: LeafletEventHandlerFn, context?: any): this;
|
793 | on(type: 'resize',
|
794 | fn: ResizeEventHandlerFn, context?: any): this;
|
795 | on(type: 'popupopen' | 'popupclose',
|
796 | fn: PopupEventHandlerFn, context?: any): this;
|
797 | on(type: 'tooltipopen' | 'tooltipclose',
|
798 | fn: TooltipEventHandlerFn, context?: any): this;
|
799 | on(type: 'locationerror',
|
800 | fn: ErrorEventHandlerFn, context?: any): this;
|
801 | on(type: 'locationfound',
|
802 | fn: LocationEventHandlerFn, context?: any): this;
|
803 | on(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
804 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
805 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
806 | on(type: 'keypress' | 'keydown' | 'keyup',
|
807 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
808 | on(type: 'zoomanim',
|
809 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
810 | on(type: 'dragend',
|
811 | fn: DragEndEventHandlerFn, context?: any): this;
|
812 | on(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
813 | fn: TileEventHandlerFn, context?: any): this;
|
814 | on(type: 'tileerror',
|
815 | fn: TileErrorEventHandlerFn, context?: any): this;
|
816 | on(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
817 |
|
818 | |
819 |
|
820 |
|
821 | on(eventMap: LeafletEventHandlerFnMap): this;
|
822 |
|
823 |
|
824 | |
825 |
|
826 |
|
827 |
|
828 |
|
829 |
|
830 |
|
831 | off(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
832 | fn?: LayersControlEventHandlerFn, context?: any): this;
|
833 | off(type: 'layeradd' | 'layerremove',
|
834 | fn?: LayerEventHandlerFn, context?: any): this;
|
835 | off(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
836 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
837 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
838 | 'down' | 'predrag',
|
839 | fn?: LeafletEventHandlerFn, context?: any): this;
|
840 | off(type: 'resize',
|
841 | fn?: ResizeEventHandlerFn, context?: any): this;
|
842 | off(type: 'popupopen' | 'popupclose',
|
843 | fn?: PopupEventHandlerFn, context?: any): this;
|
844 | off(type: 'tooltipopen' | 'tooltipclose',
|
845 | fn?: TooltipEventHandlerFn, context?: any): this;
|
846 | off(type: 'locationerror',
|
847 | fn?: ErrorEventHandlerFn, context?: any): this;
|
848 | off(type: 'locationfound',
|
849 | fn?: LocationEventHandlerFn, context?: any): this;
|
850 | off(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
851 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
852 | fn?: LeafletMouseEventHandlerFn, context?: any): this;
|
853 | off(type: 'keypress' | 'keydown' | 'keyup',
|
854 | fn?: LeafletKeyboardEventHandlerFn, context?: any): this;
|
855 | off(type: 'zoomanim',
|
856 | fn?: ZoomAnimEventHandlerFn, context?: any): this;
|
857 | off(type: 'dragend',
|
858 | fn?: DragEndEventHandlerFn, context?: any): this;
|
859 | off(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
860 | fn?: TileEventHandlerFn, context?: any): this;
|
861 | off(type: 'tileerror',
|
862 | fn?: TileErrorEventHandlerFn, context?: any): this;
|
863 | off(type: string, fn?: LeafletEventHandlerFn, context?: any): this;
|
864 |
|
865 | |
866 |
|
867 |
|
868 |
|
869 | off(eventMap: LeafletEventHandlerFnMap): this;
|
870 |
|
871 | |
872 |
|
873 |
|
874 | off(): this;
|
875 |
|
876 |
|
877 | |
878 |
|
879 |
|
880 |
|
881 |
|
882 | fire(type: string, data?: any, propagate?: boolean): this;
|
883 |
|
884 | |
885 |
|
886 |
|
887 |
|
888 | listens(type: 'baselayerchange' | 'overlayadd' | 'overlayremove' | 'layeradd' | 'layerremove' | 'zoomlevelschange' |
|
889 | 'unload' | 'viewreset' | 'load' | 'zoomstart' | 'movestart' | 'zoom' | 'move' | 'zoomend' |
|
890 | 'moveend' | 'autopanstart' | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' |
|
891 | 'update' | 'down' | 'predrag' | 'resize' | 'popupopen' | 'tooltipopen' | 'tooltipclose' |
|
892 | 'locationerror' | 'locationfound' | 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
893 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick' | 'keypress' | 'keydown' | 'keyup' |
|
894 | 'zoomanim' | 'dragend' | 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort' | 'tileerror', propagate?: boolean): boolean;
|
895 |
|
896 | listens(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
897 | fn: LayersControlEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
898 | listens(type: 'layeradd' | 'layerremove',
|
899 | fn: LayerEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
900 | listens(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
901 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
902 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
903 | 'down' | 'predrag',
|
904 | fn: LeafletEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
905 | listens(type: 'resize',
|
906 | fn: ResizeEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
907 | listens(type: 'popupopen' | 'popupclose',
|
908 | fn: PopupEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
909 | listens(type: 'tooltipopen' | 'tooltipclose',
|
910 | fn: TooltipEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
911 | listens(type: 'locationerror',
|
912 | fn: ErrorEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
913 | listens(type: 'locationfound',
|
914 | fn: LocationEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
915 | listens(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
916 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
917 | fn: LeafletMouseEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
918 | listens(type: 'keypress' | 'keydown' | 'keyup',
|
919 | fn: LeafletKeyboardEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
920 | listens(type: 'zoomanim',
|
921 | fn: ZoomAnimEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
922 | listens(type: 'dragend',
|
923 | fn: DragEndEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
924 | listens(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
925 | fn: TileEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
926 | listens(type: 'tileerror',
|
927 | fn: TileEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
928 | listens(type: string, fn: LeafletEventHandlerFn, context?: any, propagate?: boolean): boolean;
|
929 |
|
930 | |
931 |
|
932 |
|
933 |
|
934 | once(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
935 | fn: LayersControlEventHandlerFn, context?: any): this;
|
936 | once(type: 'layeradd' | 'layerremove',
|
937 | fn: LayerEventHandlerFn, context?: any): this;
|
938 | once(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
939 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
940 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
941 | 'down' | 'predrag',
|
942 | fn: LeafletEventHandlerFn, context?: any): this;
|
943 | once(type: 'resize',
|
944 | fn: ResizeEventHandlerFn, context?: any): this;
|
945 | once(type: 'popupopen' | 'popupclose',
|
946 | fn: PopupEventHandlerFn, context?: any): this;
|
947 | once(type: 'tooltipopen' | 'tooltipclose',
|
948 | fn: TooltipEventHandlerFn, context?: any): this;
|
949 | once(type: 'locationerror',
|
950 | fn: ErrorEventHandlerFn, context?: any): this;
|
951 | once(type: 'locationfound',
|
952 | fn: LocationEventHandlerFn, context?: any): this;
|
953 | once(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
954 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
955 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
956 | once(type: 'keypress' | 'keydown' | 'keyup',
|
957 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
958 | once(type: 'zoomanim',
|
959 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
960 | once(type: 'dragend',
|
961 | fn: DragEndEventHandlerFn, context?: any): this;
|
962 | once(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
963 | fn: TileEventHandlerFn, context?: any): this;
|
964 | once(type: 'tileerror',
|
965 | fn: TileEventHandlerFn, context?: any): this;
|
966 | once(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
967 |
|
968 | |
969 |
|
970 |
|
971 | once(eventMap: LeafletEventHandlerFnMap): this;
|
972 |
|
973 |
|
974 | |
975 |
|
976 |
|
977 | addEventParent(obj: Evented): this;
|
978 |
|
979 | |
980 |
|
981 |
|
982 | removeEventParent(obj: Evented): this;
|
983 |
|
984 | |
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 |
|
993 | addEventListener(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
994 | fn: LayersControlEventHandlerFn, context?: any): this;
|
995 | addEventListener(type: 'layeradd' | 'layerremove',
|
996 | fn: LayerEventHandlerFn, context?: any): this;
|
997 | addEventListener(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
998 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
999 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
1000 | 'down' | 'predrag',
|
1001 | fn: LeafletEventHandlerFn, context?: any): this;
|
1002 | addEventListener(type: 'resize',
|
1003 | fn: ResizeEventHandlerFn, context?: any): this;
|
1004 | addEventListener(type: 'popupopen' | 'popupclose',
|
1005 | fn: PopupEventHandlerFn, context?: any): this;
|
1006 | addEventListener(type: 'tooltipopen' | 'tooltipclose',
|
1007 | fn: TooltipEventHandlerFn, context?: any): this;
|
1008 | addEventListener(type: 'locationerror',
|
1009 | fn: ErrorEventHandlerFn, context?: any): this;
|
1010 | addEventListener(type: 'locationfound',
|
1011 | fn: LocationEventHandlerFn, context?: any): this;
|
1012 | addEventListener(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
1013 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
1014 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
1015 | addEventListener(type: 'keypress' | 'keydown' | 'keyup',
|
1016 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
1017 | addEventListener(type: 'zoomanim',
|
1018 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
1019 | addEventListener(type: 'dragend',
|
1020 | fn: DragEndEventHandlerFn, context?: any): this;
|
1021 | addEventListener(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
1022 | fn: TileEventHandlerFn, context?: any): this;
|
1023 | addEventListener(type: 'tileerror',
|
1024 | fn: TileErrorEventHandlerFn, context?: any): this;
|
1025 | addEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
1026 |
|
1027 | |
1028 |
|
1029 |
|
1030 |
|
1031 |
|
1032 | addEventListener(eventMap: LeafletEventHandlerFnMap): this;
|
1033 |
|
1034 |
|
1035 | |
1036 |
|
1037 |
|
1038 |
|
1039 |
|
1040 |
|
1041 |
|
1042 |
|
1043 |
|
1044 | removeEventListener(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
1045 | fn?: LayersControlEventHandlerFn, context?: any): this;
|
1046 | removeEventListener(type: 'layeradd' | 'layerremove',
|
1047 | fn?: LayerEventHandlerFn, context?: any): this;
|
1048 | removeEventListener(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
1049 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
1050 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
1051 | 'down' | 'predrag',
|
1052 | fn?: LeafletEventHandlerFn, context?: any): this;
|
1053 | removeEventListener(type: 'resize',
|
1054 | fn?: ResizeEventHandlerFn, context?: any): this;
|
1055 | removeEventListener(type: 'popupopen' | 'popupclose',
|
1056 | fn?: PopupEventHandlerFn, context?: any): this;
|
1057 | removeEventListener(type: 'tooltipopen' | 'tooltipclose',
|
1058 | fn?: TooltipEventHandlerFn, context?: any): this;
|
1059 | removeEventListener(type: 'locationerror',
|
1060 | fn?: ErrorEventHandlerFn, context?: any): this;
|
1061 | removeEventListener(type: 'locationfound',
|
1062 | fn?: LocationEventHandlerFn, context?: any): this;
|
1063 | removeEventListener(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
1064 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
1065 | fn?: LeafletMouseEventHandlerFn, context?: any): this;
|
1066 | removeEventListener(type: 'keypress' | 'keydown' | 'keyup',
|
1067 | fn?: LeafletKeyboardEventHandlerFn, context?: any): this;
|
1068 | removeEventListener(type: 'zoomanim',
|
1069 | fn?: ZoomAnimEventHandlerFn, context?: any): this;
|
1070 | removeEventListener(type: 'dragend',
|
1071 | fn?: DragEndEventHandlerFn, context?: any): this;
|
1072 | removeEventListener(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
1073 | fn?: TileEventHandlerFn, context?: any): this;
|
1074 | removeEventListener(type: 'tileerror',
|
1075 | fn?: TileErrorEventHandlerFn, context?: any): this;
|
1076 | removeEventListener(type: string, fn?: LeafletEventHandlerFn, context?: any): this;
|
1077 |
|
1078 | |
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 | removeEventListener(eventMap: LeafletEventHandlerFnMap): this;
|
1084 |
|
1085 |
|
1086 | |
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 | clearAllEventListeners(): this;
|
1092 |
|
1093 | |
1094 |
|
1095 |
|
1096 |
|
1097 |
|
1098 |
|
1099 | addOneTimeEventListener(type: 'baselayerchange' | 'overlayadd' | 'overlayremove',
|
1100 | fn: LayersControlEventHandlerFn, context?: any): this;
|
1101 | addOneTimeEventListener(type: 'layeradd' | 'layerremove',
|
1102 | fn: LayerEventHandlerFn, context?: any): this;
|
1103 | addOneTimeEventListener(type: 'zoomlevelschange' | 'unload' | 'viewreset' | 'load' | 'zoomstart' |
|
1104 | 'movestart' | 'zoom' | 'move' | 'zoomend' | 'moveend' | 'autopanstart' |
|
1105 | 'dragstart' | 'drag' | 'add' | 'remove' | 'loading' | 'error' | 'update' |
|
1106 | 'down' | 'predrag',
|
1107 | fn: LeafletEventHandlerFn, context?: any): this;
|
1108 | addOneTimeEventListener(type: 'resize',
|
1109 | fn: ResizeEventHandlerFn, context?: any): this;
|
1110 | addOneTimeEventListener(type: 'popupopen' | 'popupclose',
|
1111 | fn: PopupEventHandlerFn, context?: any): this;
|
1112 | addOneTimeEventListener(type: 'tooltipopen' | 'tooltipclose',
|
1113 | fn: TooltipEventHandlerFn, context?: any): this;
|
1114 | addOneTimeEventListener(type: 'locationerror',
|
1115 | fn: ErrorEventHandlerFn, context?: any): this;
|
1116 | addOneTimeEventListener(type: 'locationfound',
|
1117 | fn: LocationEventHandlerFn, context?: any): this;
|
1118 | addOneTimeEventListener(type: 'click' | 'dblclick' | 'mousedown' | 'mouseup' | 'mouseover' |
|
1119 | 'mouseout' | 'mousemove' | 'contextmenu' | 'preclick',
|
1120 | fn: LeafletMouseEventHandlerFn, context?: any): this;
|
1121 | addOneTimeEventListener(type: 'keypress' | 'keydown' | 'keyup',
|
1122 | fn: LeafletKeyboardEventHandlerFn, context?: any): this;
|
1123 | addOneTimeEventListener(type: 'zoomanim',
|
1124 | fn: ZoomAnimEventHandlerFn, context?: any): this;
|
1125 | addOneTimeEventListener(type: 'dragend',
|
1126 | fn: DragEndEventHandlerFn, context?: any): this;
|
1127 | addOneTimeEventListener(type: 'tileunload' | 'tileloadstart' | 'tileload' | 'tileabort',
|
1128 | fn: TileEventHandlerFn, context?: any): this;
|
1129 | addOneTimeEventListener(type: 'tileerror',
|
1130 | fn: TileErrorEventHandlerFn, context?: any): this;
|
1131 | addOneTimeEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this;
|
1132 |
|
1133 | |
1134 |
|
1135 |
|
1136 |
|
1137 |
|
1138 | addOneTimeEventListener(eventMap: LeafletEventHandlerFnMap): this;
|
1139 |
|
1140 |
|
1141 | |
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 | fireEvent(type: string, data?: any, propagate?: boolean): this;
|
1149 |
|
1150 | |
1151 |
|
1152 |
|
1153 |
|
1154 |
|
1155 | hasEventListeners(type: string): boolean;
|
1156 | }
|
1157 |
|
1158 | export interface DraggableOptions {
|
1159 | |
1160 |
|
1161 |
|
1162 |
|
1163 | clickTolerance: number;
|
1164 | }
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 | export class Draggable extends Evented {
|
1172 | constructor(element: HTMLElement, dragStartTarget?: HTMLElement, preventOutline?: boolean, options?: DraggableOptions);
|
1173 |
|
1174 | enable(): void;
|
1175 |
|
1176 | disable(): void;
|
1177 |
|
1178 | finishDrag(): void;
|
1179 | }
|
1180 |
|
1181 | export interface LayerOptions {
|
1182 | pane?: string | undefined;
|
1183 | attribution?: string | undefined;
|
1184 | }
|
1185 |
|
1186 | export interface InteractiveLayerOptions extends LayerOptions {
|
1187 | interactive?: boolean | undefined;
|
1188 | bubblingMouseEvents?: boolean | undefined;
|
1189 | }
|
1190 |
|
1191 | export class Layer extends Evented {
|
1192 | constructor(options?: LayerOptions);
|
1193 | addTo(map: Map|LayerGroup): this;
|
1194 | remove(): this;
|
1195 | removeFrom(map: Map): this;
|
1196 | getPane(name?: string): HTMLElement | undefined;
|
1197 |
|
1198 | addInteractiveTarget(targetEl: HTMLElement): this;
|
1199 | removeInteractiveTarget(targetEl: HTMLElement): this;
|
1200 |
|
1201 | // Popup methods
|
1202 | bindPopup(content: ((layer: Layer) => Content) | Content | Popup, options?: PopupOptions): this;
|
1203 | unbindPopup(): this;
|
1204 | openPopup(latlng?: LatLngExpression): this;
|
1205 | closePopup(): this;
|
1206 | togglePopup(): this;
|
1207 | isPopupOpen(): boolean;
|
1208 | setPopupContent(content: Content | Popup): this;
|
1209 | getPopup(): Popup | undefined;
|
1210 |
|
1211 | // Tooltip methods
|
1212 | bindTooltip(content: ((layer: Layer) => Content) | Tooltip | Content, options?: TooltipOptions): this;
|
1213 | unbindTooltip(): this;
|
1214 | openTooltip(latlng?: LatLngExpression): this;
|
1215 | closeTooltip(): this;
|
1216 | toggleTooltip(): this;
|
1217 | isTooltipOpen(): boolean;
|
1218 | setTooltipContent(content: Content | Tooltip): this;
|
1219 | getTooltip(): Tooltip | undefined;
|
1220 |
|
1221 | // Extension methods
|
1222 | onAdd(map: Map): this;
|
1223 | onRemove(map: Map): this;
|
1224 | getEvents?(): {[name: string]: LeafletEventHandlerFn};
|
1225 | getAttribution?(): string | null;
|
1226 | beforeAdd?(map: Map): this;
|
1227 |
|
1228 | protected _map: Map;
|
1229 | }
|
1230 |
|
1231 | export interface GridLayerOptions {
|
1232 | tileSize?: number | Point | undefined;
|
1233 | opacity?: number | undefined;
|
1234 | updateWhenIdle?: boolean | undefined;
|
1235 | updateWhenZooming?: boolean | undefined;
|
1236 | updateInterval?: number | undefined;
|
1237 | attribution?: string | undefined;
|
1238 | zIndex?: number | undefined;
|
1239 | bounds?: LatLngBoundsExpression | undefined;
|
1240 | minZoom?: number | undefined;
|
1241 | maxZoom?: number | undefined;
|
1242 | |
1243 |
|
1244 |
|
1245 |
|
1246 | maxNativeZoom?: number | undefined;
|
1247 | |
1248 |
|
1249 |
|
1250 |
|
1251 | minNativeZoom?: number | undefined;
|
1252 | noWrap?: boolean | undefined;
|
1253 | pane?: string | undefined;
|
1254 | className?: string | undefined;
|
1255 | keepBuffer?: number | undefined;
|
1256 | }
|
1257 |
|
1258 | export type DoneCallback = (error?: Error, tile?: HTMLElement) => void;
|
1259 |
|
1260 | export interface InternalTiles {
|
1261 | [key: string]: {
|
1262 | active?: boolean | undefined,
|
1263 | coords: Coords,
|
1264 | current: boolean,
|
1265 | el: HTMLElement,
|
1266 | loaded?: Date | undefined,
|
1267 | retain?: boolean | undefined,
|
1268 | };
|
1269 | }
|
1270 |
|
1271 | export class GridLayer extends Layer {
|
1272 | constructor(options?: GridLayerOptions);
|
1273 | bringToFront(): this;
|
1274 | bringToBack(): this;
|
1275 | getContainer(): HTMLElement | null;
|
1276 | setOpacity(opacity: number): this;
|
1277 | setZIndex(zIndex: number): this;
|
1278 | isLoading(): boolean;
|
1279 | redraw(): this;
|
1280 | getTileSize(): Point;
|
1281 |
|
1282 | protected createTile(coords: Coords, done: DoneCallback): HTMLElement;
|
1283 | protected _tileCoordsToKey(coords: Coords): string;
|
1284 | protected _wrapCoords(parameter: Coords): Coords;
|
1285 |
|
1286 | protected _tiles: InternalTiles;
|
1287 | protected _tileZoom?: number | undefined;
|
1288 | }
|
1289 |
|
1290 | export function gridLayer(options?: GridLayerOptions): GridLayer;
|
1291 |
|
1292 | export interface TileLayerOptions extends GridLayerOptions {
|
1293 | id?: string | undefined;
|
1294 | accessToken?: string | undefined;
|
1295 | minZoom?: number | undefined;
|
1296 | maxZoom?: number | undefined;
|
1297 | maxNativeZoom?: number | undefined;
|
1298 | minNativeZoom?: number | undefined;
|
1299 | subdomains?: string | string[] | undefined;
|
1300 | errorTileUrl?: string | undefined;
|
1301 | zoomOffset?: number | undefined;
|
1302 | tms?: boolean | undefined;
|
1303 | zoomReverse?: boolean | undefined;
|
1304 | detectRetina?: boolean | undefined;
|
1305 | crossOrigin?: CrossOrigin | boolean | undefined;
|
1306 | referrerPolicy?: ReferrerPolicy | boolean | undefined;
|
1307 |
|
1308 |
|
1309 |
|
1310 |
|
1311 |
|
1312 | }
|
1313 |
|
1314 | export class TileLayer extends GridLayer {
|
1315 | constructor(urlTemplate: string, options?: TileLayerOptions);
|
1316 | setUrl(url: string, noRedraw?: boolean): this;
|
1317 | getTileUrl(coords: L.Coords): string;
|
1318 |
|
1319 | protected _tileOnLoad(done: L.DoneCallback, tile: HTMLElement): void;
|
1320 | protected _tileOnError(done: L.DoneCallback, tile: HTMLElement, e: Error): void;
|
1321 | protected _abortLoading(): void;
|
1322 | protected _getZoomForUrl(): number;
|
1323 |
|
1324 | options: TileLayerOptions;
|
1325 | }
|
1326 |
|
1327 | export function tileLayer(urlTemplate: string, options?: TileLayerOptions): TileLayer;
|
1328 |
|
1329 | export namespace TileLayer {
|
1330 | class WMS extends TileLayer {
|
1331 | constructor(baseUrl: string, options: WMSOptions);
|
1332 | setParams(params: WMSParams, noRedraw?: boolean): this;
|
1333 |
|
1334 | wmsParams: WMSParams;
|
1335 | options: WMSOptions;
|
1336 | }
|
1337 | }
|
1338 |
|
1339 | export interface WMSOptions extends TileLayerOptions {
|
1340 | layers?: string | undefined;
|
1341 | styles?: string | undefined;
|
1342 | format?: string | undefined;
|
1343 | transparent?: boolean | undefined;
|
1344 | version?: string | undefined;
|
1345 | crs?: CRS | undefined;
|
1346 | uppercase?: boolean | undefined;
|
1347 | }
|
1348 |
|
1349 | export interface WMSParams {
|
1350 | format?: string | undefined;
|
1351 | layers: string;
|
1352 | request?: string | undefined;
|
1353 | service?: string | undefined;
|
1354 | styles?: string | undefined;
|
1355 | version?: string | undefined;
|
1356 | transparent?: boolean | undefined;
|
1357 | width?: number | undefined;
|
1358 | height?: number | undefined;
|
1359 | }
|
1360 |
|
1361 | export namespace tileLayer {
|
1362 | function wms(baseUrl: string, options?: WMSOptions): TileLayer.WMS;
|
1363 | }
|
1364 |
|
1365 | export type CrossOrigin = 'anonymous' | 'use-credentials' | '';
|
1366 | export type ReferrerPolicy =
|
1367 | 'no-referrer'
|
1368 | | 'no-referrer-when-downgrade'
|
1369 | | 'origin'
|
1370 | | 'origin-when-cross-origin'
|
1371 | | 'same-origin'
|
1372 | | 'strict-origin'
|
1373 | | 'strict-origin-when-cross-origin'
|
1374 | | 'unsafe-url';
|
1375 |
|
1376 | export interface ImageOverlayOptions extends InteractiveLayerOptions {
|
1377 | opacity?: number | undefined;
|
1378 | alt?: string | undefined;
|
1379 | interactive?: boolean | undefined;
|
1380 | attribution?: string | undefined;
|
1381 | crossOrigin?: CrossOrigin | boolean | undefined;
|
1382 | errorOverlayUrl?: string | undefined;
|
1383 | zIndex?: number | undefined;
|
1384 | className?: string | undefined;
|
1385 | }
|
1386 |
|
1387 | export interface ImageOverlayStyleOptions {
|
1388 | opacity?: number;
|
1389 | [name: string]: any;
|
1390 | }
|
1391 |
|
1392 | export class ImageOverlay extends Layer {
|
1393 | constructor(imageUrl: string, bounds: LatLngBoundsExpression, options?: ImageOverlayOptions);
|
1394 | bringToFront(): this;
|
1395 | bringToBack(): this;
|
1396 | setUrl(url: string): this;
|
1397 |
|
1398 | /** Update the bounds that this ImageOverlay covers */
|
1399 | setBounds(bounds: LatLngBounds): this;
|
1400 |
|
1401 | /** Changes the zIndex of the image overlay */
|
1402 | setZIndex(value: number): this;
|
1403 |
|
1404 | /** Changes the opacity of the image element */
|
1405 | setOpacity(opacity: number): this;
|
1406 |
|
1407 | /** Changes the style of the image element. As of 1.8, only the opacity is changed */
|
1408 | setStyle(styleOpts: ImageOverlayStyleOptions): this;
|
1409 |
|
1410 | /** Get the bounds that this ImageOverlay covers */
|
1411 | getBounds(): LatLngBounds;
|
1412 |
|
1413 | /** Get the center of the bounds this ImageOverlay covers */
|
1414 | getCenter(): Point;
|
1415 |
|
1416 | /** Get the img element that represents the ImageOverlay on the map */
|
1417 | getElement(): HTMLImageElement | undefined;
|
1418 |
|
1419 | options: ImageOverlayOptions;
|
1420 | }
|
1421 |
|
1422 | export function imageOverlay(imageUrl: string, bounds: LatLngBoundsExpression, options?: ImageOverlayOptions): ImageOverlay;
|
1423 |
|
1424 | export type SVGOverlayStyleOptions = ImageOverlayStyleOptions;
|
1425 |
|
1426 | export class SVGOverlay extends Layer {
|
1427 |
|
1428 | constructor(svgImage: string | SVGElement, bounds: LatLngBoundsExpression, options?: ImageOverlayOptions);
|
1429 | bringToFront(): this;
|
1430 | bringToBack(): this;
|
1431 | setUrl(url: string): this;
|
1432 |
|
1433 | /** Update the bounds that this SVGOverlay covers */
|
1434 | setBounds(bounds: LatLngBounds): this;
|
1435 |
|
1436 | /** Changes the zIndex of the image overlay */
|
1437 | setZIndex(value: number): this;
|
1438 |
|
1439 | /** Changes the opacity of the image element */
|
1440 | setOpacity(opacity: number): this;
|
1441 |
|
1442 | /** Changes the style of the image element. As of 1.8, only the opacity is changed */
|
1443 | setStyle(styleOpts: SVGOverlayStyleOptions): this;
|
1444 |
|
1445 | /** Get the bounds that this SVGOverlay covers */
|
1446 | getBounds(): LatLngBounds;
|
1447 |
|
1448 | /** Get the center of the bounds this ImageOverlay covers */
|
1449 | getCenter(): Point;
|
1450 |
|
1451 | /** Get the img element that represents the SVGOverlay on the map */
|
1452 | getElement(): SVGElement | undefined;
|
1453 |
|
1454 | options: ImageOverlayOptions;
|
1455 | }
|
1456 |
|
1457 | export function svgOverlay(svgImage: string | SVGElement, bounds: LatLngBoundsExpression, options?: ImageOverlayOptions): SVGOverlay;
|
1458 |
|
1459 | export interface VideoOverlayOptions extends ImageOverlayOptions {
|
1460 |
|
1461 | autoplay?: boolean | undefined;
|
1462 |
|
1463 | loop?: boolean | undefined;
|
1464 | |
1465 |
|
1466 |
|
1467 |
|
1468 | keepAspectRatio?: boolean | undefined;
|
1469 |
|
1470 | muted?: boolean | undefined;
|
1471 | playsInline?: boolean | undefined;
|
1472 | }
|
1473 |
|
1474 | export class VideoOverlay extends Layer {
|
1475 | constructor(video: string | string[] | HTMLVideoElement, bounds: LatLngBoundsExpression, options?: VideoOverlayOptions);
|
1476 | bringToFront(): this;
|
1477 | bringToBack(): this;
|
1478 | setUrl(url: string): this;
|
1479 |
|
1480 | /** Update the bounds that this VideoOverlay covers */
|
1481 | setBounds(bounds: LatLngBounds): this;
|
1482 |
|
1483 | /** Changes the zIndex of the image overlay */
|
1484 | setZIndex(value: number): this;
|
1485 |
|
1486 | /** Changes the opacity of the image element */
|
1487 | setOpacity(opacity: number): this;
|
1488 |
|
1489 | /** Changes the style of the image element. As of 1.8, only the opacity is changed */
|
1490 | setStyle(styleOpts: SVGOverlayStyleOptions): this;
|
1491 |
|
1492 | /** Get the bounds that this VideoOverlay covers */
|
1493 | getBounds(): LatLngBounds;
|
1494 |
|
1495 | /** Get the center of the bounds this ImageOverlay covers */
|
1496 | getCenter(): Point;
|
1497 |
|
1498 | /** Get the video element that represents the VideoOverlay on the map */
|
1499 | getElement(): HTMLVideoElement | undefined;
|
1500 |
|
1501 | options: VideoOverlayOptions;
|
1502 | }
|
1503 |
|
1504 | export function videoOverlay(video: string | string[] | HTMLVideoElement, bounds: LatLngBoundsExpression, options?: VideoOverlayOptions): VideoOverlay;
|
1505 |
|
1506 | export type LineCapShape = 'butt' | 'round' | 'square' | 'inherit';
|
1507 |
|
1508 | export type LineJoinShape = 'miter' | 'round' | 'bevel' | 'inherit';
|
1509 |
|
1510 | export type FillRule = 'nonzero' | 'evenodd' | 'inherit';
|
1511 |
|
1512 | export interface PathOptions extends InteractiveLayerOptions {
|
1513 | stroke?: boolean | undefined;
|
1514 | color?: string | undefined;
|
1515 | weight?: number | undefined;
|
1516 | opacity?: number | undefined;
|
1517 | lineCap?: LineCapShape | undefined;
|
1518 | lineJoin?: LineJoinShape | undefined;
|
1519 | dashArray?: string | number[] | undefined;
|
1520 | dashOffset?: string | undefined;
|
1521 | fill?: boolean | undefined;
|
1522 | fillColor?: string | undefined;
|
1523 | fillOpacity?: number | undefined;
|
1524 | fillRule?: FillRule | undefined;
|
1525 | renderer?: Renderer | undefined;
|
1526 | className?: string | undefined;
|
1527 | }
|
1528 |
|
1529 | export abstract class Path extends Layer {
|
1530 | redraw(): this;
|
1531 | setStyle(style: PathOptions): this;
|
1532 | bringToFront(): this;
|
1533 | bringToBack(): this;
|
1534 | getElement(): Element | undefined;
|
1535 |
|
1536 | options: PathOptions;
|
1537 | }
|
1538 |
|
1539 | export interface PolylineOptions extends PathOptions {
|
1540 | smoothFactor?: number | undefined;
|
1541 | noClip?: boolean | undefined;
|
1542 | }
|
1543 |
|
1544 | export class Polyline<T extends geojson.GeometryObject = geojson.LineString | geojson.MultiLineString, P = any> extends Path {
|
1545 | constructor(latlngs: LatLngExpression[] | LatLngExpression[][], options?: PolylineOptions);
|
1546 | toGeoJSON(precision?: number | false): geojson.Feature<T, P>;
|
1547 | getLatLngs(): LatLng[] | LatLng[][] | LatLng[][][];
|
1548 | setLatLngs(latlngs: LatLngExpression[] | LatLngExpression[][] | LatLngExpression[][][]): this;
|
1549 | isEmpty(): boolean;
|
1550 | getCenter(): LatLng;
|
1551 | getBounds(): LatLngBounds;
|
1552 | addLatLng(latlng: LatLngExpression | LatLngExpression[], latlngs?: LatLng[]): this;
|
1553 | closestLayerPoint(p: Point): Point;
|
1554 |
|
1555 | feature?: geojson.Feature<T, P> | undefined;
|
1556 | options: PolylineOptions;
|
1557 | }
|
1558 |
|
1559 | export function polyline(latlngs: LatLngExpression[] | LatLngExpression[][], options?: PolylineOptions): Polyline;
|
1560 |
|
1561 | export class Polygon<P = any> extends Polyline<geojson.Polygon | geojson.MultiPolygon, P> {
|
1562 | constructor(latlngs: LatLngExpression[] | LatLngExpression[][] | LatLngExpression[][][], options?: PolylineOptions);
|
1563 | }
|
1564 |
|
1565 | export function polygon(latlngs: LatLngExpression[] | LatLngExpression[][] | LatLngExpression[][][], options?: PolylineOptions): Polygon;
|
1566 |
|
1567 | export class Rectangle<P = any> extends Polygon<P> {
|
1568 | constructor(latLngBounds: LatLngBoundsExpression, options?: PolylineOptions);
|
1569 | setBounds(latLngBounds: LatLngBoundsExpression): this;
|
1570 | }
|
1571 |
|
1572 | export function rectangle(latLngBounds: LatLngBoundsExpression, options?: PolylineOptions): Rectangle;
|
1573 |
|
1574 | export interface CircleMarkerOptions extends PathOptions {
|
1575 | radius?: number | undefined;
|
1576 | }
|
1577 |
|
1578 | export class CircleMarker<P = any> extends Path {
|
1579 | constructor(latlng: LatLngExpression, options?: CircleMarkerOptions);
|
1580 | toGeoJSON(precision?: number | false): geojson.Feature<geojson.Point, P>;
|
1581 | setLatLng(latLng: LatLngExpression): this;
|
1582 | getLatLng(): LatLng;
|
1583 | setRadius(radius: number): this;
|
1584 | getRadius(): number;
|
1585 | setStyle(options: CircleMarkerOptions): this;
|
1586 |
|
1587 | options: CircleMarkerOptions;
|
1588 | feature?: geojson.Feature<geojson.Point, P> | undefined;
|
1589 | }
|
1590 |
|
1591 | export function circleMarker(latlng: LatLngExpression, options?: CircleMarkerOptions): CircleMarker;
|
1592 |
|
1593 | export interface CircleOptions extends PathOptions {
|
1594 | radius: number | undefined;
|
1595 | }
|
1596 |
|
1597 | export class Circle<P = any> extends CircleMarker<P> {
|
1598 | constructor(latlng: LatLngExpression, options?: CircleOptions);
|
1599 | constructor(latlng: LatLngExpression, radius: number, options?: CircleOptions); // deprecated!
|
1600 | toGeoJSON(precision?: number | false): any;
|
1601 | getBounds(): LatLngBounds;
|
1602 | setRadius(radius: number): this;
|
1603 | getRadius(): number;
|
1604 | setStyle(style: PathOptions): this;
|
1605 | }
|
1606 |
|
1607 | export function circle(latlng: LatLngExpression, options?: CircleMarkerOptions): Circle;
|
1608 | export function circle(latlng: LatLngExpression, radius: number, options?: CircleMarkerOptions): Circle; // deprecated!
|
1609 |
|
1610 | export interface RendererOptions extends LayerOptions {
|
1611 | padding?: number | undefined;
|
1612 | tolerance?: number | undefined;
|
1613 | }
|
1614 |
|
1615 | export class Renderer extends Layer {
|
1616 | constructor(options?: RendererOptions);
|
1617 |
|
1618 | options: RendererOptions;
|
1619 | }
|
1620 |
|
1621 | export class SVG extends Renderer {}
|
1622 |
|
1623 | export namespace SVG {
|
1624 | function create<K extends keyof SVGElementTagNameMap>(name: K): SVGElementTagNameMap[K];
|
1625 | function create(name: string): SVGElement;
|
1626 |
|
1627 | function pointsToPath(rings: PointExpression[], closed: boolean): string;
|
1628 | }
|
1629 |
|
1630 | export function svg(options?: RendererOptions): SVG;
|
1631 |
|
1632 | export class Canvas extends Renderer {}
|
1633 |
|
1634 | export function canvas(options?: RendererOptions): Canvas;
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 | export class LayerGroup<P = any> extends Layer {
|
1642 | constructor(layers?: Layer[], options?: LayerOptions);
|
1643 |
|
1644 | toMultiPoint(precision?: number): geojson.Feature<geojson.MultiPoint, P>;
|
1645 |
|
1646 | /**
|
1647 | * Returns a GeoJSON representation of the layer group (as a GeoJSON GeometryCollection, GeoJSONFeatureCollection or Multipoint).
|
1648 | */
|
1649 | toGeoJSON(precision?: number | false): geojson.FeatureCollection<geojson.GeometryObject, P> | geojson.Feature<geojson.MultiPoint, P> | geojson.GeometryCollection;
|
1650 |
|
1651 | /**
|
1652 | * Adds the given layer to the group.
|
1653 | */
|
1654 | addLayer(layer: Layer): this;
|
1655 |
|
1656 | /**
|
1657 | * Removes the layer with the given internal ID or the given layer from the group.
|
1658 | */
|
1659 | removeLayer(layer: number | Layer): this;
|
1660 |
|
1661 | /**
|
1662 | * Returns true if the given layer is currently added to the group.
|
1663 | */
|
1664 | hasLayer(layer: Layer): boolean;
|
1665 |
|
1666 | /**
|
1667 | * Removes all the layers from the group.
|
1668 | */
|
1669 | clearLayers(): this;
|
1670 |
|
1671 | /**
|
1672 | * Calls methodName on every layer contained in this group, passing any additional parameters.
|
1673 | * Has no effect if the layers contained do not implement methodName.
|
1674 | */
|
1675 | invoke(methodName: string, ...params: any[]): this;
|
1676 |
|
1677 | /**
|
1678 | * Iterates over the layers of the group,
|
1679 | * optionally specifying context of the iterator function.
|
1680 | */
|
1681 | eachLayer(fn: (layer: Layer) => void, context?: any): this;
|
1682 |
|
1683 | /**
|
1684 | * Returns the layer with the given internal ID.
|
1685 | */
|
1686 | getLayer(id: number): Layer | undefined;
|
1687 |
|
1688 | /**
|
1689 | * Returns an array of all the layers added to the group.
|
1690 | */
|
1691 | getLayers(): Layer[];
|
1692 |
|
1693 | /**
|
1694 | * Calls setZIndex on every layer contained in this group, passing the z-index.
|
1695 | */
|
1696 | setZIndex(zIndex: number): this;
|
1697 |
|
1698 | /**
|
1699 | * Returns the internal ID for a layer
|
1700 | */
|
1701 | getLayerId(layer: Layer): number;
|
1702 |
|
1703 | feature?: geojson.FeatureCollection<geojson.GeometryObject, P> | geojson.Feature<geojson.MultiPoint, P> | geojson.GeometryCollection | undefined;
|
1704 | }
|
1705 |
|
1706 | /**
|
1707 | * Create a layer group, optionally given an initial set of layers and an `options` object.
|
1708 | */
|
1709 | export function layerGroup(layers?: Layer[], options?: LayerOptions): LayerGroup;
|
1710 |
|
1711 | /**
|
1712 | * Extended LayerGroup that also has mouse events (propagated from
|
1713 | * members of the group) and a shared bindPopup method.
|
1714 | */
|
1715 | export class FeatureGroup<P = any> extends LayerGroup<P> {
|
1716 | |
1717 |
|
1718 |
|
1719 | addLayer(layer: Layer): this;
|
1720 |
|
1721 | |
1722 |
|
1723 |
|
1724 | removeLayer(layer: number | Layer): this;
|
1725 |
|
1726 | |
1727 |
|
1728 |
|
1729 | setStyle(style: PathOptions): this;
|
1730 |
|
1731 | |
1732 |
|
1733 |
|
1734 | bringToFront(): this;
|
1735 |
|
1736 | |
1737 |
|
1738 |
|
1739 | bringToBack(): this;
|
1740 |
|
1741 | |
1742 |
|
1743 |
|
1744 |
|
1745 | getBounds(): LatLngBounds;
|
1746 | }
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 | export function featureGroup(layers?: Layer[], options?: LayerOptions): FeatureGroup;
|
1752 |
|
1753 | export type StyleFunction<P = any> = (feature?: geojson.Feature<geojson.GeometryObject, P>) => PathOptions;
|
1754 |
|
1755 | export interface GeoJSONOptions<P = any> extends InteractiveLayerOptions {
|
1756 | |
1757 |
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 |
|
1768 |
|
1769 | pointToLayer?(geoJsonPoint: geojson.Feature<geojson.Point, P>, latlng: LatLng): Layer;
|
1770 |
|
1771 | |
1772 |
|
1773 |
|
1774 |
|
1775 |
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 |
|
1783 | style?: PathOptions | StyleFunction<P> | undefined;
|
1784 |
|
1785 | |
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 |
|
1794 |
|
1795 | onEachFeature?(feature: geojson.Feature<geojson.GeometryObject, P>, layer: Layer): void;
|
1796 |
|
1797 | |
1798 |
|
1799 |
|
1800 |
|
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 | filter?(geoJsonFeature: geojson.Feature<geojson.GeometryObject, P>): boolean;
|
1809 |
|
1810 | |
1811 |
|
1812 |
|
1813 |
|
1814 | coordsToLatLng?(coords: [number, number] | [number, number, number]): LatLng;
|
1815 |
|
1816 |
|
1817 | markersInheritOptions?: boolean | undefined;
|
1818 | }
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 | export class GeoJSON<P = any> extends FeatureGroup<P> {
|
1825 | |
1826 |
|
1827 |
|
1828 | static getFeature<P = any>(layer: Layer, newGeometry: geojson.Feature<geojson.GeometryObject, P> | geojson.GeometryObject): geojson.Feature<geojson.GeometryObject, P>;
|
1829 |
|
1830 | |
1831 |
|
1832 |
|
1833 |
|
1834 | static geometryToLayer<P = any>(featureData: geojson.Feature<geojson.GeometryObject, P>, options?: GeoJSONOptions<P>): Layer;
|
1835 |
|
1836 | |
1837 |
|
1838 |
|
1839 |
|
1840 | static coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng;
|
1841 |
|
1842 | |
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 | static coordsToLatLngs(
|
1849 | coords: any[],
|
1850 | levelsDeep?: number,
|
1851 | coordsToLatLng?: (coords: [number, number] | [number, number, number]) => LatLng): any[];
|
1852 |
|
1853 | |
1854 |
|
1855 |
|
1856 | static latLngToCoords(latlng: LatLng): [number, number] | [number, number, number];
|
1857 |
|
1858 | |
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 | static latLngsToCoords(latlngs: any[], levelsDeep?: number, closed?: boolean): any[];
|
1864 |
|
1865 | |
1866 |
|
1867 |
|
1868 | static asFeature<P = any>(geojson: geojson.Feature<geojson.GeometryObject, P> | geojson.GeometryObject): geojson.Feature<geojson.GeometryObject, P>;
|
1869 |
|
1870 | constructor(geojson?: geojson.GeoJsonObject, options?: GeoJSONOptions<P>)
|
1871 | /**
|
1872 | * Adds a GeoJSON object to the layer.
|
1873 | */
|
1874 | addData(data: geojson.GeoJsonObject): this;
|
1875 |
|
1876 | /**
|
1877 | * Resets the given vector layer's style to the original GeoJSON style,
|
1878 | * useful for resetting style after hover events.
|
1879 | */
|
1880 | resetStyle(layer?: Layer): this;
|
1881 |
|
1882 | /**
|
1883 | * Same as FeatureGroup's setStyle method, but style-functions are also
|
1884 | * allowed here to set the style according to the feature.
|
1885 | */
|
1886 | setStyle(style: PathOptions | StyleFunction<P>): this;
|
1887 |
|
1888 | options: GeoJSONOptions<P>;
|
1889 | }
|
1890 |
|
1891 | /**
|
1892 | * Creates a GeoJSON layer.
|
1893 | *
|
1894 | * Optionally accepts an object in GeoJSON format to display on the
|
1895 | * map (you can alternatively add it later with addData method) and
|
1896 | * an options object.
|
1897 | */
|
1898 | export function geoJSON<P = any>(geojson?: geojson.GeoJsonObject | geojson.GeoJsonObject[], options?: GeoJSONOptions<P>): GeoJSON<P>;
|
1899 | export function geoJson<P = any>(geojson?: geojson.GeoJsonObject | geojson.GeoJsonObject[], options?: GeoJSONOptions<P>): GeoJSON<P>;
|
1900 |
|
1901 | export type Zoom = boolean | 'center';
|
1902 |
|
1903 | export interface MapOptions {
|
1904 | preferCanvas?: boolean | undefined;
|
1905 |
|
1906 |
|
1907 | attributionControl?: boolean | undefined;
|
1908 | zoomControl?: boolean | undefined;
|
1909 |
|
1910 |
|
1911 | closePopupOnClick?: boolean | undefined;
|
1912 | zoomSnap?: number | undefined;
|
1913 | zoomDelta?: number | undefined;
|
1914 | trackResize?: boolean | undefined;
|
1915 | boxZoom?: boolean | undefined;
|
1916 | doubleClickZoom?: Zoom | undefined;
|
1917 | dragging?: boolean | undefined;
|
1918 |
|
1919 |
|
1920 | crs?: CRS | undefined;
|
1921 | center?: LatLngExpression | undefined;
|
1922 | zoom?: number | undefined;
|
1923 | minZoom?: number | undefined;
|
1924 | maxZoom?: number | undefined;
|
1925 | layers?: Layer[] | undefined;
|
1926 | maxBounds?: LatLngBoundsExpression | undefined;
|
1927 | renderer?: Renderer | undefined;
|
1928 |
|
1929 |
|
1930 | fadeAnimation?: boolean | undefined;
|
1931 | markerZoomAnimation?: boolean | undefined;
|
1932 | transform3DLimit?: number | undefined;
|
1933 | zoomAnimation?: boolean | undefined;
|
1934 | zoomAnimationThreshold?: number | undefined;
|
1935 |
|
1936 |
|
1937 | inertia?: boolean | undefined;
|
1938 | inertiaDeceleration?: number | undefined;
|
1939 | inertiaMaxSpeed?: number | undefined;
|
1940 | easeLinearity?: number | undefined;
|
1941 | worldCopyJump?: boolean | undefined;
|
1942 | maxBoundsViscosity?: number | undefined;
|
1943 |
|
1944 |
|
1945 | keyboard?: boolean | undefined;
|
1946 | keyboardPanDelta?: number | undefined;
|
1947 |
|
1948 |
|
1949 | scrollWheelZoom?: Zoom | undefined;
|
1950 | wheelDebounceTime?: number | undefined;
|
1951 | wheelPxPerZoomLevel?: number | undefined;
|
1952 |
|
1953 |
|
1954 | tap?: boolean | undefined;
|
1955 | tapTolerance?: number | undefined;
|
1956 | touchZoom?: Zoom | undefined;
|
1957 | bounceAtZoomLimits?: boolean | undefined;
|
1958 | }
|
1959 |
|
1960 | export type ControlPosition = 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
|
1961 |
|
1962 | export interface ControlOptions {
|
1963 | position?: ControlPosition | undefined;
|
1964 | }
|
1965 |
|
1966 | export class Control extends Class {
|
1967 | static extend<T extends object>(props: T): {new(...args: any[]): T} & typeof Control;
|
1968 | constructor(options?: ControlOptions);
|
1969 | getPosition(): ControlPosition;
|
1970 | setPosition(position: ControlPosition): this;
|
1971 | getContainer(): HTMLElement | undefined;
|
1972 | addTo(map: Map): this;
|
1973 | remove(): this;
|
1974 |
|
1975 | // Extension methods
|
1976 | onAdd?(map: Map): HTMLElement;
|
1977 | onRemove?(map: Map): void;
|
1978 |
|
1979 | options: ControlOptions;
|
1980 | }
|
1981 |
|
1982 | export namespace Control {
|
1983 | interface ZoomOptions extends ControlOptions {
|
1984 | zoomInText?: string | undefined;
|
1985 | zoomInTitle?: string | undefined;
|
1986 | zoomOutText?: string | undefined;
|
1987 | zoomOutTitle?: string | undefined;
|
1988 | }
|
1989 |
|
1990 | class Zoom extends Control {
|
1991 | constructor(options?: ZoomOptions);
|
1992 | options: ZoomOptions;
|
1993 | }
|
1994 |
|
1995 | interface AttributionOptions extends ControlOptions {
|
1996 | prefix?: string | boolean | undefined;
|
1997 | }
|
1998 |
|
1999 | class Attribution extends Control {
|
2000 | constructor(options?: AttributionOptions);
|
2001 | setPrefix(prefix: string | false): this;
|
2002 | addAttribution(text: string): this;
|
2003 | removeAttribution(text: string): this;
|
2004 | options: AttributionOptions;
|
2005 | }
|
2006 |
|
2007 | interface LayersOptions extends ControlOptions {
|
2008 | collapsed?: boolean | undefined;
|
2009 | autoZIndex?: boolean | undefined;
|
2010 | hideSingleBase?: boolean | undefined;
|
2011 | |
2012 |
|
2013 |
|
2014 | sortLayers?: boolean | undefined;
|
2015 | |
2016 |
|
2017 |
|
2018 |
|
2019 |
|
2020 |
|
2021 | sortFunction?: ((layerA: Layer, layerB: Layer, nameA: string, nameB: string) => number) | undefined;
|
2022 | }
|
2023 |
|
2024 | interface LayersObject {
|
2025 | [name: string]: Layer;
|
2026 | }
|
2027 |
|
2028 | class Layers extends Control {
|
2029 | constructor(baseLayers?: LayersObject, overlays?: LayersObject, options?: LayersOptions);
|
2030 | addBaseLayer(layer: Layer, name: string): this;
|
2031 | addOverlay(layer: Layer, name: string): this;
|
2032 | removeLayer(layer: Layer): this;
|
2033 | expand(): this;
|
2034 | collapse(): this;
|
2035 | options: LayersOptions;
|
2036 | }
|
2037 |
|
2038 | interface ScaleOptions extends ControlOptions {
|
2039 | maxWidth?: number | undefined;
|
2040 | metric?: boolean | undefined;
|
2041 | imperial?: boolean | undefined;
|
2042 | updateWhenIdle?: boolean | undefined;
|
2043 | }
|
2044 |
|
2045 | class Scale extends Control {
|
2046 | constructor(options?: ScaleOptions);
|
2047 | options: ScaleOptions;
|
2048 | }
|
2049 | }
|
2050 |
|
2051 | export namespace control {
|
2052 | function zoom(options?: Control.ZoomOptions): Control.Zoom;
|
2053 |
|
2054 | function attribution(options?: Control.AttributionOptions): Control.Attribution;
|
2055 |
|
2056 | function layers(baseLayers?: Control.LayersObject, overlays?: Control.LayersObject, options?: Control.LayersOptions): Control.Layers;
|
2057 |
|
2058 | function scale(options?: Control.ScaleOptions): Control.Scale;
|
2059 | }
|
2060 |
|
2061 | export interface DivOverlayOptions {
|
2062 | offset?: PointExpression | undefined;
|
2063 | className?: string | undefined;
|
2064 | pane?: string | undefined;
|
2065 | interactive?: boolean | undefined;
|
2066 | content?: string | HTMLElement | ((layer: Layer) => string) | ((layer: Layer) => HTMLElement);
|
2067 | }
|
2068 |
|
2069 | export abstract class DivOverlay extends Layer {
|
2070 | constructor(latlng: LatLngExpression, options?: TooltipOptions);
|
2071 | constructor(options?: DivOverlayOptions, source?: Layer);
|
2072 | getLatLng(): LatLng | undefined;
|
2073 | setLatLng(latlng: LatLngExpression): this;
|
2074 | getContent(): Content | ((source: Layer) => Content) | undefined;
|
2075 | setContent(htmlContent: ((source: Layer) => Content) | Content): this;
|
2076 | getElement(): HTMLElement | undefined;
|
2077 | update(): void;
|
2078 | isOpen(): boolean;
|
2079 | bringToFront(): this;
|
2080 | bringToBack(): this;
|
2081 | openOn(map: Map): this;
|
2082 | toggle(layer?: Layer): this;
|
2083 | close(): this;
|
2084 |
|
2085 | options: DivOverlayOptions;
|
2086 | }
|
2087 |
|
2088 | export interface PopupOptions extends DivOverlayOptions {
|
2089 | maxWidth?: number | undefined;
|
2090 | minWidth?: number | undefined;
|
2091 | maxHeight?: number | undefined;
|
2092 | keepInView?: boolean | undefined;
|
2093 | closeButton?: boolean | undefined;
|
2094 | autoPan?: boolean | undefined;
|
2095 | autoPanPaddingTopLeft?: PointExpression | undefined;
|
2096 | autoPanPaddingBottomRight?: PointExpression | undefined;
|
2097 | autoPanPadding?: PointExpression | undefined;
|
2098 | autoClose?: boolean | undefined;
|
2099 | closeOnClick?: boolean | undefined;
|
2100 | closeOnEscapeKey?: boolean | undefined;
|
2101 | }
|
2102 |
|
2103 | export type Content = string | HTMLElement;
|
2104 |
|
2105 | export class Popup extends DivOverlay {
|
2106 | constructor(latlng: LatLngExpression, options?: TooltipOptions);
|
2107 | constructor(options?: PopupOptions, source?: Layer);
|
2108 | openOn(map: Map): this;
|
2109 |
|
2110 | options: PopupOptions;
|
2111 | }
|
2112 |
|
2113 | export function popup(options?: PopupOptions, source?: Layer): Popup;
|
2114 |
|
2115 | export type Direction = 'right' | 'left' | 'top' | 'bottom' | 'center' | 'auto';
|
2116 |
|
2117 | export interface TooltipOptions extends DivOverlayOptions {
|
2118 | pane?: string | undefined;
|
2119 | offset?: PointExpression | undefined;
|
2120 | direction?: Direction | undefined;
|
2121 | permanent?: boolean | undefined;
|
2122 | sticky?: boolean | undefined;
|
2123 | opacity?: number | undefined;
|
2124 | }
|
2125 |
|
2126 | export class Tooltip extends DivOverlay {
|
2127 | constructor(latlng: LatLngExpression, options?: TooltipOptions);
|
2128 | constructor(options?: TooltipOptions, source?: Layer);
|
2129 | setOpacity(val: number): void;
|
2130 |
|
2131 | options: TooltipOptions;
|
2132 | }
|
2133 |
|
2134 | export function tooltip(options?: TooltipOptions, source?: Layer): Tooltip;
|
2135 |
|
2136 | export interface ZoomOptions {
|
2137 | animate?: boolean | undefined;
|
2138 | }
|
2139 |
|
2140 | export interface PanOptions {
|
2141 | animate?: boolean | undefined;
|
2142 | duration?: number | undefined;
|
2143 | easeLinearity?: number | undefined;
|
2144 | noMoveStart?: boolean | undefined;
|
2145 | }
|
2146 |
|
2147 | // This is not empty, it extends two interfaces into one...
|
2148 | export interface ZoomPanOptions extends ZoomOptions, PanOptions {}
|
2149 |
|
2150 | export interface InvalidateSizeOptions extends ZoomPanOptions {
|
2151 | debounceMoveend?: boolean | undefined;
|
2152 | pan?: boolean | undefined;
|
2153 | }
|
2154 |
|
2155 | export interface FitBoundsOptions extends ZoomOptions, PanOptions {
|
2156 | paddingTopLeft?: PointExpression | undefined;
|
2157 | paddingBottomRight?: PointExpression | undefined;
|
2158 | padding?: PointExpression | undefined;
|
2159 | maxZoom?: number | undefined;
|
2160 | }
|
2161 |
|
2162 | export interface PanInsideOptions extends PanOptions {
|
2163 | paddingTopLeft?: PointExpression | undefined;
|
2164 | paddingBottomRight?: PointExpression | undefined;
|
2165 | padding?: PointExpression | undefined;
|
2166 | }
|
2167 |
|
2168 | export interface LocateOptions {
|
2169 | watch?: boolean | undefined;
|
2170 | setView?: boolean | undefined;
|
2171 | maxZoom?: number | undefined;
|
2172 | timeout?: number | undefined;
|
2173 | maximumAge?: number | undefined;
|
2174 | enableHighAccuracy?: boolean | undefined;
|
2175 | }
|
2176 |
|
2177 | export class Handler extends Class {
|
2178 | constructor(map: Map);
|
2179 | enable(): this;
|
2180 | disable(): this;
|
2181 | enabled(): boolean;
|
2182 |
|
2183 | // Extension methods
|
2184 | addHooks?(): void;
|
2185 | removeHooks?(): void;
|
2186 | }
|
2187 |
|
2188 | export interface LeafletEvent {
|
2189 | type: string;
|
2190 | popup: any;
|
2191 | target: any;
|
2192 | sourceTarget: any;
|
2193 | propagatedFrom: any;
|
2194 | /**
|
2195 | * @deprecated The same as {@link LeafletEvent.propagatedFrom propagatedFrom}.
|
2196 | */
|
2197 | layer: any;
|
2198 | }
|
2199 |
|
2200 | export interface LeafletMouseEvent extends LeafletEvent {
|
2201 | latlng: LatLng;
|
2202 | layerPoint: Point;
|
2203 | containerPoint: Point;
|
2204 | originalEvent: MouseEvent;
|
2205 | }
|
2206 |
|
2207 | export interface LeafletKeyboardEvent extends LeafletEvent {
|
2208 | originalEvent: KeyboardEvent;
|
2209 | }
|
2210 |
|
2211 | export interface LocationEvent extends LeafletEvent {
|
2212 | latlng: LatLng;
|
2213 | bounds: LatLngBounds;
|
2214 | accuracy: number;
|
2215 | altitude: number;
|
2216 | altitudeAccuracy: number;
|
2217 | heading: number;
|
2218 | speed: number;
|
2219 | timestamp: number;
|
2220 | }
|
2221 |
|
2222 | export interface ErrorEvent extends LeafletEvent {
|
2223 | message: string;
|
2224 | code: number;
|
2225 | }
|
2226 |
|
2227 | export interface LayerEvent extends LeafletEvent {
|
2228 | layer: Layer;
|
2229 | }
|
2230 |
|
2231 | export interface LayersControlEvent extends LayerEvent {
|
2232 | name: string;
|
2233 | }
|
2234 |
|
2235 | export interface TileEvent extends LeafletEvent {
|
2236 | tile: HTMLImageElement;
|
2237 | coords: Coords;
|
2238 | }
|
2239 |
|
2240 | export interface TileErrorEvent extends TileEvent {
|
2241 | error: Error;
|
2242 | }
|
2243 |
|
2244 | export interface ResizeEvent extends LeafletEvent {
|
2245 | oldSize: Point;
|
2246 | newSize: Point;
|
2247 | }
|
2248 |
|
2249 | export interface GeoJSONEvent extends LeafletEvent {
|
2250 | layer: Layer;
|
2251 | properties: any;
|
2252 | geometryType: string;
|
2253 | id: string;
|
2254 | }
|
2255 |
|
2256 | export interface PopupEvent extends LeafletEvent {
|
2257 | popup: Popup;
|
2258 | }
|
2259 |
|
2260 | export interface TooltipEvent extends LeafletEvent {
|
2261 | tooltip: Tooltip;
|
2262 | }
|
2263 |
|
2264 | export interface DragEndEvent extends LeafletEvent {
|
2265 | distance: number;
|
2266 | }
|
2267 |
|
2268 | export interface ZoomAnimEvent extends LeafletEvent {
|
2269 | center: LatLng;
|
2270 | zoom: number;
|
2271 | noUpdate: boolean;
|
2272 | }
|
2273 |
|
2274 | export namespace DomEvent {
|
2275 | type EventHandlerFn = (event: Event) => void;
|
2276 |
|
2277 | type PropagableEvent = LeafletMouseEvent | LeafletKeyboardEvent | LeafletEvent | Event;
|
2278 |
|
2279 | function on(el: HTMLElement, types: string, fn: EventHandlerFn, context?: any): typeof DomEvent;
|
2280 |
|
2281 | function on(el: HTMLElement, eventMap: {[eventName: string]: EventHandlerFn}, context?: any): typeof DomEvent;
|
2282 |
|
2283 |
|
2284 | function off(el: HTMLElement): typeof DomEvent;
|
2285 |
|
2286 | function off(el: HTMLElement, types: string, fn: EventHandlerFn, context?: any): typeof DomEvent;
|
2287 |
|
2288 | function off(el: HTMLElement, eventMap: {[eventName: string]: EventHandlerFn}, context?: any): typeof DomEvent;
|
2289 |
|
2290 |
|
2291 | function stopPropagation(ev: PropagableEvent): typeof DomEvent;
|
2292 |
|
2293 | function disableScrollPropagation(el: HTMLElement): typeof DomEvent;
|
2294 |
|
2295 | function disableClickPropagation(el: HTMLElement): typeof DomEvent;
|
2296 |
|
2297 | function preventDefault(ev: Event): typeof DomEvent;
|
2298 |
|
2299 | function stop(ev: PropagableEvent): typeof DomEvent;
|
2300 |
|
2301 | function getMousePosition(ev: MouseEvent, container?: HTMLElement): Point;
|
2302 |
|
2303 | function getWheelDelta(ev: Event): number;
|
2304 |
|
2305 | function addListener(el: HTMLElement, types: string, fn: EventHandlerFn, context?: any): typeof DomEvent;
|
2306 |
|
2307 | function addListener(el: HTMLElement, eventMap: {[eventName: string]: EventHandlerFn}, context?: any): typeof DomEvent;
|
2308 |
|
2309 | function removeListener(el: HTMLElement, types: string, fn: EventHandlerFn, context?: any): typeof DomEvent;
|
2310 |
|
2311 | function removeListener(el: HTMLElement, eventMap: {[eventName: string]: EventHandlerFn}, context?: any): typeof DomEvent;
|
2312 |
|
2313 | function getPropagationPath(ev: Event): HTMLElement[];
|
2314 | }
|
2315 |
|
2316 | export interface DefaultMapPanes {
|
2317 | mapPane: HTMLElement;
|
2318 | tilePane: HTMLElement;
|
2319 | overlayPane: HTMLElement;
|
2320 | shadowPane: HTMLElement;
|
2321 | markerPane: HTMLElement;
|
2322 | tooltipPane: HTMLElement;
|
2323 | popupPane: HTMLElement;
|
2324 | }
|
2325 |
|
2326 | export class Map extends Evented {
|
2327 | constructor(element: string | HTMLElement, options?: MapOptions);
|
2328 | getRenderer(layer: Path): Renderer;
|
2329 |
|
2330 | // Methods for layers and controls
|
2331 | addControl(control: Control): this;
|
2332 | removeControl(control: Control): this;
|
2333 | addLayer(layer: Layer): this;
|
2334 | removeLayer(layer: Layer): this;
|
2335 | hasLayer(layer: Layer): boolean;
|
2336 | eachLayer(fn: (layer: Layer) => void, context?: any): this;
|
2337 | openPopup(popup: Popup): this;
|
2338 | openPopup(content: Content, latlng: LatLngExpression, options?: PopupOptions): this;
|
2339 | closePopup(popup?: Popup): this;
|
2340 | openTooltip(tooltip: Tooltip): this;
|
2341 | openTooltip(content: Content, latlng: LatLngExpression, options?: TooltipOptions): this;
|
2342 | closeTooltip(tooltip?: Tooltip): this;
|
2343 |
|
2344 | // Methods for modifying map state
|
2345 | setView(center: LatLngExpression, zoom?: number, options?: ZoomPanOptions): this;
|
2346 | setZoom(zoom: number, options?: ZoomPanOptions): this;
|
2347 | zoomIn(delta?: number, options?: ZoomOptions): this;
|
2348 | zoomOut(delta?: number, options?: ZoomOptions): this;
|
2349 | setZoomAround(position: Point | LatLngExpression, zoom: number, options?: ZoomOptions): this;
|
2350 | fitBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this;
|
2351 | fitWorld(options?: FitBoundsOptions): this;
|
2352 | panTo(latlng: LatLngExpression, options?: PanOptions): this;
|
2353 | panBy(offset: PointExpression, options?: PanOptions): this;
|
2354 | setMaxBounds(bounds: LatLngBoundsExpression): this;
|
2355 | setMinZoom(zoom: number): this;
|
2356 | setMaxZoom(zoom: number): this;
|
2357 | panInside(latLng: LatLngExpression, options?: PanInsideOptions): this;
|
2358 | panInsideBounds(bounds: LatLngBoundsExpression, options?: PanOptions): this;
|
2359 | /**
|
2360 | * Boolean for animate or advanced ZoomPanOptions
|
2361 | */
|
2362 | invalidateSize(options?: boolean | InvalidateSizeOptions): this;
|
2363 | stop(): this;
|
2364 | flyTo(latlng: LatLngExpression, zoom?: number, options?: ZoomPanOptions): this;
|
2365 | flyToBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this;
|
2366 |
|
2367 | // Other methods
|
2368 | addHandler(name: string, HandlerClass: typeof Handler): this; // Alternatively, HandlerClass: new(map: Map) => Handler
|
2369 | remove(): this;
|
2370 | createPane(name: string, container?: HTMLElement): HTMLElement;
|
2371 | /**
|
2372 | * Name of the pane or the pane as HTML-Element
|
2373 | */
|
2374 | getPane(pane: string | HTMLElement): HTMLElement | undefined;
|
2375 | getPanes(): {[name: string]: HTMLElement} & DefaultMapPanes;
|
2376 | getContainer(): HTMLElement;
|
2377 | whenReady(fn: () => void, context?: any): this;
|
2378 |
|
2379 |
|
2380 | getCenter(): LatLng;
|
2381 | getZoom(): number;
|
2382 | getBounds(): LatLngBounds;
|
2383 | getMinZoom(): number;
|
2384 | getMaxZoom(): number;
|
2385 | getBoundsZoom(bounds: LatLngBoundsExpression, inside?: boolean, padding?: Point): number;
|
2386 | getSize(): Point;
|
2387 | getPixelBounds(): Bounds;
|
2388 | getPixelOrigin(): Point;
|
2389 | getPixelWorldBounds(zoom?: number): Bounds;
|
2390 |
|
2391 |
|
2392 | getZoomScale(toZoom: number, fromZoom?: number): number;
|
2393 | getScaleZoom(scale: number, fromZoom?: number): number;
|
2394 | project(latlng: LatLngExpression, zoom?: number): Point;
|
2395 | unproject(point: PointExpression, zoom?: number): LatLng;
|
2396 | layerPointToLatLng(point: PointExpression): LatLng;
|
2397 | latLngToLayerPoint(latlng: LatLngExpression): Point;
|
2398 | wrapLatLng(latlng: LatLngExpression): LatLng;
|
2399 | wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds;
|
2400 | distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number;
|
2401 | containerPointToLayerPoint(point: PointExpression): Point;
|
2402 | containerPointToLatLng(point: PointExpression): LatLng;
|
2403 | layerPointToContainerPoint(point: PointExpression): Point;
|
2404 | latLngToContainerPoint(latlng: LatLngExpression): Point;
|
2405 | mouseEventToContainerPoint(ev: MouseEvent): Point;
|
2406 | mouseEventToLayerPoint(ev: MouseEvent): Point;
|
2407 | mouseEventToLatLng(ev: MouseEvent): LatLng;
|
2408 |
|
2409 |
|
2410 | locate(options?: LocateOptions): this;
|
2411 | stopLocate(): this;
|
2412 |
|
2413 |
|
2414 | attributionControl: L.Control.Attribution;
|
2415 | boxZoom: Handler;
|
2416 | doubleClickZoom: Handler;
|
2417 | dragging: Handler;
|
2418 | keyboard: Handler;
|
2419 | scrollWheelZoom: Handler;
|
2420 | tap?: Handler | undefined;
|
2421 | touchZoom: Handler;
|
2422 | zoomControl: Control.Zoom;
|
2423 |
|
2424 | options: MapOptions;
|
2425 | }
|
2426 |
|
2427 |
|
2428 |
|
2429 |
|
2430 | export function map(element: string | HTMLElement, options?: MapOptions): Map;
|
2431 |
|
2432 | export interface BaseIconOptions extends LayerOptions {
|
2433 | iconUrl?: string | undefined;
|
2434 | iconRetinaUrl?: string | undefined;
|
2435 | iconSize?: PointExpression | undefined;
|
2436 | iconAnchor?: PointExpression | undefined;
|
2437 | popupAnchor?: PointExpression | undefined;
|
2438 | tooltipAnchor?: PointExpression | undefined;
|
2439 | shadowUrl?: string | undefined;
|
2440 | shadowRetinaUrl?: string | undefined;
|
2441 | shadowSize?: PointExpression | undefined;
|
2442 | shadowAnchor?: PointExpression | undefined;
|
2443 | className?: string | undefined;
|
2444 | }
|
2445 |
|
2446 | export interface IconOptions extends BaseIconOptions {
|
2447 | iconUrl: string;
|
2448 | crossOrigin?: CrossOrigin | boolean | undefined;
|
2449 | }
|
2450 |
|
2451 | export class Icon<T extends BaseIconOptions = IconOptions> extends Layer {
|
2452 | constructor(options: T);
|
2453 | createIcon(oldIcon?: HTMLElement): HTMLElement;
|
2454 | createShadow(oldIcon?: HTMLElement): HTMLElement;
|
2455 |
|
2456 | options: T;
|
2457 | }
|
2458 |
|
2459 | export namespace Icon {
|
2460 | interface DefaultIconOptions extends BaseIconOptions {
|
2461 | imagePath?: string | undefined;
|
2462 | }
|
2463 |
|
2464 | class Default extends Icon<DefaultIconOptions> {
|
2465 | static imagePath?: string | undefined;
|
2466 | constructor(options?: DefaultIconOptions);
|
2467 | }
|
2468 | }
|
2469 |
|
2470 | export function icon(options: IconOptions): Icon;
|
2471 |
|
2472 | export interface DivIconOptions extends BaseIconOptions {
|
2473 | html?: string | HTMLElement | false | undefined;
|
2474 | bgPos?: PointExpression | undefined;
|
2475 | iconSize?: PointExpression | undefined;
|
2476 | iconAnchor?: PointExpression | undefined;
|
2477 | popupAnchor?: PointExpression | undefined;
|
2478 | className?: string | undefined;
|
2479 | }
|
2480 |
|
2481 | export class DivIcon extends Icon<DivIconOptions> {
|
2482 | constructor(options?: DivIconOptions);
|
2483 | }
|
2484 |
|
2485 | export function divIcon(options?: DivIconOptions): DivIcon;
|
2486 |
|
2487 | export interface MarkerOptions extends InteractiveLayerOptions {
|
2488 | icon?: Icon | DivIcon | undefined;
|
2489 |
|
2490 | draggable?: boolean | undefined;
|
2491 |
|
2492 | keyboard?: boolean | undefined;
|
2493 |
|
2494 | title?: string | undefined;
|
2495 |
|
2496 | alt?: string | undefined;
|
2497 |
|
2498 | zIndexOffset?: number | undefined;
|
2499 |
|
2500 | opacity?: number | undefined;
|
2501 |
|
2502 | riseOnHover?: boolean | undefined;
|
2503 |
|
2504 | riseOffset?: number | undefined;
|
2505 |
|
2506 | shadowPane?: string | undefined;
|
2507 |
|
2508 | autoPan?: boolean | undefined;
|
2509 |
|
2510 | autoPanPadding?: PointExpression | undefined;
|
2511 |
|
2512 | autoPanSpeed?: number | undefined;
|
2513 | autoPanOnFocus?: boolean | undefined;
|
2514 | }
|
2515 |
|
2516 | export class Marker<P = any> extends Layer {
|
2517 | constructor(latlng: LatLngExpression, options?: MarkerOptions);
|
2518 | toGeoJSON(precision?: number | false): geojson.Feature<geojson.Point, P>;
|
2519 | getLatLng(): LatLng;
|
2520 | setLatLng(latlng: LatLngExpression): this;
|
2521 | setZIndexOffset(offset: number): this;
|
2522 | getIcon(): Icon | DivIcon;
|
2523 | setIcon(icon: Icon | DivIcon): this;
|
2524 | setOpacity(opacity: number): this;
|
2525 | getElement(): HTMLElement | undefined;
|
2526 |
|
2527 | // Properties
|
2528 | options: MarkerOptions;
|
2529 | dragging?: Handler | undefined;
|
2530 | feature?: geojson.Feature<geojson.Point, P> | undefined;
|
2531 |
|
2532 | protected _shadow: HTMLElement | undefined;
|
2533 | }
|
2534 |
|
2535 | export function marker(latlng: LatLngExpression, options?: MarkerOptions): Marker;
|
2536 |
|
2537 | export namespace Browser {
|
2538 |
|
2539 | const ie: boolean;
|
2540 | const ielt9: boolean;
|
2541 | const edge: boolean;
|
2542 | const webkit: boolean;
|
2543 | const android: boolean;
|
2544 | const android23: boolean;
|
2545 | const androidStock: boolean;
|
2546 | const opera: boolean;
|
2547 | const chrome: boolean;
|
2548 | const gecko: boolean;
|
2549 | const safari: boolean;
|
2550 | const opera12: boolean;
|
2551 | const win: boolean;
|
2552 | const ie3d: boolean;
|
2553 | const webkit3d: boolean;
|
2554 | const gecko3d: boolean;
|
2555 | const any3d: boolean;
|
2556 | const mobile: boolean;
|
2557 | const mobileWebkit: boolean;
|
2558 | const mobileWebkit3d: boolean;
|
2559 | const msPointer: boolean;
|
2560 | const pointer: boolean;
|
2561 | const touch: boolean;
|
2562 | const mobileOpera: boolean;
|
2563 | const mobileGecko: boolean;
|
2564 | const retina: boolean;
|
2565 | const canvas: boolean;
|
2566 | const svg: boolean;
|
2567 | const vml: boolean;
|
2568 | }
|
2569 |
|
2570 | export namespace Util {
|
2571 | function extend<D extends object, S1 extends object = {}>(dest: D, src?: S1): D & S1;
|
2572 | function extend<D extends object, S1 extends object, S2 extends object>(dest: D, src1: S1, src2: S2): D & S1 & S2;
|
2573 | function extend<D extends object, S1 extends object, S2 extends object, S3 extends object>(dest: D, src1: S1, src2: S2, src3: S3): D & S1 & S2 & S3;
|
2574 | function extend(dest: any, ...src: any[]): any;
|
2575 |
|
2576 | function create(proto: object | null, properties?: PropertyDescriptorMap): any;
|
2577 | function bind(fn: (...args: any[]) => void, ...obj: any[]): () => void;
|
2578 | function stamp(obj: any): number;
|
2579 | function throttle(fn: () => void, time: number, context: any): () => void;
|
2580 | function wrapNum(num: number, range: number[], includeMax?: boolean): number;
|
2581 | function falseFn(): false;
|
2582 | function formatNum(num: number, digits?: number | false): number;
|
2583 | function trim(str: string): string;
|
2584 | function splitWords(str: string): string[];
|
2585 | function setOptions(obj: any, options: any): any;
|
2586 | function getParamString(obj: any, existingUrl?: string, uppercase?: boolean): string;
|
2587 | function template(str: string, data: any): string;
|
2588 | function isArray(obj: any): boolean;
|
2589 | function indexOf(array: any[], el: any): number;
|
2590 | function requestAnimFrame(fn: (timestamp: number) => void, context?: any, immediate?: boolean): number;
|
2591 | function cancelAnimFrame(id: number): void;
|
2592 |
|
2593 | let lastId: number;
|
2594 | let emptyImageUrl: string;
|
2595 | }
|
2596 |
|
2597 | export const extend: typeof Util['extend'];
|
2598 | export const bind: typeof Util['bind'];
|
2599 | export const stamp: typeof Util['stamp'];
|
2600 | export const setOptions: typeof Util['setOptions'];
|
2601 |
|
2602 | export function noConflict(): any;
|