mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
Fix excess object literal errors in 'leaflet'.
This commit is contained in:
@@ -186,7 +186,7 @@ map.once('contextmenu', (e: L.LeafletMouseEvent) => {
|
||||
|
||||
var marker = L.marker(L.latLng(42, 51), {
|
||||
icon: L.icon({
|
||||
iconURl: 'roger.png',
|
||||
iconUrl: 'roger.png',
|
||||
iconRetinaUrl: 'roger-retina.png',
|
||||
iconSize: L.point(40, 40),
|
||||
iconAnchor: L.point(20, 0),
|
||||
@@ -264,7 +264,6 @@ popup.setLatLng(L.latLng(12, 54)).setContent('this is nice popup').openOn(map);
|
||||
popup.update();
|
||||
|
||||
var tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}', {
|
||||
foo: 'bar',
|
||||
minZoom: 0,
|
||||
maxZoom: 18,
|
||||
maxNativeZoom: 17,
|
||||
|
||||
31
leaflet/leaflet.d.ts
vendored
31
leaflet/leaflet.d.ts
vendored
@@ -264,6 +264,11 @@ declare module L {
|
||||
|
||||
declare module L {
|
||||
export interface ClassExtendOptions {
|
||||
/**
|
||||
* Your class's constructor function, meaning that it gets called when you do 'new MyClass(...)'.
|
||||
*/
|
||||
initialize?: Function;
|
||||
|
||||
/**
|
||||
* options is a special property that unlike other objects that you pass
|
||||
* to extend will be merged with the parent one instead of overriding it
|
||||
@@ -286,6 +291,8 @@ declare module L {
|
||||
* constants.
|
||||
*/
|
||||
static?: any;
|
||||
|
||||
[prop: string]: any;
|
||||
}
|
||||
|
||||
export interface ClassStatic {
|
||||
@@ -3592,6 +3599,11 @@ declare module L {
|
||||
*/
|
||||
autoPan?: boolean;
|
||||
|
||||
/**
|
||||
* Set it to true if you want to prevent users from panning the popup off of the screen while it is open.
|
||||
*/
|
||||
keepInView?: boolean;
|
||||
|
||||
/**
|
||||
* Controls the presense of a close button in the popup.
|
||||
*
|
||||
@@ -3645,6 +3657,11 @@ declare module L {
|
||||
* option).
|
||||
*/
|
||||
closeOnClick?: boolean;
|
||||
|
||||
/**
|
||||
* A custom class name to assign to the popup.
|
||||
*/
|
||||
className?: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4064,6 +4081,11 @@ declare module L {
|
||||
* Default value: false.
|
||||
*/
|
||||
reuseTiles?: boolean;
|
||||
|
||||
/**
|
||||
* When this option is set, the TileLayer only loads tiles that are in the given geographical bounds.
|
||||
*/
|
||||
bounds?: LatLngBounds;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4219,13 +4241,12 @@ declare module L {
|
||||
declare module L {
|
||||
|
||||
export interface ZoomOptions {
|
||||
|
||||
/**
|
||||
* The position of the control (one of the map corners). See control positions.
|
||||
*
|
||||
* Default value: 'topright'.
|
||||
* If not specified, zoom animation will happen if the zoom origin is inside the current view.
|
||||
* If true, the map will attempt animating zoom disregarding where zoom origin is.
|
||||
* Setting false will make it always reset the view completely without animation.
|
||||
*/
|
||||
position?: string;
|
||||
animate?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user