From d9a282f5288049fe3148dc8d0cfbb6a947a67b96 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 16:59:09 -0700 Subject: [PATCH] Fix excess object literal errors in 'leaflet'. --- leaflet/leaflet-tests.ts | 3 +-- leaflet/leaflet.d.ts | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/leaflet/leaflet-tests.ts b/leaflet/leaflet-tests.ts index 4c8fd4d73f..6bec7e2173 100755 --- a/leaflet/leaflet-tests.ts +++ b/leaflet/leaflet-tests.ts @@ -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, diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 92aed79b77..56d702485f 100755 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -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; } }