Socket
Socket
Sign inDemoInstall

@types/mapbox-gl

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/mapbox-gl - npm Package Compare versions

Comparing version 0.45.2 to 0.47.0

114

mapbox-gl/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for Mapbox GL JS v0.45.0
// Type definitions for Mapbox GL JS v0.47.0
// Project: https://github.com/mapbox/mapbox-gl-js

@@ -29,14 +29,12 @@ // Definitions by: Dominik Bruderer <https://github.com/dobrud>, Patrick Reames <https://github.com/patrickr>

addControl(control: Control, position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'): this;
addControl(control: Control | IControl, position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'): this;
addControl(control: IControl, position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'): this;
removeControl(control: Control | IControl): this;
removeControl(control: Control): this;
resize(eventData?: EventData): this;
removeControl(control: IControl): this;
getBounds(): LngLatBounds;
resize(): this;
getMaxBounds(): LngLatBounds;
getBounds(): mapboxgl.LngLatBounds;
setMaxBounds(lnglatbounds?: LngLatBoundsLike): this;

@@ -52,2 +50,6 @@

getRenderWorldCopies(): boolean;
setRenderWorldCopies(renderWorldCopies?: boolean): this;
project(lnglat: LngLatLike): mapboxgl.Point;

@@ -67,3 +69,3 @@

setStyle(style: mapboxgl.Style | string): this;
setStyle(style: mapboxgl.Style | string, options?: { diff?: boolean, localIdeographFontFamily?: string }): this;

@@ -74,3 +76,3 @@ getStyle(): mapboxgl.Style;

addSource(id: string, source: VectorSource | RasterSource | GeoJSONSource | ImageSource | VideoSource | GeoJSONSourceRaw): this;
addSource(id: string, source: VectorSource | RasterSource | RasterDemSource | GeoJSONSource | ImageSource | VideoSource | GeoJSONSourceRaw): this;

@@ -83,5 +85,5 @@ isSourceLoaded(id: string): boolean;

getSource(id: string): VectorSource | RasterSource | GeoJSONSource | ImageSource | VideoSource;
getSource(id: string): VectorSource | RasterSource | RasterDemSource | GeoJSONSource | ImageSource | VideoSource;
addImage(name: string, image: HTMLImageElement | ArrayBufferView, options?: { width?: number, height?: number, pixelRatio?: number }): this;
addImage(name: string, image: HTMLImageElement | ArrayBufferView | { width: number, height: number, data: Uint8Array | Uint8ClampedArray } | ImageData, options?: { pixelRatio?: number, sdf?: any }): this;

@@ -94,2 +96,4 @@ hasImage(name: string): boolean;

listImages(): string[];
addLayer(layer: mapboxgl.Layer, before?: string): this;

@@ -105,3 +109,3 @@

setLayerZoomRange(layerId: string, minzoom?: number, maxzoom?: number): this;
setLayerZoomRange(layerId: string, minzoom: number, maxzoom: number): this;

@@ -118,6 +122,10 @@ getFilter(layer: string): any[];

setLight(options: mapboxgl.Light, lightOptions: any): this;
setLight(options: mapboxgl.Light, lightOptions?: any): this;
getLight(): mapboxgl.Light;
setFeatureState(feature: {source?: string, sourceLayer?: string, id?: string}, state: any): void;
getFeatureState(feature: {source?: string, sourceLayer?: string, id?: string}): any;
getContainer(): HTMLElement;

@@ -145,3 +153,3 @@

panBy(offset: number[], options?: mapboxgl.AnimationOptions, eventData?: mapboxgl.EventData): this;
panBy(offset: PointLike, options?: mapboxgl.AnimationOptions, eventData?: mapboxgl.EventData): this;

@@ -174,2 +182,4 @@ panTo(lnglat: LngLatLike, options?: mapboxgl.AnimationOptions, eventdata?: mapboxgl.EventData): this;

cameraForBounds(bounds: LngLatBoundsLike, options?: {padding?: number | PaddingOptions, offset?: PointLike, maxZoom?: number}): CameraOptions;
fitBounds(bounds: LngLatBoundsLike, options?: mapboxgl.FitBoundsOptions, eventData?: mapboxgl.EventData): this;

@@ -217,2 +227,8 @@

clickTolerance?: number;
collectResourceTiming?: boolean;
crossSourceCollisions?: boolean;
/** ID of the container element */

@@ -233,2 +249,4 @@ container?: string | Element;

fadeDuration?: number;
/** If true, map creation will fail if the implementation determines that the performance of the created WebGL context would be dramatically lower than expected. */

@@ -243,2 +261,4 @@ failIfMajorPerformanceCaveat?: boolean;

localIdeographFontFamily?: string;
logoPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';

@@ -260,2 +280,4 @@

pitchWithRotate?: boolean;
refreshExpiredTiles?: boolean;

@@ -274,2 +296,4 @@

transformRequest?: Function;
/** If true, enable the "pinch to rotate and zoom" interaction (see TouchZoomRotateHandler). */

@@ -518,3 +542,3 @@ touchZoomRotate?: boolean;

export interface Source {
type: 'vector' | 'raster' | 'geojson' | 'image' | 'video' | 'canvas';
type: 'vector' | 'raster' | 'raster-dem' | 'geojson' | 'image' | 'video' | 'canvas';
}

@@ -538,2 +562,8 @@

setData(data: GeoJSON.Feature<GeoJSONGeometry> | GeoJSON.FeatureCollection<GeoJSONGeometry> | String): this;
getClusterExpansionZoom(clusterId: number, callback: (error: any, zoom: number) => void): this;
getClusterChildren(clusterId: number, callback: (error: any, features: GeoJSON.Feature<GeoJSONGeometry>[]) => void): this;
getClusterLeaves(cluserId: number, limit: number, offset: number, callback: (error: any, features: GeoJSON.Feature<GeoJSONGeometry>[]) => void): this;
}

@@ -546,2 +576,4 @@

attribution?: string;
buffer?: number;

@@ -612,2 +644,6 @@

play(): void;
pause(): void;
getCanvas(): HTMLCanvasElement;

@@ -630,4 +666,7 @@

tiles?: string[];
bounds?: number[];
scheme?: 'xyz' | 'tms';
minzoom?: number;
maxzoom?: number;
attribution?: string;
}

@@ -639,7 +678,22 @@

tiles?: string[];
bounds?: number[];
minzoom?: number;
maxzoom?: number;
tileSize?: number;
scheme?: 'xyz' | 'tms';
attribution?: string;
}
interface RasterDemSource extends Source {
type: 'raster-dem';
url?: string;
tiles?: string[];
bounds?: number[];
minzoom?: number;
maxzoom?: number;
tileSize?: number;
attribution?: string;
encoding?: 'terrarium' | 'mapbox';
}
/**

@@ -776,3 +830,3 @@ * LngLat

*/
export class Marker {
export class Marker extends Evented {
constructor(options?: mapboxgl.MarkerOptions);

@@ -790,2 +844,4 @@

getElement(): HTMLElement;
setPopup(popup?: Popup): this;

@@ -795,2 +851,4 @@

togglePopup(): this;
getOffset(): PointLike;

@@ -800,3 +858,5 @@

togglePopup(): this;
setDraggable(shouldBeDraggable: boolean): this;
isDraggable(): boolean;
}

@@ -812,2 +872,4 @@

color?: string
draggable?: boolean;
}

@@ -860,2 +922,3 @@

type: string;
target: Map;
map: Map;

@@ -997,3 +1060,3 @@ originalEvent: TouchEvent;

source?: string | VectorSource | RasterSource | GeoJSONSource | ImageSource | VideoSource | GeoJSONSourceRaw;
source?: string | VectorSource | RasterSource | RasterDemSource | GeoJSONSource | ImageSource | VideoSource | GeoJSONSourceRaw;

@@ -1039,3 +1102,3 @@ 'source-layer'?: string;

export interface FillPaint {
'fill-antialias'?: boolean;
'fill-antialias'?: boolean | Expression;
'fill-opacity'?: number | StyleFunction | Expression;

@@ -1047,3 +1110,3 @@ 'fill-opacity-transition'?: Transition;

'fill-outline-color-transition'?: Transition;
'fill-translate'?: number[] | Expression;
'fill-translate'?: number[];
'fill-translate-transition'?: Transition;

@@ -1079,3 +1142,3 @@ 'fill-translate-anchor'?: 'map' | 'viewport';

'line-cap'?: 'butt' | 'round' | 'square';
'line-join'?: 'bevel' | 'round' | 'miter';
'line-join'?: 'bevel' | 'round' | 'miter' | Expression;
'line-miter-limit'?: number | Expression;

@@ -1111,3 +1174,3 @@ 'line-round-limit'?: number | Expression;

'symbol-placement'?: 'point' | 'line';
'symbol-placement'?: 'point' | 'line' | 'line-center';
'symbol-spacing'?: number | Expression;

@@ -1127,3 +1190,3 @@ 'symbol-avoid-edges'?: boolean;

'icon-offset'?: number[] | StyleFunction | Expression;
'icon-anchor'?: Anchor;
'icon-anchor'?: Anchor | StyleFunction | Expression;
'icon-pitch-alignment'?: 'map' | 'viewport' | 'auto';

@@ -1139,3 +1202,3 @@ 'text-pitch-alignment'?: 'map' | 'viewport' | 'auto';

'text-justify'?: 'left' | 'center' | 'right';
'text-anchor'?: Anchor;
'text-anchor'?: Anchor | StyleFunction | Expression;
'text-max-angle'?: number | Expression;

@@ -1199,2 +1262,3 @@ 'text-rotate'?: number | StyleFunction | Expression;

'raster-fade-duration'?: number | Expression;
'raster-resample'?: 'linear' | 'nearest';
}

@@ -1201,0 +1265,0 @@

{
"name": "@types/mapbox-gl",
"version": "0.45.2",
"version": "0.47.0",
"description": "TypeScript definitions for Mapbox GL JS",

@@ -27,4 +27,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "340c4f6d62fd377aa9f332ee04716414da1572cbb214e546cc8244af333f7628",
"typesPublisherContentHash": "56445fc15483e7659e5d9af0472c94180023362e25bf2cc34abead19fd76fddd",
"typeScriptVersion": "2.3"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Wed, 11 Jul 2018 01:14:17 GMT
* Last updated: Mon, 30 Jul 2018 23:12:12 GMT
* Dependencies: geojson

@@ -14,0 +14,0 @@ * Global values: mapboxgl

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