@2gis/mapgl
Advanced tools
Comparing version 1.49.0 to 1.50.0
{ | ||
"name": "@2gis/mapgl", | ||
"version": "1.49.0", | ||
"version": "1.50.0", | ||
"description": "MapGL API script loader with typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -28,1 +28,2 @@ import { Map } from './map'; | ||
import './plugins'; | ||
export declare const API_VERSION: string | undefined; |
@@ -170,4 +170,5 @@ import { MapOptions, FitBoundsOptions, Padding, StyleState, SupportedSimpleOpts, GLContext } from './types'; | ||
* @param ids An array of identifiers of objects that should be selected. | ||
* @param scope The scope of the identifiers. If not specified default scope is used. | ||
*/ | ||
setSelectedObjects(ids?: string[]): this; | ||
setSelectedObjects(ids?: string[], scope?: string): this; | ||
/** | ||
@@ -174,0 +175,0 @@ * Uploads styles object by its id and applies it to the map. |
@@ -28,3 +28,3 @@ import { Map } from '../map'; | ||
*/ | ||
setIcon(iconOptions: MarkerIconOptions): this; | ||
setIcon({ icon, anchor, size, opacity }: MarkerIconOptions): this; | ||
/** | ||
@@ -31,0 +31,0 @@ * Sets the hover icon of the marker. If you pass empty options, the current hover just will be deleted. |
@@ -256,2 +256,6 @@ import { Style } from './styles'; | ||
feature: Feature; | ||
/** | ||
* ID of the feature. | ||
*/ | ||
id?: string | number; | ||
} | ||
@@ -258,0 +262,0 @@ /** |
import { LngLatBounds } from '../objects/lngLatBounds'; | ||
import { AnimationOptions } from './animations'; | ||
import { InterpolateExpression, StepExpression, StyleOptions } from './styles'; | ||
import { StyleOptions, Expression } from './styles'; | ||
import { Feature, FeatureCollection } from 'geojson'; | ||
@@ -106,2 +106,6 @@ import { RasterTileSource } from '../sources/rasterTileSource'; | ||
/** | ||
* Disables hiding POIs behind objects such as buildings, 3D models, etc. False by default. | ||
*/ | ||
disableHidingPois?: boolean; | ||
/** | ||
* Disables map zoom on scrolling over the map container. | ||
@@ -222,2 +226,4 @@ */ | ||
anchor?: number[]; | ||
/** Marker icon opacity. */ | ||
opacity?: number | Expression; | ||
/** | ||
@@ -239,2 +245,4 @@ * Icon clockwise rotation in the screen plane in degrees. | ||
hoverAnchor?: number[]; | ||
/** Marker icon opacity in hovered state. */ | ||
hoverOpacity?: number | Expression; | ||
/** | ||
@@ -288,3 +296,3 @@ * Draw order. | ||
*/ | ||
color?: string; | ||
color?: string | Expression; | ||
/** | ||
@@ -301,3 +309,3 @@ * Text size. | ||
*/ | ||
haloColor?: string; | ||
haloColor?: string | Expression; | ||
/** | ||
@@ -353,2 +361,6 @@ * Space between each letter. | ||
size?: number[]; | ||
/** | ||
* Marker icon opacity. | ||
*/ | ||
opacity?: number | Expression; | ||
} | ||
@@ -386,3 +398,3 @@ /** | ||
*/ | ||
color?: string; | ||
color?: string | Expression; | ||
/** | ||
@@ -399,3 +411,3 @@ * Text size. | ||
*/ | ||
haloColor?: string; | ||
haloColor?: string | Expression; | ||
/** | ||
@@ -602,3 +614,3 @@ * Space between each letter. | ||
*/ | ||
width?: number | InterpolateExpression<number>; | ||
width?: number | Expression; | ||
/** | ||
@@ -610,3 +622,3 @@ * The second line width in pixels. | ||
*/ | ||
width2?: number | InterpolateExpression<number>; | ||
width2?: number | Expression; | ||
/** | ||
@@ -618,3 +630,3 @@ * The third line width in pixels. | ||
*/ | ||
width3?: number | InterpolateExpression<number>; | ||
width3?: number | Expression; | ||
/** | ||
@@ -641,3 +653,3 @@ * The line color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format. | ||
*/ | ||
gapLength?: number | InterpolateExpression<number>; | ||
gapLength?: number | Expression; | ||
/** | ||
@@ -650,3 +662,3 @@ * The gap color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format. | ||
*/ | ||
dashLength?: number | InterpolateExpression<number>; | ||
dashLength?: number | Expression; | ||
/** | ||
@@ -905,2 +917,15 @@ * Minimum display styleZoom. | ||
modelsPath?: string; | ||
/** | ||
* Name of the object attribute to use as ID. If specified, ID will be presented in GeoJsonEventTargetData. | ||
*/ | ||
promoteId?: string; | ||
/** | ||
* Put IDs of source features to separate ID-scope. | ||
* If idScope isn't specified, all IDs will be added into the default scope. | ||
* Objects that have the same ID inside ID-scope will be processed by map as one object. | ||
* For example, these objects will be selected simultaneously. | ||
* | ||
* Scope of the identifiers is used for objects selection, see method map.setSelectedObjects. | ||
*/ | ||
idScope?: string; | ||
} | ||
@@ -973,3 +998,3 @@ /** | ||
*/ | ||
opacity?: number | InterpolateExpression<number>; | ||
opacity?: number | Expression; | ||
} | ||
@@ -1011,2 +1036,7 @@ /** | ||
/** | ||
* Defines whether or not the non-interactive model blocks interaction | ||
* with other objects behind it. | ||
*/ | ||
interactiveOcclusion?: boolean; | ||
/** | ||
* Minimum display styleZoom of the model. | ||
@@ -1039,3 +1069,3 @@ */ | ||
*/ | ||
nearCameraFade?: number | InterpolateExpression<number>; | ||
nearCameraFade?: number | Expression; | ||
/** | ||
@@ -1045,3 +1075,3 @@ * The percentage of visible model instances in the range from 0.0 to 1.0. | ||
*/ | ||
showRatio?: number | InterpolateExpression<number> | StepExpression<number>; | ||
showRatio?: number | Expression; | ||
/** | ||
@@ -1058,3 +1088,3 @@ * User specific data. | ||
*/ | ||
color?: string | InterpolateExpression<string>; | ||
color?: string | Expression; | ||
/** | ||
@@ -1067,3 +1097,3 @@ * The hover gltf options | ||
*/ | ||
color?: string | InterpolateExpression<string>; | ||
color?: string | Expression; | ||
}; | ||
@@ -1077,3 +1107,3 @@ } | ||
export type TileCoords = [number, number, number]; | ||
export type SupportedSimpleOpts = 'disableDragging' | 'enableTrackResize' | 'loopWorld'; | ||
export type SupportedSimpleOpts = 'disableDragging' | 'enableTrackResize' | 'loopWorld' | 'disableHidingPois'; | ||
export type GLContext = WebGLRenderingContext | WebGL2RenderingContext; |
@@ -0,1 +1,4 @@ | ||
/** | ||
* @deprecated | ||
*/ | ||
export type InterpolateExpression<T extends number | string> = [ | ||
@@ -11,3 +14,4 @@ 'interpolate', | ||
]; | ||
export type StepExpression<T extends number> = ['step', ...T[]]; | ||
export type ExpressionName = 'interpolate' | 'step' | 'match'; | ||
export type Expression = [ExpressionName, ...any[]]; | ||
/** | ||
@@ -14,0 +18,0 @@ * Stub type representing the style layer. |
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
89954
2816