Socket
Socket
Sign inDemoInstall

@types/leaflet

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/leaflet - npm Package Compare versions

Comparing version 1.0.38 to 1.0.39

274

leaflet/index.d.ts

@@ -46,21 +46,11 @@ // Type definitions for Leaflet.js 1.0.0

export interface CRS {
latLngToPoint(latlng: LatLng, zoom: number): Point;
latLngToPoint(latlng: LatLngLiteral, zoom: number): Point;
latLngToPoint(latlng: LatLngTuple, zoom: number): Point;
pointToLatLng(point: Point): LatLng;
pointToLatLng(point: PointTuple): LatLng;
project(latlng: LatLng): Point;
project(latlng: LatLngLiteral): Point;
project(latlng: LatLngTuple): Point;
unproject(point: Point): LatLng;
unproject(point: PointTuple): LatLng;
latLngToPoint(latlng: LatLngExpression, zoom: number): Point;
pointToLatLng(point: PointExpression): LatLng;
project(latlng: LatLngExpression): Point;
unproject(point: PointExpression): LatLng;
scale(zoom: number): number;
zoom(scale: number): number;
getProjectedBounds(zoom: number): Bounds;
distance(latlng1: LatLng, latlng2: LatLng): number;
distance(latlng1: LatLngLiteral, latlng2: LatLngLiteral): number;
distance(latlng1: LatLngTuple, latlng2: LatLngTuple): number;
wrapLatLng(latlng: LatLng): LatLng;
wrapLatLng(latlng: LatLngLiteral): LatLng;
wrapLatLng(latlng: LatLngTuple): LatLng;
distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number;
wrapLatLng(latlng: LatLngExpression): LatLng;

@@ -82,7 +72,4 @@ code: string;

export interface Projection {
project(latlng: LatLng): Point;
project(latlng: LatLngLiteral): Point;
project(latlng: LatLngTuple): Point;
unproject(point: Point): LatLng;
unproject(point: PointTuple): LatLng;
project(latlng: LatLngExpression): Point;
unproject(point: PointExpression): LatLng;

@@ -99,9 +86,5 @@ bounds: LatLngBounds;

export interface LatLng {
equals(otherLatLng: LatLng, maxMargin?: number): boolean;
equals(otherLatLng: LatLngLiteral, maxMargin?: number): boolean;
equals(otherLatLng: LatLngTuple, maxMargin?: number): boolean;
equals(otherLatLng: LatLngExpression, maxMargin?: number): boolean;
toString(): string;
distanceTo(otherLatLng: LatLng): number;
distanceTo(otherLatLng: LatLngLiteral): number;
distanceTo(otherLatLng: LatLngTuple): number;
distanceTo(otherLatLng: LatLngExpression): number;
wrap(): LatLng;

@@ -135,7 +118,4 @@ toBounds(sizeInMeters: number): LatLngBounds;

export interface LatLngBounds {
extend(latlng: LatLng): this;
extend(latlng: LatLngLiteral): this;
extend(latlng: LatLngTuple): this;
extend(otherBounds: LatLngBounds): this;
extend(otherBounds: LatLngBoundsLiteral): this;
extend(latlng: LatLngExpression): this;
extend(otherBounds: LatLngBoundsExpression): this;
pad(bufferRatio: number): LatLngBounds; // does this modify the current instance or does it return a new one?

@@ -151,14 +131,8 @@ getCenter(): LatLng;

getNorth(): number;
contains(otherBounds: LatLngBounds): boolean;
contains(otherBounds: LatLngBoundsLiteral): boolean;
contains(latlng: LatLng): boolean;
contains(latlng: LatLngLiteral): boolean;
contains(latlng: LatLngTuple): boolean;
intersects(otherBounds: LatLngBounds): boolean;
intersects(otherBounds: LatLngLiteral): boolean;
overlaps(otherBounds: Bounds): boolean; // investigate if this is really bounds and not latlngbounds
overlaps(otherBounds: BoundsLiteral): boolean;
contains(otherBounds: LatLngBoundsExpression): boolean;
contains(latlng: LatLngExpression): boolean;
intersects(otherBounds: LatLngBoundsExpression): boolean;
overlaps(otherBounds: BoundsExpression): boolean; // investigate if this is really bounds and not latlngbounds
toBBoxString(): string;
equals(otherBounds: LatLngBounds): boolean;
equals(otherBounds: LatLngBoundsLiteral): boolean;
equals(otherBounds: LatLngBoundsExpression): boolean;
isValid(): boolean;

@@ -171,8 +145,4 @@ }

export function latLngBounds(southWest: LatLng, northEast: LatLng): LatLngBounds;
export function latLngBounds(southWest: LatLngExpression, northEast: LatLngExpression): LatLngBounds;
export function latLngBounds(southWest: LatLngLiteral, northEast: LatLngLiteral): LatLngBounds;
export function latLngBounds(southWest: LatLngTuple, northEast: LatLngTuple): LatLngBounds;
export function latLngBounds(latlngs: LatLngBoundsLiteral): LatLngBounds;

@@ -184,21 +154,14 @@

clone(): Point;
add(otherPoint: Point): Point; // investigate if this mutates or returns a new instance
add(otherPoint: PointTuple): Point;
subtract(otherPoint: Point): Point;
subtract(otherPoint: PointTuple): Point;
add(otherPoint: PointExpression): Point; // investigate if this mutates or returns a new instance
subtract(otherPoint: PointExpression): Point;
divideBy(num: number): Point;
multiplyBy(num: number): Point;
scaleBy(scale: Point): Point;
scaleBy(scale: PointTuple): Point;
unscaleBy(scale: Point): Point;
unscaleBy(scale: PointTuple): Point;
scaleBy(scale: PointExpression): Point;
unscaleBy(scale: PointExpression): Point;
round(): Point;
floor(): Point;
ceil(): Point;
distanceTo(otherPoint: Point): Point;
distanceTo(otherPoint: PointTuple): Point;
equals(otherPoint: Point): boolean;
equals(otherPoint: PointTuple): boolean;
contains(otherPoint: Point): boolean;
contains(otherPoint: PointTuple): boolean;
distanceTo(otherPoint: PointExpression): Point;
equals(otherPoint: PointExpression): boolean;
contains(otherPoint: PointExpression): boolean;
toString(): string;

@@ -218,4 +181,3 @@ }

export interface Bounds {
extend(point: Point): this;
extend(point: PointTuple): this;
extend(point: PointExpression): this;
getCenter(round?: boolean): Point;

@@ -225,10 +187,6 @@ getBottomLeft(): Point;

getSize(): Point;
contains(otherBounds: Bounds): boolean;
contains(otherBounds: BoundsLiteral): boolean;
contains(point: Point): boolean;
contains(point: PointTuple): boolean;
intersects(otherBounds: Bounds): boolean;
intersects(otherBounds: BoundsLiteral): boolean;
overlaps(otherBounds: Bounds): boolean;
overlaps(otherBounds: BoundsLiteral): boolean;
contains(otherBounds: BoundsExpression): boolean;
contains(point: PointExpression): boolean;
intersects(otherBounds: BoundsExpression): boolean;
overlaps(otherBounds: BoundsExpression): boolean;

@@ -241,6 +199,4 @@ min: Point;

export function bounds(topLeft: Point, bottomRight: Point): Bounds;
export function bounds(topLeft: PointExpression, bottomRight: PointExpression): Bounds;
export function bounds(topLeft: PointTuple, bottomRight: PointTuple): Bounds;
export function bounds(points: Array<Point>): Bounds;

@@ -417,5 +373,3 @@

openPopup(): this;
openPopup(latlng: LatLng): this;
openPopup(latlng: LatLngLiteral): this;
openPopup(latlng: LatLngTuple): this;
openPopup(latlng: LatLngExpression): this;
closePopup(): this;

@@ -436,5 +390,3 @@ togglePopup(): this;

openTooltip(): this;
openTooltip(latlng: LatLng): this;
openTooltip(latlng: LatLngLiteral): this;
openTooltip(latlng: LatLngTuple): this;
openTooltip(latlng: LatLngExpression): this;
closeTooltip(): this;

@@ -579,14 +531,8 @@ toggleTooltip(): this;

getLatLngs(): Array<LatLng>;
setLatLngs(latlngs: Array<LatLng>): this;
setLatLngs(latlngs: Array<LatLngLiteral>): this;
setLatLngs(latlngs: Array<LatLngTuple>): this;
setLatLngs(latlngs: Array<LatLngExpression>): this;
isEmpty(): boolean;
getCenter(): LatLng;
getBounds(): LatLngBounds;
addLatLng(latlng: LatLng): this;
addLatLng(latlng: LatLngLiteral): this;
addLatLng(latlng: LatLngTuple): this;
addLatLng(latlng: Array<LatLng>): this; // these three overloads aren't explicitly noted in the docs
addLatLng(latlng: Array<LatLngLiteral>): this;
addLatLng(latlng: Array<LatLngTuple>): this;
addLatLng(latlng: LatLngExpression): this;
addLatLng(latlng: Array<LatLngExpression>): this; // these three overloads aren't explicitly noted in the docs
}

@@ -598,14 +544,5 @@

export function polyline(latlngs: Array<LatLng>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<LatLngExpression>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<Array<LatLngExpression>>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<LatLngLiteral>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<LatLngTuple>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<Array<LatLng>>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<Array<LatLngLiteral>>, options?: PolylineOptions): Polyline;
export function polyline(latlngs: Array<Array<LatLngTuple>>, options?: PolylineOptions): Polyline;
export interface Polygon extends InternalPolyline {

@@ -615,23 +552,12 @@ toGeoJSON(): GeoJSON.Polygon | GeoJSON.MultiPolygon;

export function polygon(latlngs: Array<LatLng>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<LatLngExpression>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<LatLngLiteral>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<Array<LatLngExpression>>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<LatLngTuple>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<Array<LatLng>>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<Array<LatLngLiteral>>, options?: PolylineOptions): Polygon;
export function polygon(latlngs: Array<Array<LatLngTuple>>, options?: PolylineOptions): Polygon;
export interface Rectangle extends Polygon {
setBounds(latLngBounds: LatLngBounds): this;
setBounds(latLngBounds: LatLngBoundsLiteral): this;
setBounds(latLngBounds: LatLngBoundsExpression): this;
}
export function rectangle(latLngBounds: LatLngBounds, options?: PolylineOptions): Rectangle;
export function rectangle(latLngBounds: LatLngBoundsExpression, options?: PolylineOptions): Rectangle;
export function rectangle(latLngBounds: LatLngBoundsLiteral, options?: PolylineOptions): Rectangle;
export interface CircleMarkerOptions extends PathOptions {

@@ -643,5 +569,3 @@ radius?: number;

toGeoJSON(): GeoJSON.Point;
setLatLng(latLng: LatLng): this;
setLatLng(latLng: LatLngLiteral): this;
setLatLng(latLng: LatLngTuple): this;
setLatLng(latLng: LatLngExpression): this;
getLatLng(): LatLng;

@@ -652,8 +576,4 @@ setRadius(radius: number): this;

export function circleMarker(latlng: LatLng, options?: CircleMarkerOptions): CircleMarker;
export function circleMarker(latlng: LatLngExpression, options?: CircleMarkerOptions): CircleMarker;
export function circleMarker(latlng: LatLngLiteral, options?: CircleMarkerOptions): CircleMarker;
export function circleMarker(latlng: LatLngLiteral, options?: CircleMarkerOptions): CircleMarker;
export interface CircleOptions extends PathOptions {

@@ -669,14 +589,5 @@ radius?: number;

export function circle(latlng: LatLng, options?: CircleOptions): Circle;
export function circle(latlng: LatLngExpression, options?: CircleOptions): Circle;
export function circle(latlng: LatLngExpression, radius: number, options?: CircleOptions): Circle;
export function circle(latlng: LatLngLiteral, options?: CircleOptions): Circle;
export function circle(latlng: LatLngTuple, options?: CircleOptions): Circle;
export function circle(latlng: LatLng, radius: number, options?: CircleOptions): Circle;
export function circle(latlng: LatLngLiteral, radius: number, options?: CircleOptions): Circle;
export function circle(latlng: LatLngTuple, radius: number, options?: CircleOptions): Circle;
export interface RendererOptions extends LayerOptions {

@@ -826,3 +737,3 @@ padding?: number;

*/
pointToLayer?: (geoJsonPoint: GeoJSON.Point, latlng: LatLng) => Layer; // should import GeoJSON typings
pointToLayer?: (geoJsonPoint: GeoJSON.Feature<GeoJSON.Point>, latlng: LatLng) => Layer; // should import GeoJSON typings

@@ -1296,51 +1207,30 @@ /**

openPopup(popup: Popup): this;
openPopup(content: string, latlng: LatLng, options?: PopupOptions): this;
openPopup(content: string, latlng: LatLngLiteral, options?: PopupOptions): this;
openPopup(content: string, latlng: LatLngTuple, options?: PopupOptions): this;
openPopup(content: HTMLElement, latlng: LatLng, options?: PopupOptions): this;
openPopup(content: HTMLElement, latlng: LatLngLiteral, options?: PopupOptions): this;
openPopup(content: HTMLElement, latlng: LatLngTuple, options?: PopupOptions): this;
openPopup(content: string, latlng: LatLngExpression, options?: PopupOptions): this;
openPopup(content: HTMLElement, latlng: LatLngExpression, options?: PopupOptions): this;
closePopup(popup?: Popup): this;
openTooltip(tooltip: Tooltip): this;
openTooltip(content: string, latlng: LatLng, options?: TooltipOptions): this;
openTooltip(content: string, latlng: LatLngLiteral, options?: TooltipOptions): this;
openTooltip(content: string, latlng: LatLngTuple, options?: TooltipOptions): this;
openTooltip(content: HTMLElement, latlng: LatLng, options?: TooltipOptions): this;
openTooltip(content: HTMLElement, latlng: LatLngLiteral, options?: TooltipOptions): this;
openTooltip(content: HTMLElement, latlng: LatLngTuple, options?: TooltipOptions): this;
openTooltip(content: string, latlng: LatLngExpression, options?: TooltipOptions): this;
openTooltip(content: HTMLElement, latlng: LatLngExpression, options?: TooltipOptions): this;
closeTooltip(tooltip?: Tooltip): this;
// Methods for modifying map state
setView(center: LatLng, zoom: number, options?: ZoomPanOptions): this;
setView(center: LatLngLiteral, zoom: number, options?: ZoomPanOptions): this;
setView(center: LatLngTuple, zoom: number, options?: ZoomPanOptions): this;
setView(center: LatLngExpression, zoom: number, options?: ZoomPanOptions): this;
setZoom(zoom: number, options: ZoomPanOptions): this;
zoomIn(delta?: number, options?: ZoomOptions): this;
zoomOut(delta?: number, options?: ZoomOptions): this;
setZoomAround(latlng: LatLng, zoom: number, options: ZoomOptions): this;
setZoomAround(latlng: LatLngLiteral, zoom: number, options: ZoomOptions): this;
setZoomAround(latlng: LatLngTuple, zoom: number, options: ZoomOptions): this; // will the latlng version using tuple take precedence or will the point tuple version?
setZoomAround(latlng: LatLngExpression, zoom: number, options: ZoomOptions): this;
setZoomAround(offset: Point, zoom: number, options: ZoomOptions): this;
fitBounds(bounds: LatLngBounds, options: FitBoundsOptions): this;
fitBounds(bounds: LatLngBoundsLiteral, options: FitBoundsOptions): this;
fitBounds(bounds: LatLngBoundsExpression, options: FitBoundsOptions): this;
fitWorld(options?: FitBoundsOptions): this;
panTo(latlng: LatLng, options?: PanOptions): this;
panTo(latlng: LatLngLiteral, options?: PanOptions): this;
panTo(latlng: LatLngTuple, options?: PanOptions): this;
panBy(offset: Point): this;
panBy(offset: PointTuple): this;
setMaxBounds(bounds: LatLngBounds): this;
setMaxBounds(bounds: LatLngBoundsLiteral): this;
panTo(latlng: LatLngExpression, options?: PanOptions): this;
panBy(offset: PointExpression): this;
setMaxBounds(bounds: LatLngBoundsExpression): this;
setMinZoom(zoom: number): this;
setMaxZoom(zoom: number): this;
panInsideBounds(bounds: LatLngBounds, options?: PanOptions): this;
panInsideBounds(bounds: LatLngBoundsLiteral, options?: PanOptions): this;
panInsideBounds(bounds: LatLngBoundsExpression, options?: PanOptions): this;
invalidateSize(options: ZoomPanOptions): this;
invalidateSize(animate: boolean): this;
stop(): this;
flyTo(latlng: LatLng, zoom?: number, options?: ZoomPanOptions): this;
flyTo(latlng: LatLngLiteral, zoom?: number, options?: ZoomPanOptions): this;
flyTo(latlng: LatLngTuple, zoom?: number, options?: ZoomPanOptions): this;
flyToBounds(bounds: LatLngBounds, options?: FitBoundsOptions): this;
flyToBounds(bounds: LatLngBoundsLiteral, options?: FitBoundsOptions): this;
flyTo(latlng: LatLngExpression, zoom?: number, options?: ZoomPanOptions): this;
flyToBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this;

@@ -1363,4 +1253,3 @@ // Other methods

getMaxZoom(): number;
getBoundsZoom(bounds: LatLngBounds, inside?: boolean): number;
getBoundsZoom(bounds: LatLngBoundsLiteral, inside?: boolean): number;
getBoundsZoom(bounds: LatLngBoundsExpression, inside?: boolean): number;
getSize(): Point;

@@ -1374,25 +1263,12 @@ getPixelBounds(): Bounds;

getScaleZoom(scale: number, fromZoom: number): number;
project(latlng: LatLng, zoom: number): Point;
project(latlng: LatLngLiteral, zoom: number): Point;
project(latlng: LatLngTuple, zoom: number): Point;
unproject(point: Point, zoom: number): LatLng;
unproject(point: PointTuple, zoom: number): LatLng;
layerPointToLatLng(point: Point): LatLng;
layerPointToLatLng(point: PointTuple): LatLng;
latLngToLayerPoint(latlng: LatLng): Point;
latLngToLayerPoint(latlng: LatLngLiteral): Point;
latLngToLayerPoint(latlng: LatLngTuple): Point;
wrapLatLng(latlng: LatLng): LatLng;
wrapLatLng(latlng: LatLngLiteral): LatLng;
wrapLatLng(latlng: LatLngTuple): LatLng;
distance(latlng1: LatLng, latlng2: LatLng): number;
distance(latlng1: LatLngLiteral, latlng2: LatLngLiteral): number;
distance(latlng1: LatLngTuple, latlng2: LatLngTuple): number;
containerPointToLayerPoint(point: Point): Point;
containerPointToLayerPoint(point: PointTuple): Point;
layerPointToContainerPoint(point: Point): Point;
project(latlng: LatLngExpression, zoom: number): Point;
unproject(point: PointExpression, zoom: number): LatLng;
layerPointToLatLng(point: PointExpression): LatLng;
latLngToLayerPoint(latlng: LatLngExpression): Point;
wrapLatLng(latlng: LatLngExpression): LatLng;
distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number;
containerPointToLayerPoint(point: PointExpression): Point;
layerPointToContainerPoint(point: PointExpression): Point;
layerPointToContainerPoint(point: PointTuple): Point;
latLngToContainerPoint(latlng: LatLng): Point;
latLngToContainerPoint(latlng: LatLngLiteral): Point;
latLngToContainerPoint(latlng: LatLngTuple): Point;
latLngToContainerPoint(latlng: LatLngExpression): Point;
mouseEventToContainerPoint(ev: MouseEvent): Point;

@@ -1475,5 +1351,3 @@ mouseEventToLayerPoint(ev: MouseEvent): Point;

getLatLng(): LatLng;
setLatLng(latlng: LatLng): this;
setLatLng(latlng: LatLngLiteral): this;
setLatLng(latlng: LatLngTuple): this;
setLatLng(latlng: LatLngExpression): this;
setZIndexOffset(offset: number): this;

@@ -1487,8 +1361,4 @@ setIcon(icon: Icon): this;

export function marker(latlng: LatLng, options?: MarkerOptions): Marker;
export function marker(latlng: LatLngExpression, options?: MarkerOptions): Marker;
export function marker(latlng: LatLngLiteral, options?: MarkerOptions): Marker;
export function marker(latlng: LatLngTuple, options?: MarkerOptions): Marker;
export namespace Browser {

@@ -1495,0 +1365,0 @@ export const ie: boolean;

{
"name": "@types/leaflet",
"version": "1.0.38",
"description": "TypeScript definitions for Leaflet.js 1.0.0",
"version": "1.0.39",
"description": "TypeScript definitions for Leaflet.js",
"license": "MIT",

@@ -17,4 +17,3 @@ "author": "Alejandro Sánchez <https://github.com/alejo90>",

"peerDependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "2eac364263dc9140586ca618eae4227c74cdfbf1467e3b95cdc2f7e5f4017656"
"typesPublisherContentHash": "991497d9ec82b24419a6014cf321230b9b5792fa39493a0f257915c1175a9992"
}

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for Leaflet.js 1.0.0 (https://github.com/Leaflet/Leaflet).
This package contains type definitions for Leaflet.js (https://github.com/Leaflet/Leaflet).

@@ -12,4 +12,3 @@ # Details

Additional Details
* Last updated: Tue, 22 Nov 2016 20:59:26 GMT
* File structure: Mixed
* Last updated: Mon, 12 Dec 2016 22:50:17 GMT
* Library Dependencies: geojson

@@ -16,0 +15,0 @@ * Module Dependencies: none

{
"authors": "Alejandro Sánchez <https://github.com/alejo90>",
"definitionFilename": "index.d.ts",
"libraryDependencies": [

@@ -10,3 +9,3 @@ "geojson"

"libraryMinorVersion": 0,
"libraryName": "Leaflet.js 1.0.0",
"libraryName": "Leaflet.js",
"typingsPackageName": "leaflet",

@@ -16,3 +15,2 @@ "projectName": "https://github.com/Leaflet/Leaflet",

"sourceBranch": "types-2.0",
"kind": "Mixed",
"globals": [

@@ -28,3 +26,3 @@ "L"

"hasPackageJson": false,
"contentHash": "2eac364263dc9140586ca618eae4227c74cdfbf1467e3b95cdc2f7e5f4017656"
"contentHash": "991497d9ec82b24419a6014cf321230b9b5792fa39493a0f257915c1175a9992"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc