@types/mapbox-gl
Advanced tools
Comparing version 0.54.5 to 1.3.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for Mapbox GL JS v0.54.0 | ||
// Type definitions for Mapbox GL JS v1.3.0 | ||
// Project: https://github.com/mapbox/mapbox-gl-js | ||
@@ -97,5 +97,44 @@ // Definitions by: Dominik Bruderer <https://github.com/dobrud> | ||
queryRenderedFeatures(pointOrBox?: PointLike | [PointLike, PointLike], parameters?: { layers?: string[], filter?: any[] }): MapboxGeoJSONFeature[]; | ||
/** | ||
* Returns an array of GeoJSON Feature objects representing visible features that satisfy the query parameters. | ||
* | ||
* The properties value of each returned feature object contains the properties of its source feature. For GeoJSON sources, only string and numeric property values are supported (i.e. null, Array, and Object values are not supported). | ||
* | ||
* Each feature includes top-level layer, source, and sourceLayer properties. The layer property is an object representing the style layer to which the feature belongs. Layout and paint properties in this object contain values which are fully evaluated for the given zoom level and feature. | ||
* | ||
* Only features that are currently rendered are included. Some features will not be included, like: | ||
* | ||
* - Features from layers whose visibility property is "none". | ||
* - Features from layers whose zoom range excludes the current zoom level. | ||
* - Symbol features that have been hidden due to text or icon collision. | ||
* | ||
* Features from all other layers are included, including features that may have no visible contribution to the rendered result; for example, because the layer's opacity or color alpha component is set to 0. | ||
* | ||
* The topmost rendered feature appears first in the returned array, and subsequent features are sorted by descending z-order. Features that are rendered multiple times (due to wrapping across the antimeridian at low zoom levels) are returned only once (though subject to the following caveat). | ||
* | ||
* Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple times in query results. For example, suppose there is a highway running through the bounding rectangle of a query. The results of the query will be those parts of the highway that lie within the map tiles covering the bounding rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple tiles due to tile buffering. | ||
* | ||
* @param pointOrBox The geometry of the query region: either a single point or southwest and northeast points describing a bounding box. Omitting this parameter (i.e. calling Map#queryRenderedFeatures with zero arguments, or with only a options argument) is equivalent to passing a bounding box encompassing the entire map viewport. | ||
* @param options | ||
*/ | ||
queryRenderedFeatures(pointOrBox?: PointLike | [PointLike, PointLike], options?: { layers?: string[], filter?: any[], validate?: boolean }): MapboxGeoJSONFeature[]; | ||
querySourceFeatures(sourceID: string, parameters?: { sourceLayer?: string, filter?: any[] }): MapboxGeoJSONFeature[]; | ||
/** | ||
* Returns an array of GeoJSON Feature objects representing features within the specified vector tile or GeoJSON source that satisfy the query parameters. | ||
* | ||
* In contrast to Map#queryRenderedFeatures, this function returns all features matching the query parameters, whether or not they are rendered by the current style (i.e. visible). The domain of the query includes all currently-loaded vector tiles and GeoJSON source tiles: this function does not check tiles outside the currently visible viewport. | ||
* | ||
* Because features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple times in query results. For example, suppose there is a highway running through the bounding rectangle of a query. The results of the query will be those parts of the highway that lie within the map tiles covering the bounding rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple tiles due to tile buffering. | ||
* | ||
* @param sourceID The ID of the vector tile or GeoJSON source to query. | ||
* @param parameters | ||
*/ | ||
querySourceFeatures( | ||
sourceID: string, | ||
parameters?: { | ||
sourceLayer?: string; | ||
filter?: any[]; | ||
validate?: boolean; | ||
} | ||
): MapboxGeoJSONFeature[]; | ||
@@ -255,3 +294,3 @@ setStyle(style: mapboxgl.Style | string, options?: { diff?: boolean, localIdeographFontFamily?: string }): this; | ||
/** | ||
* If true, the gl context will be created with MSA antialiasing, which can be useful for antialiasing custom layers. | ||
* If true, the gl context will be created with MSA antialiasing, which can be useful for antialiasing custom layers. | ||
* This is false by default as a performance optimization. | ||
@@ -604,3 +643,7 @@ */ | ||
export class NavigationControl extends Control { | ||
constructor(options?: {showCompass?: boolean, showZoom?: boolean}); | ||
constructor(options?: { | ||
showCompass?: boolean; | ||
showZoom?: boolean; | ||
visualizePitch?: boolean; | ||
}); | ||
} | ||
@@ -667,4 +710,18 @@ | ||
/** | ||
* Sets the geographical location of the popup's anchor, and moves the popup to it. Replaces trackPointer() behavior. | ||
* | ||
* @param lnglat The geographical location to set as the popup's anchor. | ||
*/ | ||
setLngLat(lnglat: LngLatLike): this; | ||
/** | ||
* Tracks the popup anchor to the cursor position, on screens with a pointer device (will be hidden on touchscreens). Replaces the setLngLat behavior. | ||
* For most use cases, `closeOnClick` and `closeButton` should also be set to `false` here. | ||
*/ | ||
trackPointer(): this; | ||
/** Returns the `Popup`'s HTML element. */ | ||
getElement(): HTMLElement; | ||
setText(text: string): this; | ||
@@ -1048,2 +1105,10 @@ | ||
/** | ||
* Returns the distance of 1 meter in MercatorCoordinate units at this latitude. | ||
* | ||
* For coordinates in real world units using meters, this naturally provides the | ||
* scale to transform into MercatorCoordinates. | ||
*/ | ||
meterInMercatorCoordinateUnits(): number; | ||
/** Project a LngLat to a MercatorCoordinate. */ | ||
@@ -1050,0 +1115,0 @@ static fromLngLat(lngLatLike: LngLatLike, altitude?: number): MercatorCoordinate; |
{ | ||
"name": "@types/mapbox-gl", | ||
"version": "0.54.5", | ||
"version": "1.3.0", | ||
"description": "TypeScript definitions for Mapbox GL JS", | ||
@@ -44,4 +44,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "6c00cc80bd267d900ce1df919545e970c46860e3a9c4b312c0ae42988d10d7ed", | ||
"typesPublisherContentHash": "a24577339adaf0b1c834a8d34387d6c1df26cff7d5ef265622e7f482fdcce488", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Tue, 22 Oct 2019 20:22:51 GMT | ||
* Last updated: Mon, 28 Oct 2019 17:35:34 GMT | ||
* Dependencies: @types/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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
62541
1350
1