@2gis/mapgl
Advanced tools
Comparing version 1.42.0 to 1.43.0
{ | ||
"name": "@2gis/mapgl", | ||
"version": "1.42.0", | ||
"version": "1.43.0", | ||
"description": "MapGL API script loader with typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -6,3 +6,3 @@ import { MapOptions, FitBoundsOptions, Padding, StyleState, SupportedSimpleOpts, GLContext } from './types'; | ||
import { LngLatBounds, LngLatBoundsClass } from './objects/lngLatBounds'; | ||
import { Layer, StyleIconConfig } from './types/styles'; | ||
import { Layer, StyleIconConfig, StyleOptions } from './types/styles'; | ||
import { DefaultSource } from './sources/defaultSource'; | ||
@@ -165,3 +165,3 @@ /** | ||
/** | ||
* Uploads styles object by its id and apply it to the map. | ||
* Uploads styles object by its id and applies it to the map. | ||
* Returns a promise that contains param styleId. | ||
@@ -172,2 +172,20 @@ * @param styleId uuid of the style. | ||
/** | ||
* Experimental method. | ||
* Uploads styles object from URL and applies it to the map. | ||
* Returns a promise that contains param styleId. | ||
* | ||
* Warning: Setting a style this way might result in an incompatible style being applied. Map styles | ||
* are constantly evolving in order to display new cartographic data. By storing the style on your | ||
* own side, you assume the responsibility to update it periodically and take care of its relevance. | ||
* | ||
* Use it only if you know that the style at this url is compatible with your version of mapgl. | ||
* In other cases it is recommended to use setStyleById to set a style from the Style Editor. | ||
* | ||
* @param styleUrl Base URL of the style. It is used to resolve paths provided in the options. | ||
* @param options Contains paths to styles, icons, fonts, models etc | ||
* | ||
* @hidden | ||
*/ | ||
setStyleFromUrl(styleUrl: string, options: StyleOptions): Promise<string>; | ||
/** | ||
* Sets the desired map language. | ||
@@ -174,0 +192,0 @@ * @param lang short string code 'en', 'ru', ...etc |
@@ -138,3 +138,7 @@ import { LngLatBounds } from '../objects/lngLatBounds'; | ||
/** | ||
* Map style options. Containts path to style assets - icons and fonts. | ||
* Map style options. Containts path to style assets - icons, fonts, models etc. | ||
* Warning: If the options are incompatible, a broken style might be applied. | ||
* Map styles are constantly evolving in order to display new cartographic data. | ||
* By storing the style on your own side, you assume the responsibility to update it periodically and take care of its relevance. | ||
* It is recommended to use map.setStyleById to update styles during runtime. | ||
*/ | ||
@@ -418,3 +422,7 @@ styleOptions?: Partial<StyleOptions>; | ||
/** | ||
* Geographical coordinates `[longitude, latitude]` of the top-left corner of the HTML marker, taking into account its anchor. | ||
* An array of numbers `[longitude, latitude, height?]`, where: | ||
* - `longitude` and `latitude` are the geographical coordinates of the top-left corner of the HTML marker. | ||
* Taking into account the `anchor` option. | ||
* - `height` is an optional number in meters by which the marker will be raised/lowered (depending on the sign of the value) | ||
* relative to the map surface. 0 by default. | ||
*/ | ||
@@ -421,0 +429,0 @@ coordinates: number[]; |
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
79975
2542