New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@2gis/mapgl

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@2gis/mapgl - npm Package Compare versions

Comparing version 1.8.0 to 1.9.0

types/controls/floor/index.d.ts

2

package.json
{
"name": "@2gis/mapgl",
"version": "1.8.0",
"version": "1.9.0",
"description": "MapGL API script loader with typings",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -12,5 +12,7 @@ import { Map } from './map';

import { TrafficControl } from './controls/traffic';
export { Map, Marker, Label, HtmlMarker, Control, ZoomControl, TrafficControl, CircleMarker, Circle, Polygon, Polyline, };
import { FloorControl } from './controls/floor';
export { Map, Marker, Label, HtmlMarker, Control, ZoomControl, TrafficControl, FloorControl, CircleMarker, Circle, Polygon, Polyline, };
export { LngLatBounds, LngLatBoundsClass } from './objects/lngLatBounds';
export { AnimationOptions, RotationAnimationOptions, Easing } from './types/animations';
export { MapOptions, MarkerOptions, LabelOptions, ControlOptions, HtmlMarkerOptions, LngLatBounds, CircleMarkerOptions, CircleOptions, PolygonOptions, PolylineOptions, MapSupportOptions, } from './types';
export { MapOptions, MarkerOptions, LabelOptions, ControlOptions, HtmlMarkerOptions, CircleMarkerOptions, CircleOptions, PolygonOptions, PolylineOptions, MapSupportOptions, } from './types';
export { MapEventTable, DynamicObjectEventTable, MapEvent, MapPointerEvent, EventTarget, } from './types/events';

@@ -17,0 +19,0 @@ export { isSupported, notSupportedReason } from './isSuported';

@@ -1,5 +0,7 @@

import { MapOptions, LngLatBounds, FitBoundsOptions } from './types';
import { Map as JMap } from '@webmaps/jakarta';
import { MapOptions, FitBoundsOptions, Padding } from './types';
import { MapEventTable } from './types/events';
import { AnimationOptions, RotationAnimationOptions } from './types/animations';
import { Evented } from './utils/evented';
import { LngLatBounds, LngLatBoundsClass } from './objects/lngLatBounds';
/**

@@ -110,3 +112,3 @@ * The main class for map initialization.

*/
getBounds(): LngLatBounds;
getBounds(): LngLatBoundsClass;
/**

@@ -147,11 +149,2 @@ * Returns pixel coordinates `[x, y]`, relative to the map's container, that correspond to the specified geographical coordinates.

/**
* Sets options that affect the map style.
* @param options The style options.
*
* @hidden
*/
setStyleOptions(options: {
traffic: boolean;
}): this;
/**
* Selects objects on the map by identifiers.

@@ -176,2 +169,19 @@ * @param ids An array of identifiers of objects that should be selected.

/**
* Sets a floorLevel of the floorPlan.
* @param floorPlanId id of the floor plan
* @param floorLevelIndex floorLevelIndex in floorLevels list
*/
setFloorPlanLevel(floorPlanId: string, floorLevelIndex: number): void;
/**
* Returns the current map padding.
*/
getPadding(): import("@webmaps/jakarta").Padding;
/**
* Sets the map padding.
* the padding on each side has a clamp to a positive value no larger than the map canvas size for either side
* @param padding Padding in pixels from the different sides of the map canvas
* @param options Padding animation options.
*/
setPadding(padding: Partial<Padding>, options?: AnimationOptions): JMap;
/**
* Pans and zooms the map to contain its visible area within the specified geographical bounds.

@@ -186,2 +196,27 @@ * This method also resets the map pitch and rotation to 0.

/**
* Sets whole map style global variables at once, any previously set variables will be reset or overriden.
*
* @param styleState
*/
setStyleState(styleState: {
[key: string]: boolean;
}): this;
/**
* Sets options that affect the map style.
* @param options The style options.
*
* @hidden
*/
setStyleOptions(options: {
traffic: boolean;
}): this;
/**
* Patches map style global variables. Use this method if you want to change a particular variable and left other ones intact.
*
* @param styleState
*/
patchStyleState(styleState: {
[key: string]: boolean;
}): this;
/**
* Destroys the map and frees all related resources.

@@ -188,0 +223,0 @@ */

@@ -122,2 +122,14 @@ /**

trafficscore: TrafficScoreEvent;
/**
* Emitted after the floor plan is shown on the map.
*/
floorplanshow: FloorPlanShowEvent;
/**
* Emitted after the floor plan is disappeared from the map.
*/
floorplanhide: FloorPlanHideEvent;
/**
* Emitted after the floor plan level is changed.
*/
floorlevelchange: FloorLevelChangeEvent;
}

@@ -203,1 +215,17 @@ /**

}
export interface FloorPlanShowEvent {
floorPlanId: string;
currentFloorLevelIndex: number;
floorLevels: Array<{
floorLevelIndex: number;
floorLevelName: string;
}>;
}
export interface FloorPlanHideEvent {
floorPlanId: string;
}
export interface FloorLevelChangeEvent {
floorPlanId: string;
floorLevelIndex: number;
floorLevelName: string;
}

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

import { LngLatBounds } from '../objects/lngLatBounds';
import { AnimationOptions } from './animations';

@@ -61,2 +62,6 @@ /**

/**
* Whether a floor control should be added during the map initialization. By default it's false.
*/
floorControl?: boolean;
/**
* Enable OSM copyright auto hide after 5 sec

@@ -78,2 +83,7 @@ */

/**
* Dimensions in pixels applied on each side of the viewport for shifting the vanishing point.
* the padding on each side has a clamp to a positive value no larger than the map canvas size for either side
*/
padding?: Padding;
/**
* Set preserveDrawingBuffer option to WebGLRenderingContext.

@@ -91,2 +101,8 @@ */

/**
* Map style global variables
*/
styleState?: {
[key: string]: boolean;
};
/**
* The desired map language.

@@ -277,15 +293,2 @@ * short language code 'en', 'ru', ...etc

/**
* Geographical bounds.
*/
export interface LngLatBounds {
/**
* The south-west point of the bounds `[longitude, latitude]`.
*/
southWest: number[];
/**
* The north-east point of the bounds `[longitude, latitude]`.
*/
northEast: number[];
}
/**
* Polygon initialization options.

@@ -528,6 +531,6 @@ */

export interface Padding {
top?: number;
right?: number;
bottom?: number;
left?: number;
top: number;
right: number;
bottom: number;
left: number;
}

@@ -538,4 +541,8 @@ export interface FitBoundsOptions {

*/
padding?: Padding;
padding?: Partial<Padding>;
/**
* If true fitBounds ignores the padding property in the map options
*/
skipMapPadding?: boolean;
/**
* If true the fitBounds will consider the map rotation

@@ -542,0 +549,0 @@ */

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