@types/leaflet
Advanced tools
Comparing version 1.0.41 to 1.0.42
@@ -820,28 +820,8 @@ // Type definitions for Leaflet.js 1.0.2 | ||
/** | ||
* Represents a GeoJSON object or an array of GeoJSON objects. | ||
* Allows you to parse GeoJSON data and display it on the map. Extends FeatureGroup. | ||
*/ | ||
export interface GeoJSON extends FeatureGroup { | ||
export class GeoJSON { | ||
/** | ||
* Adds a GeoJSON object to the layer. | ||
*/ | ||
addData(data: GeoJSON.GeoJsonObject): Layer; | ||
/** | ||
* Resets the given vector layer's style to the original GeoJSON style, | ||
* useful for resetting style after hover events. | ||
*/ | ||
resetStyle(layer: Layer): Layer; | ||
/** | ||
* Changes styles of GeoJSON vector layers with the given style function. | ||
*/ | ||
setStyle(style: StyleFunction): this; | ||
/** | ||
* Creates a Layer from a given GeoJSON feature. Can use a custom pointToLayer | ||
* and/or coordsToLatLng functions if provided as options. | ||
*/ | ||
geometryToLayer(featureData: GeoJSON.Feature<GeoJSON.GeometryObject>, options?: GeoJSONOptions): Layer; | ||
static geometryToLayer(featureData: GeoJSON.Feature<GeoJSON.GeometryObject>, options?: GeoJSONOptions): Layer; | ||
@@ -852,6 +832,4 @@ /** | ||
*/ | ||
coordsToLatLng(coords: [number, number]): LatLng; | ||
static coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng; | ||
coordsToLatLng(coords: [number, number, number]): LatLng; | ||
/** | ||
@@ -863,3 +841,6 @@ * Creates a multidimensional array of LatLngs from a GeoJSON coordinates array. | ||
*/ | ||
coordsToLatLngs(coords: Array<number>, levelsDeep?: number, coordsToLatLng?: (coords: [number, number] | [number, number, number]) => LatLng): LatLng[]; // Not entirely sure how to define arbitrarily nested arrays | ||
static coordsToLatLngs( | ||
coords: any[], | ||
levelsDeep?: number, | ||
coordsToLatLng?: (coords: [number, number] | [number, number, number]) => LatLng): any[]; // Using any[] to avoid artificially limiting valid calls | ||
@@ -869,4 +850,5 @@ /** | ||
*/ | ||
latLngToCoords(latlng: LatLng): [number, number] | [number, number, number]; | ||
static latLngToCoords(latlng: LatLng): [number, number, number]; // A three tuple can be assigned to a two or three tuple | ||
/** | ||
@@ -877,3 +859,3 @@ * Reverse of coordsToLatLngs closed determines whether the first point should be | ||
*/ | ||
latLngsToCoords(latlngs: Array<LatLng>, levelsDeep?: number, closed?: boolean): [number, number] | [number, number, number]; | ||
static latLngsToCoords(latlngs: any[], levelsDeep?: number, closed?: boolean): any[]; // Using any[] to avoid artificially limiting valid calls | ||
@@ -883,8 +865,32 @@ /** | ||
*/ | ||
asFeature(geojson: GeoJSON.GeometryObject): GeoJSON.Feature<GeoJSON.GeometryObject>; | ||
static asFeature(geojson: GeoJSON.GeometryObject): GeoJSON.Feature<GeoJSON.GeometryObject>; | ||
asFeature(geojson: GeoJSON.Feature<GeoJSON.GeometryObject>): GeoJSON.Feature<GeoJSON.GeometryObject>; | ||
static asFeature(geojson: GeoJSON.Feature<GeoJSON.GeometryObject>): GeoJSON.Feature<GeoJSON.GeometryObject>; | ||
} | ||
/** | ||
* Represents a GeoJSON object or an array of GeoJSON objects. | ||
* Allows you to parse GeoJSON data and display it on the map. Extends FeatureGroup. | ||
*/ | ||
export interface GeoJSON extends FeatureGroup { | ||
/** | ||
* Adds a GeoJSON object to the layer. | ||
*/ | ||
addData(data: GeoJSON.GeoJsonObject): Layer; | ||
/** | ||
* Resets the given vector layer's style to the original GeoJSON style, | ||
* useful for resetting style after hover events. | ||
*/ | ||
resetStyle(layer: Layer): Layer; | ||
/** | ||
* Changes styles of GeoJSON vector layers with the given style function. | ||
*/ | ||
setStyle(style: StyleFunction): this; | ||
} | ||
/** | ||
* Creates a GeoJSON layer. | ||
@@ -891,0 +897,0 @@ * |
{ | ||
"name": "@types/leaflet", | ||
"version": "1.0.41", | ||
"version": "1.0.42", | ||
"description": "TypeScript definitions for Leaflet.js", | ||
@@ -17,3 +17,4 @@ "license": "MIT", | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "57e34db7a5ee7ac73cf809559e7e901a3e81d53e11a5a7ec5249005ca6dbe4c7" | ||
"typesPublisherContentHash": "817eeddc079b65f500eeed67fe0fc9d757344b28c4d79c0d94f424d1c28120ed", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 19 Dec 2016 14:59:23 GMT | ||
* Last updated: Fri, 06 Jan 2017 16:34:23 GMT | ||
* Library Dependencies: geojson | ||
@@ -14,0 +14,0 @@ * Module Dependencies: none |
@@ -9,2 +9,3 @@ { | ||
"libraryMinorVersion": 0, | ||
"typeScriptVersion": "2.0", | ||
"libraryName": "Leaflet.js", | ||
@@ -25,3 +26,3 @@ "typingsPackageName": "leaflet", | ||
"hasPackageJson": true, | ||
"contentHash": "57e34db7a5ee7ac73cf809559e7e901a3e81d53e11a5a7ec5249005ca6dbe4c7" | ||
"contentHash": "817eeddc079b65f500eeed67fe0fc9d757344b28c4d79c0d94f424d1c28120ed" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52323
1208