Commit Graph

92 Commits

Author SHA1 Message Date
Alejandro Sánchez
5f742ae17e Added GeoJSON types (#11795) 2016-10-06 14:14:57 -07:00
Schwobaland
384a4f4a5d fixed setMaxBounds to match maxBounds in MapOptions (#11738)
* fixed setMaxBounds to match maxBounds in MapOptions

* comment removed and splitted into two overloads.
2016-10-06 23:32:53 +09:00
Garth Kidd
8a47541d7e Fix leaflet L.GeoJSON.addData et al (#11590) (#11591) 2016-10-03 21:28:13 +09:00
Derrick Liu
ed9f34a012 Add docstrings, implement additional items from the Evented docs, fix typos 2016-09-23 10:32:26 -07:00
Derrick Liu
9e9ffce813 Add docstrings for LayerGroup 2016-09-23 10:31:07 -07:00
Derrick Liu
a61388dd5e Feature group docstrings, make layers param optional in feature group constructor 2016-09-23 10:30:05 -07:00
Derrick Liu
bfdb74d849 Tighten up some types for coord conversion 2016-09-23 10:29:27 -07:00
Derrick Liu
e0c6192ab7 Add GeoJSON interface docstrings, add missing functions from docs, and fix some typos 2016-09-23 10:26:55 -07:00
Derrick Liu
b940d7fbf6 Add geojson constructor docstring 2016-09-23 10:22:38 -07:00
Alejandro Sánchez
b06d7f0dd9 Added more definitions 2016-09-23 09:46:10 -06:00
Alejandro Sánchez
1adaa22d7a [WIP] Add type definitions for Leaflet 1.0 (#11165)
* Rename leaflet.d.ts to leaflet-0.7.d.ts

* Defined several important interfaces and the skeleton of some others

* Started adding tests

* Added more interfaces, factory methods and tests

* Implemented other interfaces and nested namespaces

* Added more types
2016-09-19 16:07:25 +09:00
Ryan Cavanaugh
3e6c11ba0d Merge pull request #9898 from kunnix/patch-1
Update leaflet.d.ts: Fixed DivIconOptions
2016-06-30 11:04:43 -07:00
Benoit V
08d59f985e Update leaflet.d.ts: TileLayerOptions
subdomains: String or String[].

Description: Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.

Documentation: http://leafletjs.com/reference.html
2016-06-30 16:15:19 +02:00
Benoit V
a0c70381ea Update leaflet.d.ts: Fixed DivIconOptions
Updated DivIconOptions to reflect documentation (http://leafletjs.com/reference.html#divicon).

Two changes:

  - "All Leaflet methods and options that accept Point objects also accept them in a simple Array form (unless noted otherwise)"
  - DivIconOptions accepts an optional popupAnchor property.
2016-06-30 13:52:27 +02:00
Mohamed Hegazy
12eb92a0cd Merge pull request #9586 from Sequoia/master
Adding actual GeoJSON types to getGeoJSON fns
2016-06-20 15:30:14 -07:00
Hagai
756973e248 add some definitions for leaflet 1.0.0 (#9659)
* add some definitions I'm using from leaflet 1.0.0

* revert private members

* add more paramters of ZoomPanOptions
Add PositionString as type for leaflet position
2016-06-19 11:18:32 +09:00
Brandon Fish
aa8f544267 Make LatLng.wrap function arguments optional (#9599)
It appears that LatLng.wrap arguments are optional and default values are used when they are not given: http://leafletjs.com/reference.html#latlng-wrap
2016-06-13 23:40:25 +09:00
Sequoia McDowell
04669eee02 Adding actual GeoJSON types to getGeoJSON fns
Previously returned `any` which was not accurate
2016-06-07 13:39:21 -04:00
Kevin Visscher
22d18908f7 Add option that can be set for CircleMarker (#8912) 2016-04-12 23:21:16 +09:00
Masahiro Wakame
36ccf2a567 Merge pull request #8240 from pwilczynski/bugfix/leafletClipSegment
Fix typings for Leaflet.LineUtils.clipSegement()
2016-03-31 01:08:43 +09:00
vvakame
7de6c3dd94 Merge branch 'master' into rename-repo-url 2016-03-17 21:06:54 +09:00
vvakame
14fe4313f4 replace internal module to namespace 2016-03-17 02:18:10 +09:00
vvakame
56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
vvakame
39f22f95a3 change permission 0755 to 0644 2016-03-10 23:03:55 +09:00
Peter Wilczynski
71022e82f1 Fix typings for Leaflet.LineUtils.clipSegement() 2016-02-24 09:07:09 -08:00
Horiuchi_H
bc92442c07 change CRLF to LF 2016-02-08 12:01:16 +09:00
Horiuchi_H
49b044db23 Merge pull request #7925 from webbiesdk/leafletNoThatsNotTheSyntax
Leaflet: Wrong syntax.
2016-02-05 10:56:35 +09:00
Horiuchi_H
d9d6a23b68 Merge pull request #7923 from webbiesdk/leafetNotEveryClassExtendsClass
Leaflet: Not every class constructor inherits fields from the default ClassStatic
2016-02-05 10:53:31 +09:00
Horiuchi_H
2c765aea5e Merge pull request #7921 from webbiesdk/leafletRemovedNonExistingFunction
Leaflet: Removed a function that doesn't exist.
2016-02-05 10:52:18 +09:00
Erik Krogh Kristensen
5c5e202bce Leaflet: Wrong syntax. 2016-02-01 17:03:20 +01:00
Erik Krogh Kristensen
7c9e75f7c0 Not every class constructor inherits fields from the default ClassStatic. 2016-02-01 16:42:19 +01:00
Erik Krogh Kristensen
4d7c434b6b Leaflet: Removed a function that doesn't exist. 2016-02-01 15:37:44 +01:00
Erik Krogh Kristensen
7a5d7b12cd Leaflet: MultiPolygon was misspelled as MultiPolylgon. 2016-02-01 15:29:04 +01:00
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