@2gis/mapgl
Advanced tools
| import type { Map } from '../map'; | ||
| import type { ArrowOptions } from '../types/index'; | ||
| import type { DynamicObjectEventTable } from '../types/events'; | ||
| import { Evented } from '../utils/evented'; | ||
| /** | ||
| * Class for creating an arrow on the map. | ||
| */ | ||
| export declare class Arrow extends Evented<DynamicObjectEventTable<Arrow>> { | ||
| /** | ||
| * User specific data. Empty by default | ||
| */ | ||
| userData: any; | ||
| /** | ||
| * Example: | ||
| * ```js | ||
| * const arrow = new mapgl.Arrow(map, { | ||
| * coordinates: [ | ||
| * [ | ||
| * [82.920412, 55.030111], | ||
| * [82.920437, 55.030231], | ||
| * ], | ||
| * ], | ||
| * }); | ||
| * ``` | ||
| * @param map The map instance. | ||
| * @param options Arrow options. | ||
| */ | ||
| constructor(map: Map, options: ArrowOptions); | ||
| /** | ||
| * Destroys the arrow. | ||
| */ | ||
| destroy(): void; | ||
| private _emitPointerEvent; | ||
| } |
+1
-1
| { | ||
| "name": "@2gis/mapgl", | ||
| "version": "1.71.0", | ||
| "version": "1.72.0", | ||
| "description": "MapGL API script loader with typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+3
-2
@@ -10,2 +10,3 @@ import { Map } from './map'; | ||
| import { Raster } from './objects/raster'; | ||
| import { Arrow } from './objects/arrow'; | ||
| import { GltfModel } from './objects/gltfModel'; | ||
@@ -21,7 +22,7 @@ import { Control } from './controls/control'; | ||
| import { DefaultSource } from './sources/defaultSource'; | ||
| export { Map, Marker, Label, HtmlMarker, Control, ZoomControl, TrafficControl, ScaleControl, FloorControl, CircleMarker, Circle, Polygon, Polyline, GeoJsonSource, GeoJsonViewportSource, DefaultSource, RasterTileSource, Raster, GltfModel, }; | ||
| export { Map, Marker, Label, HtmlMarker, Control, ZoomControl, TrafficControl, ScaleControl, FloorControl, CircleMarker, Circle, Polygon, Polyline, GeoJsonSource, GeoJsonViewportSource, DefaultSource, RasterTileSource, Raster, Arrow, GltfModel, }; | ||
| export { type LngLatBounds, LngLatBoundsClass } from './objects/lngLatBounds'; | ||
| export type { StyleIconConfig, StyleOptions } from './types/styles'; | ||
| export type { AnimationOptions, RotationAnimationOptions, Easing } from './types/animations'; | ||
| export type { GltfModelOptions, GltfModelTransformationOptions, CircleMarkerOptions, CircleOptions, ControlOptions, ControlPosition, FitBoundsOptions, GeoJsonSourceOptions, GeoJsonViewportSourceOptions, HtmlMarkerOptions, LabelImage, LabelOptions, MapOptions, MapSupportOptions, MarkerIconOptions, MarkerLabelOptions, MarkerOptions, Padding, PolygonOptions, PolylineOptions, RasterTileSourceOptions, SourceAttributes, RasterOptions, RasterSource, FeatureState, FeatureStateMap, } from './types'; | ||
| export type { GltfModelOptions, GltfModelTransformationOptions, CircleMarkerOptions, CircleOptions, ArrowOptions, ControlOptions, ControlPosition, FitBoundsOptions, GeoJsonSourceOptions, GeoJsonViewportSourceOptions, HtmlMarkerOptions, LabelImage, LabelOptions, MapOptions, MapSupportOptions, MarkerIconOptions, MarkerLabelOptions, MarkerOptions, Padding, PolygonOptions, PolylineOptions, RasterTileSourceOptions, SourceAttributes, RasterOptions, RasterSource, FeatureState, FeatureStateMap, } from './types'; | ||
| export type { DefaultEventTargetData, DynamicObjectEventTable, DynamicObjectPointerEvent, EventTarget, EventTargetData, FloorLevelChangeEvent, FloorPlanHideEvent, FloorPlanShowEvent, GeoJsonEventTargetData, MapEvent, MapEventTable, MapPointerEvent, PointerEvent, StyleLoadEvent, TrafficScoreEvent, TrafficVisibilityEvent, } from './types/events'; | ||
@@ -28,0 +29,0 @@ export { isSupported, notSupportedReason } from './isSuported'; |
@@ -885,2 +885,85 @@ import type { LngLatBounds } from '../objects/lngLatBounds'; | ||
| /** | ||
| * Arrow initialization options. | ||
| */ | ||
| export interface ArrowOptions extends TierOption { | ||
| /** | ||
| * Arrow path or an array of arrow paths. | ||
| * | ||
| * **Simple case — a single arrow** (`number[][]`): | ||
| * An array of points `[firstPoint, secondPoint, ...]`, | ||
| * where each point is a geographical coordinate `[longitude, latitude]`. | ||
| * | ||
| * **General case — multiple arrows** (`number[][][]`): | ||
| * An array of paths `[firstArrowPath, secondArrowPath, ...]`, | ||
| * where each path is an array of points `[firstPoint, secondPoint, ...]`, | ||
| * and each point is a geographical coordinate `[longitude, latitude]`. | ||
| * | ||
| * Each path defines a single arrow drawn along it with an arrow tip at the end. | ||
| * Multiple paths can be provided to draw several arrows within one Arrow object. | ||
| */ | ||
| coordinates: number[][] | number[][][]; | ||
| /** | ||
| * Draw order. | ||
| */ | ||
| zIndex?: number; | ||
| /** | ||
| * Minimum display styleZoom. | ||
| */ | ||
| minZoom?: number; | ||
| /** | ||
| * Maximum display styleZoom. | ||
| */ | ||
| maxZoom?: number; | ||
| /** | ||
| * Fill color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format. | ||
| */ | ||
| color?: string; | ||
| /** | ||
| * Stroke color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format. | ||
| */ | ||
| strokeColor?: string; | ||
| /** | ||
| * Line width in pixels. | ||
| */ | ||
| width?: number; | ||
| /** | ||
| * Stroke width in pixels. | ||
| */ | ||
| strokeWidth?: number; | ||
| /** | ||
| * The rounding radius of arrow corners in pixels. Should correspond the width value. | ||
| */ | ||
| roundingRadius?: number; | ||
| /** | ||
| * The width multiplier of the arrow tip. | ||
| */ | ||
| tipWidthMultiplier?: number; | ||
| /** | ||
| * The height multiplier of the arrow tip. | ||
| */ | ||
| tipHeightMultiplier?: number; | ||
| /** | ||
| * The amplitude of the tip movement during animation in pixels. | ||
| */ | ||
| tipMovementAmplitude?: number; | ||
| /** | ||
| * Whether to animate the arrow. `false` by default. | ||
| */ | ||
| animate?: boolean; | ||
| /** | ||
| * Number of animation iterations. | ||
| * Set to `1` for a single animation or a higher number for repeated animations. | ||
| * Note: This option takes effect only when `animate` is `true`. | ||
| */ | ||
| iterationCount?: number; | ||
| /** | ||
| * User specific data. | ||
| */ | ||
| userData?: any; | ||
| /** | ||
| * Whether the arrow responds to pointer events. `true` by default. | ||
| */ | ||
| interactive?: boolean; | ||
| } | ||
| /** | ||
| * Source image for text label background. | ||
@@ -1354,3 +1437,3 @@ */ | ||
| */ | ||
| export type GraphicsPresetFeatureFlag = 'skyOff' | 'fogOff' | 'shadowsOff' | 'immersiveRoadsOff' | 'modelsOff' | 'globeOff'; | ||
| export type GraphicsPresetFeatureFlag = 'skyOff' | 'fogOff' | 'shadowsOff' | 'immersiveRoadsOff' | 'reliefOff' | 'modelsOff' | 'globeOff'; | ||
| /** | ||
@@ -1357,0 +1440,0 @@ * Graphics preset. |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
131565
2.63%49
2.08%4178
2.91%