mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add new wrapLng options value https://github.com/danwild/Leaflet.MousePosition/pull/1 * Update Definitions by * Add new formatter options value https://github.com/danwild/Leaflet.MousePosition/pull/2
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
// Type definitions for leaflet-mouse-position 1.2
|
|
// Project: https://github.com/danwild/Leaflet.MousePosition
|
|
// Definitions by: Hanyon <https://github.com/Hanyon>
|
|
// Håkon <https://github.com/hlovdal>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
import { ControlOptions, Control as LControl } from 'leaflet';
|
|
|
|
declare module 'leaflet' {
|
|
interface MapOptions {
|
|
positionControl?: boolean;
|
|
}
|
|
|
|
namespace control {
|
|
function mousePosition(options?: Control.MousePositionControlOptions): Control.MousePosition;
|
|
}
|
|
|
|
namespace Control {
|
|
interface MousePositionControlOptions extends ControlOptions {
|
|
separator?: string;
|
|
emptyString?: string;
|
|
lngFirst?: boolean;
|
|
numDigits?: number;
|
|
lngFormatter?: (lng: number) => string;
|
|
latFormatter?: (lat: number) => string;
|
|
formatter?: (lng: number, lat: number) => string;
|
|
prefix?: string;
|
|
wrapLng?: boolean;
|
|
}
|
|
|
|
class MousePosition extends LControl {
|
|
options: MousePositionControlOptions;
|
|
|
|
constructor(options?: MousePositionControlOptions);
|
|
}
|
|
}
|
|
}
|