@types/leaflet.locatecontrol
TypeScript icon, indicating that this package has built-in type declarations

0.74.4 • Public • Published

Installation

npm install --save @types/leaflet.locatecontrol

Summary

This package contains type definitions for leaflet.locatecontrol (https://github.com/domoritz/leaflet-locatecontrol).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet.locatecontrol.

index.d.ts

import * as L from "leaflet";

declare module "leaflet" {
    namespace Control {
        class Locate extends Control {
            constructor(locateOptions?: LocateOptions);
            onAdd(map: Map): HTMLElement;
            start(): void;
            stop(): void;
            stopFollowing(): void;
            setView(): void;
        }
        interface LocateOptions {
            position?: string | undefined;
            layer?: Layer | undefined;
            setView?: boolean | string | undefined;
            keepCurrentZoomLevel?: boolean | undefined;
            initialZoomLevel?: number | boolean | undefined;
            flyTo?: boolean | undefined;
            clickBehavior?: any;
            returnToPrevBounds?: boolean | undefined;
            cacheLocation?: boolean | undefined;
            drawCircle?: boolean | undefined;
            drawMarker?: boolean | undefined;
            showCompass?: boolean | undefined;
            markerClass?: any;
            compassClass?: any;
            circleStyle?: PathOptions | undefined;
            markerStyle?: PathOptions | MarkerOptions | undefined;
            compassStyle?: PathOptions | undefined;
            followCircleStyle?: PathOptions | undefined;
            followMarkerStyle?: PathOptions | undefined;
            icon?: string | undefined;
            iconLoading?: string | undefined;
            iconElementTag?: string | undefined;
            textElementTag?: string | undefined;
            circlePadding?: number[] | undefined;
            metric?: boolean | undefined;
            createButtonCallback?: ((container: HTMLDivElement, options: LocateOptions) => void) | undefined;
            onLocationError?: ((event: ErrorEvent, control: Locate) => void) | undefined;
            onLocationOutsideMapBounds?: ((control: Locate) => void) | undefined;
            showPopup?: boolean | undefined;
            strings?: StringsOptions | undefined;
            locateOptions?: L.LocateOptions | undefined;
        }
        interface StringsOptions {
            title?: string | undefined;
            metersUnit?: string | undefined;
            feetUnit?: string | undefined;
            popup?: string | undefined;
            outsideMapBoundsMsg?: string | undefined;
        }
    }

    namespace control {
        /**
         * Creates a Leaflet.Locate control
         */
        function locate(options?: Control.LocateOptions): Control.Locate;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/leaflet

Credits

These definitions were written by Denis Carriere.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/leaflet.locatecontrol

Weekly Downloads

4,654

Version

0.74.4

License

MIT

Unpacked Size

7.67 kB

Total Files

5

Last publish

Collaborators

  • types