@types/mapbox-gl
Advanced tools
Comparing version 0.44.4 to 0.45.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for Mapbox GL JS v0.44.1 | ||
// Type definitions for Mapbox GL JS v0.45.0 | ||
// Project: https://github.com/mapbox/mapbox-gl-js | ||
@@ -21,2 +21,3 @@ // Definitions by: Dominik Bruderer <https://github.com/dobrud>, Patrick Reames <https://github.com/patrickr> | ||
type Expression = any[]; | ||
type Anchor = 'center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; | ||
@@ -37,4 +38,2 @@ /** | ||
getClasses(): string[]; | ||
resize(): this; | ||
@@ -58,2 +57,8 @@ | ||
isMoving(): boolean; | ||
isZooming(): boolean; | ||
isRotating(): boolean; | ||
queryRenderedFeatures(pointOrBox?: PointLike | PointLike[], parameters?: { layers?: string[], filter?: any[] }): GeoJSON.Feature<GeoJSONGeometry>[]; | ||
@@ -205,5 +210,2 @@ | ||
/** Style class names with which to initialize the map */ | ||
classes?: string[]; | ||
/** ID of the container element */ | ||
@@ -225,3 +227,3 @@ container?: string | Element; | ||
/** If true, map creation will fail if the implementation determines that the performance of the created WebGL context would be dramatically lower than expected. */ | ||
failIfMayorPerformanceCaveat?: boolean; | ||
failIfMajorPerformanceCaveat?: boolean; | ||
@@ -428,2 +430,4 @@ /** If false, no mouse, touch, or keyboard listeners are attached to the map, so it will not respond to input */ | ||
constructor(options?: { maxWidth?: number, unit?: string }) | ||
setUnit(unit: 'imperial' | 'metric' | 'nautical'): void; | ||
} | ||
@@ -466,3 +470,3 @@ | ||
anchor?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; | ||
anchor?: Anchor; | ||
@@ -496,4 +500,7 @@ offset?: number | PointLike | { [key: string]: PointLike; }; | ||
'position'?: number[]; | ||
'position-transition'?: Transition; | ||
'color'?: string; | ||
'color-transition'?: Transition; | ||
'intensity'?: number; | ||
'intensity-transition'?: Transition; | ||
} | ||
@@ -537,2 +544,4 @@ | ||
clusterMaxZoom?: number; | ||
lineMetrics?: boolean; | ||
} | ||
@@ -590,3 +599,3 @@ | ||
canvas: string; | ||
canvas: string | HTMLCanvasElement; | ||
@@ -603,3 +612,3 @@ getCanvas(): HTMLCanvasElement; | ||
canvas: string; | ||
canvas: string | HTMLCanvasElement; | ||
} | ||
@@ -752,5 +761,10 @@ | ||
/** | ||
* Marker | ||
*/ | ||
export class Marker { | ||
constructor(element?: HTMLElement, options?: { offset?: PointLike }); | ||
constructor(options?: mapboxgl.MarkerOptions); | ||
constructor(element?: HTMLElement, options?: mapboxgl.MarkerOptions); | ||
addTo(map: Map): this; | ||
@@ -775,2 +789,12 @@ | ||
export interface MarkerOptions { | ||
element?: HTMLElement; | ||
offset?: PointLike; | ||
anchor?: Anchor; | ||
color?: string | ||
} | ||
/** | ||
@@ -789,6 +813,2 @@ * Evented | ||
once(type: string, listener: Function): this; | ||
fire(type: string, data?: mapboxgl.EventData | Object): this; | ||
listens(type: string): boolean; | ||
} | ||
@@ -820,2 +840,4 @@ | ||
lngLat: mapboxgl.LngLat; | ||
preventDefault(): void; | ||
defaultPrevented: boolean; | ||
} | ||
@@ -825,3 +847,3 @@ | ||
type: string; | ||
target: Map; | ||
map: Map; | ||
originalEvent: TouchEvent; | ||
@@ -832,2 +854,4 @@ point: mapboxgl.Point; | ||
lngLats: LngLat[]; | ||
preventDefault(): void; | ||
defaultPrevented: boolean; | ||
} | ||
@@ -845,5 +869,15 @@ | ||
source?: mapboxgl.Source; | ||
sourceDataType?: string; | ||
tile?: any; | ||
coord?: any; | ||
} | ||
export class MapWheelEvent { | ||
type: string; | ||
map: Map; | ||
originalEvent: MouseEvent; | ||
preventDefault(): void; | ||
defaultPrevented: boolean; | ||
} | ||
/** | ||
@@ -942,2 +976,3 @@ * AnimationOptions | ||
pitch?: { data: mapboxgl.EventData }; | ||
wheel?: { data: mapboxgl.MapWheelEvent }; | ||
} | ||
@@ -947,3 +982,3 @@ | ||
id: string; | ||
type?: 'fill' | 'line' | 'symbol' | 'circle' | 'fill-extrusion' | 'raster' | 'background' | 'heatmap'; | ||
type?: 'fill' | 'line' | 'symbol' | 'circle' | 'fill-extrusion' | 'raster' | 'background' | 'heatmap' | 'hillshade'; | ||
@@ -963,4 +998,4 @@ metadata?: any; | ||
filter?: any[]; | ||
layout?: BackgroundLayout | FillLayout | FillExtrusionLayout | LineLayout | SymbolLayout | RasterLayout | CircleLayout | HeatmapLayout; | ||
paint?: BackgroundPaint | FillPaint | FillExtrusionPaint | LinePaint | SymbolPaint | RasterPaint | CirclePaint | HeatmapPaint; | ||
layout?: BackgroundLayout | FillLayout | FillExtrusionLayout | LineLayout | SymbolLayout | RasterLayout | CircleLayout | HeatmapLayout | HillshadeLayout; | ||
paint?: BackgroundPaint | FillPaint | FillExtrusionPaint | LinePaint | SymbolPaint | RasterPaint | CirclePaint | HeatmapPaint | HillshadePaint; | ||
} | ||
@@ -983,4 +1018,7 @@ | ||
'background-color'?: string | Expression; | ||
'background-color-transition'?: Transition; | ||
'background-pattern'?: string; | ||
'background-pattern-transition'?: Transition; | ||
'background-opacity'?: number | Expression; | ||
'background-opacity-transition'?: Transition; | ||
} | ||
@@ -995,7 +1033,12 @@ | ||
'fill-opacity'?: number | StyleFunction | Expression; | ||
'fill-opacity-transition'?: Transition; | ||
'fill-color'?: string | StyleFunction | Expression; | ||
'fill-color-transition'?: Transition; | ||
'fill-outline-color'?: string | StyleFunction | Expression; | ||
'fill-outline-color-transition'?: Transition; | ||
'fill-translate'?: number[] | Expression; | ||
'fill-translate-transition'?: Transition; | ||
'fill-translate-anchor'?: 'map' | 'viewport'; | ||
'fill-pattern'?: string; | ||
'fill-pattern-transition'?: Transition; | ||
} | ||
@@ -1009,8 +1052,14 @@ | ||
'fill-extrusion-opacity'?: number | Expression; | ||
'fill-extrusion-opacity-transition'?: Transition; | ||
'fill-extrusion-color'?: string | StyleFunction | Expression; | ||
'fill-extrusion-color-transition'?: Transition; | ||
'fill-extrusion-translate'?: number[] | Expression; | ||
'fill-extrusion-translate-transition'?: Transition; | ||
'fill-extrusion-translate-anchor'?: 'map' | 'viewport'; | ||
'fill-extrusion-pattern'?: string; | ||
'fill-extrusion-pattern-transition'?: Transition; | ||
'fill-extrusion-height'?: number | StyleFunction | Expression; | ||
'fill-extrusion-height-transition'?: Transition; | ||
'fill-extrusion-base'?: number | StyleFunction | Expression; | ||
'fill-extrusion-base-transition'?: Transition; | ||
} | ||
@@ -1029,12 +1078,21 @@ | ||
'line-opacity'?: number | StyleFunction | Expression; | ||
'line-opacity-transition'?: Transition; | ||
'line-color'?: string | StyleFunction | Expression; | ||
'line-color-transition'?: Transition; | ||
'line-translate'?: number[] | Expression; | ||
'line-translate-transition'?: Transition; | ||
'line-translate-anchor'?: 'map' | 'viewport'; | ||
'line-width'?: number | StyleFunction | Expression; | ||
'line-width-transition'?: Transition; | ||
'line-gap-width'?: number | StyleFunction | Expression; | ||
'line-gap-width-transition'?: Transition; | ||
'line-offset'?: number | StyleFunction | Expression; | ||
'line-offset-transition'?: Transition; | ||
'line-blur'?: number | StyleFunction | Expression; | ||
'line-blur-transition'?: Transition; | ||
'line-dasharray'?: number[]; | ||
'line-dasharray-transition'?: Transition; | ||
'line-pattern'?: string; | ||
'line-pattern-transition'?: Transition; | ||
'line-gradient'?: Expression; | ||
} | ||
@@ -1048,7 +1106,6 @@ | ||
'symbol-avoid-edges'?: boolean; | ||
'icon-allow-overlap'?: boolean; | ||
'icon-allow-overlap'?: boolean | StyleFunction; | ||
'icon-ignore-placement'?: boolean; | ||
'icon-optional'?: boolean; | ||
'icon-rotation-alignment'?: 'map' | 'viewport' | 'auto'; | ||
'icon-pitch-alignment'?: 'map' | 'viewport' | 'auto'; | ||
'icon-size'?: number | StyleFunction | Expression; | ||
@@ -1062,2 +1119,4 @@ 'icon-text-fit'?: 'none' | 'both' | 'width' | 'height'; | ||
'icon-offset'?: number[] | StyleFunction | Expression; | ||
'icon-anchor'?: Anchor; | ||
'icon-pitch-alignment'?: 'map' | 'viewport' | 'auto'; | ||
'text-pitch-alignment'?: 'map' | 'viewport' | 'auto'; | ||
@@ -1072,3 +1131,3 @@ 'text-rotation-alignment'?: 'map' | 'viewport' | 'auto'; | ||
'text-justify'?: 'left' | 'center' | 'right'; | ||
'text-anchor'?: 'center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; | ||
'text-anchor'?: Anchor; | ||
'text-max-angle'?: number | Expression; | ||
@@ -1083,3 +1142,2 @@ 'text-rotate'?: number | StyleFunction | Expression; | ||
'text-optional'?: boolean; | ||
} | ||
@@ -1089,14 +1147,26 @@ | ||
'icon-opacity'?: number | StyleFunction | Expression; | ||
'icon-opacity-transition'?: Transition; | ||
'icon-color'?: string | StyleFunction | Expression; | ||
'icon-color-transition'?: Transition; | ||
'icon-halo-color'?: string | StyleFunction | Expression; | ||
'icon-halo-color-transition'?: Transition; | ||
'icon-halo-width'?: number | StyleFunction | Expression; | ||
'icon-halo-width-transition'?: Transition; | ||
'icon-halo-blur'?: number | StyleFunction | Expression; | ||
'icon-halo-blur-transition'?: Transition; | ||
'icon-translate'?: number[] | Expression; | ||
'icon-translate-transition'?: Transition; | ||
'icon-translate-anchor'?: 'map' | 'viewport'; | ||
'text-opacity'?: number | StyleFunction | Expression; | ||
'text-opacity-transition'?: Transition; | ||
'text-color'?: string | StyleFunction | Expression; | ||
'text-color-transition'?: Transition; | ||
'text-halo-color'?: string | StyleFunction | Expression; | ||
'text-halo-color-transition'?: Transition; | ||
'text-halo-width'?: number | StyleFunction | Expression; | ||
'text-halo-width-transition'?: Transition; | ||
'text-halo-blur'?: number | StyleFunction | Expression; | ||
'text-halo-blur-transition'?: Transition; | ||
'text-translate'?: number[] | Expression; | ||
'text-translate-transition'?: Transition; | ||
'text-translate-anchor'?: 'map' | 'viewport'; | ||
@@ -1111,7 +1181,13 @@ } | ||
'raster-opacity'?: number | Expression; | ||
'raster-opacity-transition'?: Transition; | ||
'raster-hue-rotate'?: number | Expression; | ||
'raster-hue-rotate-transition'?: Transition; | ||
'raster-brightness-min'?: number | Expression; | ||
'raster-brightness-min-transition'?: Transition; | ||
'raster-brightness-max'?: number | Expression; | ||
'raster-brightness-max-transition'?: Transition; | ||
'raster-saturation'?: number | Expression; | ||
'raster-saturation-transition'?: Transition; | ||
'raster-contrast'?: number | Expression; | ||
'raster-contrast-transition'?: Transition; | ||
'raster-fade-duration'?: number | Expression; | ||
@@ -1128,6 +1204,9 @@ } | ||
'circle-color'?: string | StyleFunction | Expression; | ||
'circle-color-transition'?: Transition; | ||
'circle-blur'?: number | StyleFunction | Expression; | ||
'circle-blur-transition'?: Transition; | ||
'circle-opacity'?: number | StyleFunction | Expression; | ||
'circle-opacity-transition'?: Transition; | ||
'circle-translate'?: number[] | Expression; | ||
'circle-translate-transition'?: Transition; | ||
'circle-translate-anchor'?: 'map' | 'viewport'; | ||
@@ -1137,4 +1216,7 @@ 'circle-pitch-scale'?: 'map' | 'viewport'; | ||
'circle-stroke-width'?: number | StyleFunction | Expression; | ||
'circle-stroke-width-transition'?: Transition; | ||
'circle-stroke-color'?: string | StyleFunction | Expression; | ||
'circle-stroke-color-transition'?: Transition; | ||
'circle-stroke-opacity'?: number | StyleFunction | Expression; | ||
'circle-stroke-opacity-transition'?: Transition; | ||
} | ||
@@ -1148,10 +1230,27 @@ | ||
'heatmap-radius'?: number | Expression; | ||
'heatmap-transition'?: Transition; | ||
'heatmap-radius-transition'?: Transition; | ||
'heatmap-weight'?: number | StyleFunction | Expression; | ||
'heatmap-intensity'?: number | Expression; | ||
'heatmap-intensity-transition'?: Transition; | ||
'heatmap-color'?: string | Expression; | ||
'heatmap-color-transition'?: Transition; | ||
'heatmap-opacity'?: number | Expression; | ||
'heatmap-opacity-transition'?: Transition; | ||
} | ||
export interface HillshadeLayout { | ||
visibility?: 'visible' | 'none'; | ||
} | ||
export interface HillshadePaint { | ||
'hillshade-illumination-direction'?: number | Expression; | ||
'hillshade-illumination-anchor'?: 'map' | 'viewport'; | ||
'hillshade-exaggeration'?: number | Expression; | ||
'hillshade-exaggeration-transition'?: Transition; | ||
'hillshade-shadow-color'?: string | Expression; | ||
'hillshade-shadow-color-transition'?: Transition; | ||
'hillshade-highlight-color'?: string | Expression; | ||
'hillshade-highlight-color-transition'?: Transition; | ||
'hillshade-accent-color'?: string | Expression; | ||
'hillshade-accent-color-transition'?: Transition; | ||
} | ||
} | ||
@@ -1158,0 +1257,0 @@ |
{ | ||
"name": "@types/mapbox-gl", | ||
"version": "0.44.4", | ||
"version": "0.45.0", | ||
"description": "TypeScript definitions for Mapbox GL JS", | ||
@@ -21,3 +21,3 @@ "license": "MIT", | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
@@ -28,4 +28,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "83c3d4bdfc6e39de34e376ce85edce1d6fe72b24981aa1be4456df05c15f5015", | ||
"typesPublisherContentHash": "ce6064f12d06b63d403265641fc4ccf1bf9311461059463369793c2da985f0c9", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/mapbox-gl | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox-gl | ||
Additional Details | ||
* Last updated: Tue, 08 May 2018 16:41:34 GMT | ||
* Last updated: Fri, 01 Jun 2018 16:26:34 GMT | ||
* Dependencies: geojson | ||
@@ -14,0 +14,0 @@ * Global values: mapboxgl |
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
38952
909