@types/mapbox-gl
Advanced tools
Comparing version 0.30.0 to 0.35.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for Mapbox GL JS v0.30.0 | ||
// Type definitions for Mapbox GL JS v0.35.1 | ||
// Project: https://github.com/mapbox/mapbox-gl-js | ||
@@ -12,2 +12,3 @@ // Definitions by: Dominik Bruderer <https://github.com/dobrud> | ||
export function supported(options?: {failIfMajorPerformanceCaveat?: boolean}): boolean; | ||
export function setRTLTextPlugin(pluginURL: string, callback: Function): void; | ||
@@ -54,3 +55,3 @@ /** | ||
querySourceFeatures(sourceID: string, parameters: {sourceLayer?: string, filter?: any[]}): GeoJSON.Feature<GeoJSON.GeometryObject>[]; | ||
querySourceFeatures(sourceID: string, parameters?: {sourceLayer?: string, filter?: any[]}): GeoJSON.Feature<GeoJSON.GeometryObject>[]; | ||
@@ -63,2 +64,4 @@ setStyle(style: mapboxgl.Style | string): this; | ||
isSourceLoaded(id: string): boolean; | ||
removeSource(id: string): this; | ||
@@ -68,2 +71,8 @@ | ||
addImage(name: string, image: HTMLImageElement | ArrayBufferView, options?: {width?: number, height?: number, pixelRatio?: number}): this; | ||
removeImage(name: string): this; | ||
loadImage(url: string, callback: Function): this; | ||
addLayer(layer: mapboxgl.Layer, before?: string): this; | ||
@@ -91,2 +100,6 @@ | ||
setLight(options: mapboxgl.Light, lightOptions: any): this; | ||
getLight(): mapboxgl.Light; | ||
getContainer(): HTMLElement; | ||
@@ -142,3 +155,3 @@ | ||
fitBounds(bounds: mapboxgl.LngLatBounds | number[][], options?: { linear?: boolean, easing?: Function, padding?: number, offset?: Point|number[],maxZoom?: number }): this; | ||
fitBounds(bounds: mapboxgl.LngLatBounds | number[][], options?: { linear?: boolean, easing?: Function, padding?: number | mapboxgl.PaddingOptions, offset?: Point|number[],maxZoom?: number }, eventData?: mapboxgl.EventData): this; | ||
@@ -151,2 +164,4 @@ jumpTo(options: mapboxgl.CameraOptions, eventData?: mapboxgl.EventData): this; | ||
isMoving(): boolean; | ||
stop(): this; | ||
@@ -211,2 +226,4 @@ | ||
logoPosition?: boolean; | ||
/** If set, the map is constrained to the given bounds. */ | ||
@@ -226,2 +243,6 @@ maxBounds?: mapboxgl.LngLatBounds | number[][]; | ||
refreshExpiredTiles?: boolean; | ||
renderWorldCopies?: boolean; | ||
/** If true, enable the "scroll to zoom" interaction */ | ||
@@ -243,2 +264,9 @@ scrollZoom?: boolean; | ||
export class PaddingOptions extends Evented { | ||
top: number; | ||
bottom: number; | ||
left: number; | ||
right: number; | ||
} | ||
/** | ||
@@ -381,3 +409,3 @@ * BoxZoomHandler | ||
export class AttributionControl extends Control { | ||
constructor(); | ||
constructor(options?: {compact?: boolean}); | ||
} | ||
@@ -393,2 +421,9 @@ | ||
/** | ||
* Fullscreen | ||
*/ | ||
export class FullscreenControl extends Control { | ||
constructor(); | ||
} | ||
/** | ||
* Popup | ||
@@ -455,3 +490,3 @@ */ | ||
export interface Source { | ||
type: "vector" | "raster" | "geojson" | "image" | "video"; | ||
type: "vector" | "raster" | "geojson" | "image" | "video" | "canvas"; | ||
} | ||
@@ -527,2 +562,25 @@ | ||
/** | ||
* CanvasSource | ||
*/ | ||
export class CanvasSource implements Source, CanvasSourceOptions { | ||
type: "canvas"; | ||
coordinates: number[][]; | ||
canvas: string; | ||
getCanvas(): HTMLCanvasElement; | ||
setCoordinates(coordinates: number[][]): this; | ||
} | ||
export interface CanvasSourceOptions { | ||
coordinates: number[][]; | ||
animate?: boolean; | ||
canvas: string; | ||
} | ||
interface VectorSource extends Source { | ||
@@ -557,2 +615,4 @@ type: "vector"; | ||
wrapToBestWorld(center: mapboxgl.LngLat): mapboxgl.LngLat; | ||
/** Return a LngLat as an array */ | ||
@@ -683,4 +743,8 @@ toArray(): number[]; | ||
on(type: string, layer: string, listener: Function): this; | ||
off(type?: string | any, listener?: Function): this; | ||
off(type?: string | any, layer?: string, listener?: Function): this; | ||
once(type: string, listener: Function): this; | ||
@@ -829,3 +893,3 @@ | ||
id: string; | ||
type?: "fill" | "line" | "symbol" | "circle" | "raster" | "background" | string; //TODO: Ideally we wouldn't accept string here, just these specific strings | ||
type?: "fill" | "line" | "symbol" | "circle" | "fill-extrusion" | "raster" | "background"; | ||
@@ -854,2 +918,3 @@ metadata?: any; | ||
type?: "identity" | "exponential" | "interval" | "categorical"; | ||
default?: any; | ||
"colorSpace"?: "rgb" | "lab" | "interval"; | ||
@@ -902,3 +967,3 @@ } | ||
export interface LinePaint { | ||
"line-opacity"?: number; | ||
"line-opacity"?: number | StyleFunction; | ||
"line-color"?: string| StyleFunction; | ||
@@ -908,5 +973,5 @@ "line-translate"?: number[]; | ||
"line-width"?: number; | ||
"line-gap-width"?: number; | ||
"line-offset"?: number; | ||
"line-blur"?: number; | ||
"line-gap-width"?: number | StyleFunction; | ||
"line-offset"?: number | StyleFunction; | ||
"line-blur"?: number | StyleFunction; | ||
"line-dasharray"?: number[]; | ||
@@ -927,6 +992,6 @@ "line-dasharray-transition"?: Transition; | ||
"icon-rotation-alignment"?: "map" | "viewport" | "auto"; | ||
"icon-size"?: number; | ||
"icon-size"?: number | StyleFunction; | ||
"icon-text-fit"?: "none" | "both" | "width" | "height"; | ||
"icon-text-fit-padding"?: number[]; | ||
"icon-image"?: string; | ||
"icon-image"?: string | StyleFunction; | ||
"icon-rotate"?: number | StyleFunction; | ||
@@ -938,5 +1003,5 @@ "icon-padding"?: number; | ||
"text-rotation-alignment"?: "map" | "viewport" | "auto"; | ||
"text-field"?: string; | ||
"text-field"?: string | StyleFunction; | ||
"text-font"?: string | string[]; | ||
"text-size"?: number; | ||
"text-size"?: number | StyleFunction; | ||
"text-max-width"?: number; | ||
@@ -948,6 +1013,6 @@ "text-line-height"?: number; | ||
"text-max-angle"?: number; | ||
"text-rotate"?: number; | ||
"text-rotate"?: number | StyleFunction; | ||
"text-padding"?: number; | ||
"text-keep-upright"?: boolean; | ||
"text-transform"?: "none" | "uppercase" | "lowercase"; | ||
"text-transform"?: "none" | "uppercase" | "lowercase" | StyleFunction; | ||
"text-offset"?: number[]; | ||
@@ -960,14 +1025,14 @@ "text-allow-overlap"?: boolean; | ||
export interface SymbolPaint { | ||
"icon-opacity"?: number; | ||
"icon-color"?: string; | ||
"icon-halo-color"?: string; | ||
"icon-halo-width"?: number; | ||
"icon-halo-blur"?: number; | ||
"icon-opacity"?: number | StyleFunction; | ||
"icon-color"?: string | StyleFunction; | ||
"icon-halo-color"?: string | StyleFunction; | ||
"icon-halo-width"?: number | StyleFunction; | ||
"icon-halo-blur"?: number | StyleFunction; | ||
"icon-translate"?: number[]; | ||
"icon-translate-anchor"?: "map" | "viewport"; | ||
"text-opacity"?: number; | ||
"text-color"?: "string"; | ||
"text-halo-color"?: "string"; | ||
"text-halo-width"?: number; | ||
"text-halo-blur"?: number; | ||
"text-opacity"?: number | StyleFunction; | ||
"text-color"?: string | StyleFunction; | ||
"text-halo-color"?: string | StyleFunction; | ||
"text-halo-width"?: number | StyleFunction; | ||
"text-halo-blur"?: number | StyleFunction; | ||
"text-translate"?: number[]; | ||
@@ -974,0 +1039,0 @@ "text-translate-anchor"?: "map" | "viewport"; |
{ | ||
"name": "@types/mapbox-gl", | ||
"version": "0.30.0", | ||
"version": "0.35.0", | ||
"description": "TypeScript definitions for Mapbox GL JS", | ||
@@ -22,4 +22,4 @@ "license": "MIT", | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "7b0760ca790fad82485d98f9a3edcd09f236d541a93d1a5ee100f61b7e30549c", | ||
"typesPublisherContentHash": "d153d00b8c578e79dc3d2092b4b2a78bcde6efddc1a9f732ba17dd393ba65cbd", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/mapbox-gl | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox-gl | ||
Additional Details | ||
* Last updated: Wed, 22 Mar 2017 00:12:27 GMT | ||
* Last updated: Tue, 02 May 2017 00:11:24 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
29155
4
770