@maptiler/sdk 3.11.1 → 4.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/maptiler-sdk.mjs +2390 -2375
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/src/Map.d.ts +0 -10
- package/dist/src/config.d.ts +2 -2
- package/dist/src/geocoding.d.ts +25 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/tools.d.ts +1 -0
- package/package.json +2 -2
package/dist/src/Map.d.ts
CHANGED
|
@@ -482,16 +482,6 @@ export declare class Map extends maplibregl.Map {
|
|
|
482
482
|
* Returns whether a globe projection is currently being used
|
|
483
483
|
*/
|
|
484
484
|
isGlobeProjection(): boolean;
|
|
485
|
-
/**
|
|
486
|
-
* Activate the globe projection and persist this change during future style changes.
|
|
487
|
-
* @deprecated Will be removed in v4.0.0. Use `map.setProjection("globe", { persist: true })` instead.
|
|
488
|
-
*/
|
|
489
|
-
enableGlobeProjection(): void;
|
|
490
|
-
/**
|
|
491
|
-
* Activate the mercator projection and persist this change during future style changes.
|
|
492
|
-
* @deprecated Will be removed in v4.0.0. Use `map.setProjection("mercator", { persist: true })` instead.
|
|
493
|
-
*/
|
|
494
|
-
enableMercatorProjection(): void;
|
|
495
485
|
/**
|
|
496
486
|
* Sets the projection to one of {@linkcode ProjectionTypes}.
|
|
497
487
|
* @param projection - the projection type to set
|
package/dist/src/config.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ declare class SdkConfig extends EventEmitter {
|
|
|
19
19
|
/**
|
|
20
20
|
* Setting on whether of not the SDK runs with a session logic.
|
|
21
21
|
* A "session" is started at the initialization of the SDK and finished when the browser
|
|
22
|
-
* page is being refreshed.
|
|
22
|
+
* page is being closed or refreshed.
|
|
23
23
|
* When `session` is enabled (default: true), the extra URL param `mtsid` is added to queries
|
|
24
|
-
*
|
|
24
|
+
* to the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
|
|
25
25
|
*/
|
|
26
26
|
session: boolean;
|
|
27
27
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as client from "@maptiler/client";
|
|
2
|
+
export type ExtraGeocodingOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Specifies whether the geocoding request runs with a session logic.
|
|
5
|
+
* A "session" is started at the initialization of the SDK and finished when the browser
|
|
6
|
+
* page is being closed or refreshed.
|
|
7
|
+
* When this option is enabled, extra URL param `mtsid` is added to queries
|
|
8
|
+
* to the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
|
|
9
|
+
*
|
|
10
|
+
* Default: value of this option in global config (which is `true` by default).
|
|
11
|
+
*/
|
|
12
|
+
session?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type LanguageGeocodingOptions = client.LanguageGeocodingOptions;
|
|
15
|
+
export type BaseGeocodingOptions = client.BaseGeocodingOptions & ExtraGeocodingOptions;
|
|
16
|
+
export type CommonForwardAndReverseGeocodingOptions = client.CommonForwardAndReverseGeocodingOptions & ExtraGeocodingOptions;
|
|
17
|
+
export type GeocodingOptions = client.GeocodingOptions & ExtraGeocodingOptions;
|
|
18
|
+
export type ReverseGeocodingOptions = client.ReverseGeocodingOptions & ExtraGeocodingOptions;
|
|
19
|
+
export type ByIdGeocodingOptions = client.ByIdGeocodingOptions & ExtraGeocodingOptions;
|
|
20
|
+
export declare const geocoding: {
|
|
21
|
+
forward: (query: string, options?: GeocodingOptions) => Promise<client.GeocodingSearchResult>;
|
|
22
|
+
reverse: (position: client.Position, options?: ReverseGeocodingOptions) => Promise<client.GeocodingSearchResult>;
|
|
23
|
+
byId: (id: string, options?: ByIdGeocodingOptions) => Promise<client.GeocodingSearchResult>;
|
|
24
|
+
batch: (queries: string[], options?: GeocodingOptions) => Promise<client.GeocodingSearchResult[]>;
|
|
25
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -84,8 +84,9 @@ export { MapTouchEvent } from './MLAdapters/MapTouchEvent';
|
|
|
84
84
|
export { MapMouseEvent } from './MLAdapters/MapMouseEvent';
|
|
85
85
|
export * from './ml-types';
|
|
86
86
|
export { Map, GeolocationType, type MapOptions, type LoadWithTerrainEvent } from './Map';
|
|
87
|
+
export { type BaseGeocodingOptions, type ByIdGeocodingOptions, type CommonForwardAndReverseGeocodingOptions, type GeocodingOptions, type LanguageGeocodingOptions, type ReverseGeocodingOptions, geocoding, } from './geocoding';
|
|
87
88
|
export * from './controls';
|
|
88
|
-
export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type
|
|
89
|
+
export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type CenteredStaticMapOptions, type CoordinateExport, type CoordinateGrid, type CoordinateId, type CoordinateSearch, type CoordinateSearchResult, type CoordinateTransformResult, type CoordinateTransformation, type Coordinates, type CoordinatesSearchOptions, type CoordinatesTransformOptions, type DefaultTransformation, type ElevationAtOptions, type ElevationBatchOptions, type FeatureHierarchy, type FetchFunction, type GeocodingFeature, type GeocodingSearchResult, type GeolocationInfoOptions, type GeolocationResult, type GetDataOptions, MapStyle, type MapStylePreset, type MapStyleType, MapStyleVariant, type PixelData, ReferenceMapStyle, ServiceError, type StaticMapBaseOptions, type StaticMapMarker, type TileJSON, type XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geolocation, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle, type LanguageInfo, areSameLanguages, toLanguageInfo, isLanguageInfo, getAutoLanguage, getLanguageInfoFromFlag, getLanguageInfoFromCode, getLanguageInfoFromKey, canParsePixelData, } from '@maptiler/client';
|
|
89
90
|
export * from './ImageViewer';
|
|
90
91
|
export { getWebGLSupportError, displayWebGLContextLostWarning } from './tools';
|
|
91
92
|
export { config, SdkConfig } from './config';
|
package/dist/src/tools.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export declare function checkNamePattern(str: string, localized: boolean): {
|
|
|
66
66
|
* Replaces the occurences of {name:xx} in a string by a provided object-expression to return a concat object expression
|
|
67
67
|
*/
|
|
68
68
|
export declare function replaceLanguage(origLang: string, newLang: maplibregl.ExpressionSpecification, localized: boolean): maplibregl.ExpressionSpecification;
|
|
69
|
+
export declare function addFormatElevationExpressionFromString(expression: maplibregl.ExpressionSpecification | string): maplibregl.ExpressionSpecification | string;
|
|
69
70
|
/**
|
|
70
71
|
* Find languages used in string label definition.
|
|
71
72
|
* The returned array contains languages such as "en", "fr" but
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptiler/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-rc.1",
|
|
4
4
|
"description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
|
|
5
5
|
"author": "MapTiler",
|
|
6
6
|
"module": "dist/maptiler-sdk.mjs",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@maplibre/maplibre-gl-style-spec": "~24.4.1",
|
|
101
|
-
"@maptiler/client": "
|
|
101
|
+
"@maptiler/client": "^3.0.0-rc.1",
|
|
102
102
|
"eslint-plugin-compat": "^6.1.0",
|
|
103
103
|
"events": "^3.3.0",
|
|
104
104
|
"gl-matrix": "^3.4.4",
|