@2gis/mapgl
Advanced tools
Comparing version 1.7.0 to 1.8.0
{ | ||
"name": "@2gis/mapgl", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "MapGL API script loader with typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -14,4 +14,6 @@ import { Map } from './map'; | ||
export { AnimationOptions, RotationAnimationOptions, Easing } from './types/animations'; | ||
export { MapOptions, MarkerOptions, LabelOptions, ControlOptions, HtmlMarkerOptions, LngLatBounds, CircleMarkerOptions, CircleOptions, PolygonOptions, PolylineOptions, } from './types'; | ||
export { MapOptions, MarkerOptions, LabelOptions, ControlOptions, HtmlMarkerOptions, LngLatBounds, CircleMarkerOptions, CircleOptions, PolygonOptions, PolylineOptions, MapSupportOptions, } from './types'; | ||
export { MapEventTable, DynamicObjectEventTable, MapEvent, MapPointerEvent, EventTarget, } from './types/events'; | ||
export { isSupported, notSupportedReason } from './isSuported'; | ||
import './callback'; | ||
import './plugins'; |
@@ -1,2 +0,2 @@ | ||
import { MapOptions, LngLatBounds } from './types'; | ||
import { MapOptions, LngLatBounds, FitBoundsOptions } from './types'; | ||
import { MapEventTable } from './types/events'; | ||
@@ -174,2 +174,11 @@ import { AnimationOptions, RotationAnimationOptions } from './types/animations'; | ||
/** | ||
* Pans and zooms the map to contain its visible area within the specified geographical bounds. | ||
* This method also resets the map pitch and rotation to 0. | ||
* But the map rotation can be saved by option considerRotation | ||
* | ||
* @param bounds The geographical bounds to fit in | ||
* @param options FitBounds options | ||
*/ | ||
fitBounds(bounds: LngLatBounds, options?: FitBoundsOptions): this; | ||
/** | ||
* Destroys the map and frees all related resources. | ||
@@ -176,0 +185,0 @@ */ |
@@ -0,1 +1,2 @@ | ||
import { AnimationOptions } from './animations'; | ||
/** | ||
@@ -94,2 +95,13 @@ * Map initialization options. | ||
/** | ||
* Options for Map.isSupported method. | ||
*/ | ||
export interface MapSupportOptions { | ||
/** | ||
* Causes isSupported method to return false if | ||
* the performance of MapGL would be dramatically worse than | ||
* expected (i.e. a software renderer is would be used) | ||
*/ | ||
failIfMajorPerformanceCaveat: boolean; | ||
} | ||
/** | ||
* Marker initialization options. | ||
@@ -445,5 +457,10 @@ */ | ||
* CircleMarker radius in pixels. | ||
* @hidden | ||
*/ | ||
radius?: number; | ||
/** | ||
* CircleMarker diameter in pixels. | ||
*/ | ||
diameter?: number; | ||
/** | ||
* Stroke color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format. | ||
@@ -505,1 +522,24 @@ */ | ||
} | ||
/** | ||
* Padding in pixels from the different sides of the map canvas. | ||
*/ | ||
export interface Padding { | ||
top?: number; | ||
right?: number; | ||
bottom?: number; | ||
left?: number; | ||
} | ||
export interface FitBoundsOptions { | ||
/** | ||
* The amount of padding in pixels to add to the given bounds. | ||
*/ | ||
padding?: Padding; | ||
/** | ||
* If true the fitBounds will consider the map rotation | ||
*/ | ||
considerRotation?: boolean; | ||
/** | ||
* Animation options. | ||
*/ | ||
animation?: AnimationOptions; | ||
} |
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
45510
33
1445