Commit Graph

59 Commits

Author SHA1 Message Date
Andrzej Gis
b2ee74c4c7 Add L.Map.eachLayer method typing 2015-12-07 18:34:03 +01:00
Basarat Ali Syed
aed176536a Merge pull request #6694 from lediur/patch-1
Allow for custom keys in TileLayerOptions
2015-11-15 12:04:46 +11:00
Derrick Liu
5a1b81b6b8 Allow for custom keys in TileLayerOptions
According to https://github.com/Microsoft/TypeScript/issues/3755, properties not previously defined in a type will now be marked as errors during compilation in TypeScript 1.6 and later. 

Since a TileLayerOptions object is dynamically evaluated for custom properties that might be used in a provided tile URL template, the TypeScript change breaks this functionality.

The proposed change adds a string indexer (one of the suggested changes in the link above), which fixes the issue.
2015-11-09 20:14:06 -08:00
Martin D
b6e9e60849 Update leaflet.d.ts
Clearer syntax
2015-11-05 09:30:42 -05:00
Martin D
34b2fc23d8 IconOptions to accept arrays and point objects
All Leaflet methods and options that accept Point objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:

http://leafletjs.com/reference.html#point
2015-10-27 16:43:24 -04:00
Masahiro Wakame
18052c07df Merge pull request #5902 from rimig/leaflet-layercontrolevent
Leaflet: Add LeafletLayersControlEvent
2015-09-27 10:44:37 +09:00
Robert Imig
46816bd92d Leaflet: Add LeafletLayersControlEvent 2015-09-18 14:12:25 -04:00
Daniel Rosenwasser
0842cf93ef Namespaces are one honking great idea -- let's do more of those in 'leaflet'. 2015-09-17 15:16:55 -07:00
Daniel Rosenwasser
71a002c31c Added test for 'L.control.zoom' in 'leaflet'. 2015-09-17 15:15:44 -07:00
Daniel Rosenwasser
9f812bdeed Tabs to spaces for consistency with .d.ts. 2015-09-17 15:07:49 -07:00
Daniel Rosenwasser
1831947dda module -> namespace in 'leaflet'. 2015-09-17 14:51:38 -07:00
Daniel Rosenwasser
d9a282f528 Fix excess object literal errors in 'leaflet'. 2015-08-12 16:59:16 -07:00
Jiayu Liu
3178b58f3b PathOptions.pointerEvents
PathOptions.pointerEvents should be string instead of boolean, see http://leafletjs.com/reference.html#path-pointerevents and https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
2015-06-29 17:07:07 -07:00
Masahiro Wakame
03ec16694a Merge pull request #4649 from Jimexist/patch-2
PolylineOptions should extend PathOption
2015-06-23 01:55:25 +09:00
Jiayu Liu
61a910b70f Canvas should extend TileLayer
As per [document](http://leafletjs.com/reference.html#tilelayer-canvas), the `Canvas` interface should extend `TileLayer`
2015-06-15 17:23:06 -07:00
Jiayu Liu
257f64d394 PolylineOptions should extend PathOption
`PolylineOptions` should extend `PathOptions`, so that user could supply options in the base class
2015-06-15 11:32:45 -07:00
Jiayu Liu
70e7942287 L.LineUtil.closestPointOnSegment update
[L.LineUtil.closestPointOnSegment](http://leafletjs.com/reference.html#lineutil-closestpointonsegment) should return L.Point rather than number
2015-06-09 15:06:04 -07:00
Joseph Rossi
0dc8eda72d Leaflet: Adding LatLngExpress and LatLngBounds expression types
According to the leaflet documentation latLng objects can be specified
using one of three notations (http://leafletjs.com/reference.html#latlng).
The type definition for LatLngExpression addresses this.  Additonally,
LatLngBounds can be represented as an array of LatLng expressions
(https://github.com/Leaflet/Leaflet/blob/master/src/geo/LatLngBounds.js#L18).
The type LatLngBoundsExpression reflects this property.
2015-04-15 16:50:25 -04:00
Jason Plante
ccbabf73c7 Added cardinal properties to L.LatLngBounds
Added the following property methods to the L.LatLngBounds class:
getWest()
getEast()
getNorth()
getSouth()
2015-04-13 13:34:15 -04:00
Tobias Bengfort
7e957ea49b Strip Whitespace 2015-03-25 16:56:11 +01:00
Tobias Bengfort
1fa293c651 coordsToLatLngs may take number[] or number[][] or number[][][]... 2015-03-25 16:55:49 +01:00
Tobias Bengfort
ce9ef6f36e fix capitalization error 2015-03-25 16:55:12 +01:00
Wim Looman
6b9d4f648b Add test/example of semi-typesafe extending of leaflet classes 2015-02-22 18:07:29 +13:00
Wim Looman
45246054b2 Use static interfaces for constructors to allow extend access 2015-02-13 10:38:04 +13:00
Wim Looman
427d97003e Change leaflet to use interfaces to allow for plugins 2015-02-12 16:22:00 +13:00
Yang Guan
343b20868e Update typing files for leaflet 2015-01-09 13:51:38 -08:00
Masahiro Wakame
18ae0809e8 Merge pull request #2963 from enternet/patch-1
Minor fixes
2014-10-14 11:15:57 +09:00
enternet
e43d77cffb Minor fixes
1) GeoJSON.setStyle(style: PathOptions)
2) trim(str: string): string
2) CRLF missed
2014-10-13 16:53:06 +03:00
Marcin Bancerz
016cf44355 WMS extends TileLayer
WMS extends TileLayer as described:
http://leafletjs.com/reference.html#tilelayer-wms
2014-10-13 13:55:46 +02:00
Geir Sagberg
7bf79bf1e6 Changed doubleClickZoom and scrollWheelZoom
Set type to 'boolean' to match docs.
2014-10-01 21:51:09 +02:00
Geir Sagberg
c66733739b Change doubleClickZoom to any type
Was getting an error when setting doubleClickZoom to a boolean, which is valid.
2014-09-30 15:32:12 +02:00
Adrien Bustany
21a0b97dd7 Leaflet: Allow using as an AMD module 2014-08-23 22:59:58 +02:00
Antoine Pultier
c1858577da [Leaflet] on and off alias for L.DomEvent 2014-08-07 10:42:43 +02:00
Antoine Pultier
54d719d86e [Leaflet] Optional context argument in L.DomEvent.removeListener 2014-08-07 10:42:05 +02:00
Antoine Pultier
1cbee878f7 [leaflet] Brand new test file 2014-08-04 13:09:19 +02:00
Antoine Pultier
bc1961484a [leaflet] small adjustments 2014-08-04 13:08:49 +02:00
Antoine Pultier
5c2007a539 TypeScript validity 2014-08-04 11:20:14 +02:00
Antoine Pultier
4d014a4860 Leaflet: L.Mixin.Events 2014-07-29 16:17:55 +02:00
Antoine Pultier
c11810a1cc L.Handler object 2014-07-29 15:55:02 +02:00
Antoine Pultier
4394dc65a2 API update (version 0.7.3) 2014-07-29 15:43:41 +02:00
CyberFoxHax
2cc004f73a More generics
Forgot T in some places
2014-05-29 18:05:15 +02:00
CyberFoxHax
d3ecd95554 Generics
I have to ask why collection layers aren't generic.
2014-05-29 17:55:13 +02:00
Adrien Bustany
3a28f34a97 Leaflet: Fix the L.tileLayer function typing
The current version was being rejected by Typescript 1.0. The new typing
follows the advice from the Handbook.
2014-04-17 17:12:34 +02:00
Derek Cicerone
42f347283f Leaflet: fix default icon constructor
This fix allows this code (which worked in an earlier version):

var icon = new L.Icon.Default();
2014-01-23 14:44:50 -05:00
Drew Noakes
5c7636a1f1 Missing semicolons and consistent whitespace 2013-11-28 10:58:50 +00:00
Vladimir Zotov
db1949e95b updated to 0.6.4 2013-11-07 14:55:25 +04:00
bolkhovsky
1ebd49703a Fix Leaflet TileLayer.WMS class definition 2013-10-31 11:46:43 +04:00
Derek Cicerone
b03290184e Fix the typing of L.Icon.Default
This wasn't quite right and the 'develop' branch of the TypeScript compiler no longer accepted the hacky typing.  This should be the correct typing according to information from the TS team here:
https://typescript.codeplex.com/workitem/132
2013-10-13 15:11:26 -04:00
Derek Cicerone
5b00360b17 Fix future bugs in leaflet.d.ts
The 'develop' TypeScript compiler is pickier about generics being fully specified.  In this case, 3 arrays could be more specific about the type of elements.
2013-10-11 20:40:00 -04:00
Diullei Gomes
6b55a91e93 Merge pull request #1058 from flxf/icondefault
Leaflet Icon.Default returns an object that extends from Icon
2013-09-18 06:57:52 -07:00