mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #15513 from DenisCarriere/leaflet.locatecontrol
leaflet.locatecontrol - remove useless package.json
This commit is contained in:
+29
-31
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Leaflet.locate 0.60
|
||||
// Type definitions for leaflet.locatecontrol 0.60
|
||||
// Project: https://github.com/domoritz/leaflet-locatecontrol
|
||||
// Definitions by: Denis Carriere <https://github.com/DenisCarriere>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -7,39 +7,37 @@
|
||||
|
||||
declare namespace L {
|
||||
namespace Control {
|
||||
export interface Locate extends L.Control {}
|
||||
export interface LocateOptions {
|
||||
position?: string
|
||||
layer?: L.Layer
|
||||
setView?: boolean | string
|
||||
flyTo?: boolean
|
||||
keepCurrentZoomLevel?: boolean
|
||||
clickBehavior?: any
|
||||
returnToPrevBounds?: boolean
|
||||
cacheLocation?: boolean
|
||||
drawCircle?: boolean
|
||||
drawMarker?: boolean
|
||||
markerClass?: any
|
||||
circleStyle?: L.PathOptions
|
||||
markerStyle?: L.PathOptions
|
||||
followCircleStyle?: L.PathOptions
|
||||
followMarkerStyle?: L.PathOptions
|
||||
icon?: string
|
||||
iconLoading?: string
|
||||
iconElementTag?: string
|
||||
circlePadding?: number[]
|
||||
onLocationError?: any
|
||||
onLocationOutsideMapBounds?: any
|
||||
showPopup?: boolean
|
||||
strings?: any
|
||||
locateOptions?: L.LocateOptions
|
||||
interface LocateOptions {
|
||||
position?: string;
|
||||
layer?: L.Layer;
|
||||
setView?: boolean | string;
|
||||
flyTo?: boolean;
|
||||
keepCurrentZoomLevel?: boolean;
|
||||
clickBehavior?: any;
|
||||
returnToPrevBounds?: boolean;
|
||||
cacheLocation?: boolean;
|
||||
drawCircle?: boolean;
|
||||
drawMarker?: boolean;
|
||||
markerClass?: any;
|
||||
circleStyle?: L.PathOptions;
|
||||
markerStyle?: L.PathOptions;
|
||||
followCircleStyle?: L.PathOptions;
|
||||
followMarkerStyle?: L.PathOptions;
|
||||
icon?: string;
|
||||
iconLoading?: string;
|
||||
iconElementTag?: string;
|
||||
circlePadding?: number[];
|
||||
onLocationError?: any;
|
||||
onLocationOutsideMapBounds?: any;
|
||||
showPopup?: boolean;
|
||||
strings?: any;
|
||||
locateOptions?: L.LocateOptions;
|
||||
}
|
||||
}
|
||||
|
||||
namespace control {
|
||||
/**
|
||||
* Creates a Leaflet.Locate control
|
||||
*/
|
||||
export function locate(options?: Control.LocateOptions): L.Control.Locate;
|
||||
* Creates a Leaflet.Locate control
|
||||
*/
|
||||
function locate(options?: Control.LocateOptions): L.Control;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var map = L.map('map', {
|
||||
const map = L.map('map', {
|
||||
center: [51.505, -0.09],
|
||||
zoom: 13
|
||||
});
|
||||
@@ -7,7 +7,7 @@ var map = L.map('map', {
|
||||
L.control.locate().addTo(map);
|
||||
|
||||
// Simple
|
||||
var lc = L.control.locate({
|
||||
const lc = L.control.locate({
|
||||
position: 'topright',
|
||||
strings: {
|
||||
title: "Show me where I am, yo!"
|
||||
@@ -19,4 +19,4 @@ map.addControl(L.control.locate({
|
||||
locateOptions: {
|
||||
maxZoom: 10,
|
||||
enableHighAccuracy: true
|
||||
}}));
|
||||
}}));
|
||||
|
||||
Reference in New Issue
Block a user