@maptiler/sdk 1.0.0
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/.eslintignore +1 -0
- package/.eslintrc.cjs +10 -0
- package/.github/workflows/npm-publish.yml +23 -0
- package/LICENSE +29 -0
- package/demos/maptiler-sdk.css +147 -0
- package/demos/maptiler-sdk.umd.js +3287 -0
- package/demos/simple.html +63 -0
- package/dist/maptiler-sdk.css +147 -0
- package/dist/maptiler-sdk.d.ts +531 -0
- package/dist/maptiler-sdk.min.mjs +1 -0
- package/dist/maptiler-sdk.mjs +1128 -0
- package/dist/maptiler-sdk.mjs.map +1 -0
- package/dist/maptiler-sdk.umd.js +3287 -0
- package/dist/maptiler-sdk.umd.js.map +1 -0
- package/dist/maptiler-sdk.umd.min.js +579 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/custom.css +118 -0
- package/docs/assets/highlight.css +134 -0
- package/docs/assets/main.js +54 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1257 -0
- package/docs/classes/Map.html +273 -0
- package/docs/classes/Point.html +549 -0
- package/docs/classes/SdkConfig.html +188 -0
- package/docs/demos/maptiler-sdk.css +147 -0
- package/docs/demos/maptiler-sdk.umd.js +3287 -0
- package/docs/demos/simple.html +63 -0
- package/docs/functions/addProtocol.html +146 -0
- package/docs/functions/clearPrewarmedResources.html +92 -0
- package/docs/functions/clearStorage.html +124 -0
- package/docs/functions/getRTLTextPluginStatus.html +92 -0
- package/docs/functions/prewarm.html +92 -0
- package/docs/functions/removeProtocol.html +106 -0
- package/docs/functions/setRTLTextPlugin.html +112 -0
- package/docs/functions/supported.html +97 -0
- package/docs/images/JS-logo.svg +4 -0
- package/docs/images/TS-logo.svg +6 -0
- package/docs/images/maptiler-logo.svg +19 -0
- package/docs/images/maptiler-sdk-logo.afdesign +0 -0
- package/docs/images/maptiler-sdk-logo.svg +66 -0
- package/docs/images/screenshots/alps.gif +0 -0
- package/docs/images/screenshots/grandcanyon.gif +0 -0
- package/docs/images/screenshots/lang-arabic.png +0 -0
- package/docs/images/screenshots/lang-hebrew.png +0 -0
- package/docs/images/screenshots/multilang.gif +0 -0
- package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/docs/images/screenshots/static-with-path.png +0 -0
- package/docs/images/screenshots/style-basic-v2.png +0 -0
- package/docs/images/screenshots/style-bright.png +0 -0
- package/docs/images/screenshots/style-dataviz-dark.png +0 -0
- package/docs/images/screenshots/style-hybrid.png +0 -0
- package/docs/images/screenshots/style-osm.png +0 -0
- package/docs/images/screenshots/style-outdoor.png +0 -0
- package/docs/images/screenshots/style-pastel.png +0 -0
- package/docs/images/screenshots/style-satellite.png +0 -0
- package/docs/images/screenshots/style-streets-v2-dark.png +0 -0
- package/docs/images/screenshots/style-streets-v2-light.png +0 -0
- package/docs/images/screenshots/style-streets-v2.png +0 -0
- package/docs/images/screenshots/style-toner.png +0 -0
- package/docs/images/screenshots/style-topo.png +0 -0
- package/docs/images/screenshots/style-topographique.png +0 -0
- package/docs/images/screenshots/style-voyager.png +0 -0
- package/docs/images/screenshots/style-winter.png +0 -0
- package/docs/index.html +601 -0
- package/docs/modules.html +142 -0
- package/docs/types/LanguageKey.html +90 -0
- package/docs/types/LanguageString.html +90 -0
- package/docs/types/MapOptions.html +90 -0
- package/docs/types/Matrix2.html +90 -0
- package/docs/types/Unit.html +88 -0
- package/docs/variables/AJAXError.html +88 -0
- package/docs/variables/AttributionControl.html +88 -0
- package/docs/variables/CanvasSource.html +88 -0
- package/docs/variables/Evented.html +88 -0
- package/docs/variables/FullscreenControl.html +88 -0
- package/docs/variables/GeoJSONSource.html +88 -0
- package/docs/variables/GeolocateControl.html +88 -0
- package/docs/variables/GeolocationType.html +95 -0
- package/docs/variables/ImageSource.html +88 -0
- package/docs/variables/Language.html +249 -0
- package/docs/variables/LngLat.html +88 -0
- package/docs/variables/LngLatBounds.html +88 -0
- package/docs/variables/LogoControl.html +88 -0
- package/docs/variables/Marker.html +88 -0
- package/docs/variables/MercatorCoordinate.html +88 -0
- package/docs/variables/NavigationControl.html +88 -0
- package/docs/variables/Popup.html +88 -0
- package/docs/variables/RasterDEMTileSource.html +88 -0
- package/docs/variables/RasterTileSource.html +88 -0
- package/docs/variables/ScaleControl.html +88 -0
- package/docs/variables/Style.html +88 -0
- package/docs/variables/TerrainControl.html +88 -0
- package/docs/variables/VectorTileSource.html +88 -0
- package/docs/variables/VideoSource.html +88 -0
- package/docs/variables/config.html +88 -0
- package/docs/variables/maxParallelImageRequests.html +88 -0
- package/docs/variables/version.html +88 -0
- package/docs/variables/workerCount.html +88 -0
- package/docs/variables/workerUrl.html +88 -0
- package/docsmd/.nojekyll +1 -0
- package/docsmd/README.md +710 -0
- package/docsmd/assets/custom.css +118 -0
- package/docsmd/classes/Map.md +292 -0
- package/docsmd/classes/Point.md +603 -0
- package/docsmd/classes/SdkConfig.md +186 -0
- package/docsmd/images/JS-logo.svg +4 -0
- package/docsmd/images/TS-logo.svg +6 -0
- package/docsmd/images/maptiler-logo.svg +19 -0
- package/docsmd/images/maptiler-sdk-logo.afdesign +0 -0
- package/docsmd/images/maptiler-sdk-logo.svg +66 -0
- package/docsmd/images/screenshots/alps.gif +0 -0
- package/docsmd/images/screenshots/grandcanyon.gif +0 -0
- package/docsmd/images/screenshots/lang-arabic.png +0 -0
- package/docsmd/images/screenshots/lang-hebrew.png +0 -0
- package/docsmd/images/screenshots/multilang.gif +0 -0
- package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/docsmd/images/screenshots/static-with-path.png +0 -0
- package/docsmd/images/screenshots/style-basic-v2.png +0 -0
- package/docsmd/images/screenshots/style-bright.png +0 -0
- package/docsmd/images/screenshots/style-dataviz-dark.png +0 -0
- package/docsmd/images/screenshots/style-hybrid.png +0 -0
- package/docsmd/images/screenshots/style-osm.png +0 -0
- package/docsmd/images/screenshots/style-outdoor.png +0 -0
- package/docsmd/images/screenshots/style-pastel.png +0 -0
- package/docsmd/images/screenshots/style-satellite.png +0 -0
- package/docsmd/images/screenshots/style-streets-v2-dark.png +0 -0
- package/docsmd/images/screenshots/style-streets-v2-light.png +0 -0
- package/docsmd/images/screenshots/style-streets-v2.png +0 -0
- package/docsmd/images/screenshots/style-toner.png +0 -0
- package/docsmd/images/screenshots/style-topo.png +0 -0
- package/docsmd/images/screenshots/style-topographique.png +0 -0
- package/docsmd/images/screenshots/style-voyager.png +0 -0
- package/docsmd/images/screenshots/style-winter.png +0 -0
- package/images/JS-logo.svg +4 -0
- package/images/TS-logo.svg +6 -0
- package/images/maptiler-logo.svg +19 -0
- package/images/maptiler-sdk-logo.afdesign +0 -0
- package/images/maptiler-sdk-logo.svg +66 -0
- package/images/screenshots/alps.gif +0 -0
- package/images/screenshots/grandcanyon.gif +0 -0
- package/images/screenshots/lang-arabic.png +0 -0
- package/images/screenshots/lang-hebrew.png +0 -0
- package/images/screenshots/multilang.gif +0 -0
- package/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/images/screenshots/static-with-path.png +0 -0
- package/images/screenshots/style-basic-v2.png +0 -0
- package/images/screenshots/style-bright.png +0 -0
- package/images/screenshots/style-dataviz-dark.png +0 -0
- package/images/screenshots/style-hybrid.png +0 -0
- package/images/screenshots/style-osm.png +0 -0
- package/images/screenshots/style-outdoor.png +0 -0
- package/images/screenshots/style-pastel.png +0 -0
- package/images/screenshots/style-satellite.png +0 -0
- package/images/screenshots/style-streets-v2-dark.png +0 -0
- package/images/screenshots/style-streets-v2-light.png +0 -0
- package/images/screenshots/style-streets-v2.png +0 -0
- package/images/screenshots/style-toner.png +0 -0
- package/images/screenshots/style-topo.png +0 -0
- package/images/screenshots/style-topographique.png +0 -0
- package/images/screenshots/style-voyager.png +0 -0
- package/images/screenshots/style-winter.png +0 -0
- package/package.json +71 -0
- package/readme.md +609 -0
- package/rollup.config.js +161 -0
- package/scripts/replace-path-with-content.js +51 -0
- package/src/CustomGeolocateControl.ts +193 -0
- package/src/CustomLogoControl.ts +59 -0
- package/src/Map.ts +897 -0
- package/src/MaptilerNavigationControl.ts +66 -0
- package/src/Point.ts +336 -0
- package/src/TerrainControl.ts +87 -0
- package/src/config.ts +92 -0
- package/src/defaults.ts +20 -0
- package/src/index.ts +171 -0
- package/src/language.ts +139 -0
- package/src/mapstyle.ts +38 -0
- package/src/style/style_template.css +146 -0
- package/src/style/svg/v6-compass.svg +12 -0
- package/src/style/svg/v6-fullscreen-off.svg +7 -0
- package/src/style/svg/v6-fullscreen.svg +7 -0
- package/src/style/svg/v6-geolocate-active-error.svg +10 -0
- package/src/style/svg/v6-geolocate-active.svg +7 -0
- package/src/style/svg/v6-geolocate-background.svg +8 -0
- package/src/style/svg/v6-geolocate-disabled.svg +10 -0
- package/src/style/svg/v6-geolocate.svg +7 -0
- package/src/style/svg/v6-terrain-on.svg +7 -0
- package/src/style/svg/v6-terrain.svg +7 -0
- package/src/style/svg/v6-zoom-minus.svg +7 -0
- package/src/style/svg/v6-zoom-plus.svg +7 -0
- package/src/tools.ts +45 -0
- package/src/unit.ts +1 -0
- package/tsconfig.json +11 -0
- package/typedoc.css +118 -0
- package/typedoc.json +13 -0
package/docsmd/README.md
ADDED
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
MapTiler SDK - v1.0.0
|
|
2
|
+
|
|
3
|
+
# MapTiler SDK - v1.0.0
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Classes
|
|
8
|
+
|
|
9
|
+
- [Map](classes/Map.md)
|
|
10
|
+
- [Point](classes/Point.md)
|
|
11
|
+
- [SdkConfig](classes/SdkConfig.md)
|
|
12
|
+
|
|
13
|
+
### Type Aliases
|
|
14
|
+
|
|
15
|
+
- [LanguageKey](README.md#languagekey)
|
|
16
|
+
- [LanguageString](README.md#languagestring)
|
|
17
|
+
- [MapOptions](README.md#mapoptions)
|
|
18
|
+
- [Matrix2](README.md#matrix2)
|
|
19
|
+
- [Unit](README.md#unit)
|
|
20
|
+
|
|
21
|
+
### Variables
|
|
22
|
+
|
|
23
|
+
- [AJAXError](README.md#ajaxerror)
|
|
24
|
+
- [AttributionControl](README.md#attributioncontrol)
|
|
25
|
+
- [CanvasSource](README.md#canvassource)
|
|
26
|
+
- [Evented](README.md#evented)
|
|
27
|
+
- [FullscreenControl](README.md#fullscreencontrol)
|
|
28
|
+
- [GeoJSONSource](README.md#geojsonsource)
|
|
29
|
+
- [GeolocateControl](README.md#geolocatecontrol)
|
|
30
|
+
- [GeolocationType](README.md#geolocationtype)
|
|
31
|
+
- [ImageSource](README.md#imagesource)
|
|
32
|
+
- [Language](README.md#language)
|
|
33
|
+
- [LngLat](README.md#lnglat)
|
|
34
|
+
- [LngLatBounds](README.md#lnglatbounds)
|
|
35
|
+
- [LogoControl](README.md#logocontrol)
|
|
36
|
+
- [Marker](README.md#marker)
|
|
37
|
+
- [MercatorCoordinate](README.md#mercatorcoordinate)
|
|
38
|
+
- [NavigationControl](README.md#navigationcontrol)
|
|
39
|
+
- [Popup](README.md#popup)
|
|
40
|
+
- [RasterDEMTileSource](README.md#rasterdemtilesource)
|
|
41
|
+
- [RasterTileSource](README.md#rastertilesource)
|
|
42
|
+
- [ScaleControl](README.md#scalecontrol)
|
|
43
|
+
- [Style](README.md#style)
|
|
44
|
+
- [TerrainControl](README.md#terraincontrol)
|
|
45
|
+
- [VectorTileSource](README.md#vectortilesource)
|
|
46
|
+
- [VideoSource](README.md#videosource)
|
|
47
|
+
- [config](README.md#config)
|
|
48
|
+
- [maxParallelImageRequests](README.md#maxparallelimagerequests)
|
|
49
|
+
- [version](README.md#version)
|
|
50
|
+
- [workerCount](README.md#workercount)
|
|
51
|
+
- [workerUrl](README.md#workerurl)
|
|
52
|
+
|
|
53
|
+
### Functions
|
|
54
|
+
|
|
55
|
+
- [addProtocol](README.md#addprotocol)
|
|
56
|
+
- [clearPrewarmedResources](README.md#clearprewarmedresources)
|
|
57
|
+
- [clearStorage](README.md#clearstorage)
|
|
58
|
+
- [getRTLTextPluginStatus](README.md#getrtltextpluginstatus)
|
|
59
|
+
- [prewarm](README.md#prewarm)
|
|
60
|
+
- [removeProtocol](README.md#removeprotocol)
|
|
61
|
+
- [setRTLTextPlugin](README.md#setrtltextplugin)
|
|
62
|
+
- [supported](README.md#supported)
|
|
63
|
+
|
|
64
|
+
## Type Aliases
|
|
65
|
+
|
|
66
|
+
### LanguageKey
|
|
67
|
+
|
|
68
|
+
Ƭ **LanguageKey**: keyof typeof [`Language`](README.md#language)
|
|
69
|
+
|
|
70
|
+
Type representing the key of the Language object
|
|
71
|
+
|
|
72
|
+
#### Defined in
|
|
73
|
+
|
|
74
|
+
[src/language.ts:108](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/language.ts#L108)
|
|
75
|
+
|
|
76
|
+
___
|
|
77
|
+
|
|
78
|
+
### LanguageString
|
|
79
|
+
|
|
80
|
+
Ƭ **LanguageString**: `Values`<typeof [`Language`](README.md#language)\>
|
|
81
|
+
|
|
82
|
+
Built-in languages values as strings
|
|
83
|
+
|
|
84
|
+
#### Defined in
|
|
85
|
+
|
|
86
|
+
[src/language.ts:115](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/language.ts#L115)
|
|
87
|
+
|
|
88
|
+
___
|
|
89
|
+
|
|
90
|
+
### MapOptions
|
|
91
|
+
|
|
92
|
+
Ƭ **MapOptions**: `Omit`<`MapOptionsML`, ``"style"`` \| ``"maplibreLogo"``\> & { `fullscreenControl?`: `boolean` \| `ControlPosition` ; `geolocate?`: typeof [`GeolocationType`](README.md#geolocationtype)[keyof typeof [`GeolocationType`](README.md#geolocationtype)] \| `boolean` ; `geolocateControl?`: `boolean` \| `ControlPosition` ; `maptilerLogo?`: `boolean` ; `navigationControl?`: `boolean` \| `ControlPosition` ; `scaleControl?`: `boolean` \| `ControlPosition` ; `style?`: `ReferenceMapStyle` \| `MapStyleVariant` \| `StyleSpecification` \| `string` ; `terrain?`: `boolean` ; `terrainControl?`: `boolean` \| `ControlPosition` ; `terrainExaggeration?`: `number` }
|
|
93
|
+
|
|
94
|
+
Options to provide to the `Map` constructor
|
|
95
|
+
|
|
96
|
+
#### Defined in
|
|
97
|
+
|
|
98
|
+
[src/Map.ts:51](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L51)
|
|
99
|
+
|
|
100
|
+
___
|
|
101
|
+
|
|
102
|
+
### Matrix2
|
|
103
|
+
|
|
104
|
+
Ƭ **Matrix2**: [`number`, `number`, `number`, `number`]
|
|
105
|
+
|
|
106
|
+
Row major 2x2 matrix
|
|
107
|
+
|
|
108
|
+
#### Defined in
|
|
109
|
+
|
|
110
|
+
[src/Point.ts:9](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L9)
|
|
111
|
+
|
|
112
|
+
___
|
|
113
|
+
|
|
114
|
+
### Unit
|
|
115
|
+
|
|
116
|
+
Ƭ **Unit**: ``"imperial"`` \| ``"metric"`` \| ``"nautical"``
|
|
117
|
+
|
|
118
|
+
#### Defined in
|
|
119
|
+
|
|
120
|
+
[src/unit.ts:1](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/unit.ts#L1)
|
|
121
|
+
|
|
122
|
+
## Variables
|
|
123
|
+
|
|
124
|
+
### AJAXError
|
|
125
|
+
|
|
126
|
+
• **AJAXError**: typeof `AJAXError`
|
|
127
|
+
|
|
128
|
+
#### Defined in
|
|
129
|
+
|
|
130
|
+
[src/index.ts:31](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L31)
|
|
131
|
+
|
|
132
|
+
___
|
|
133
|
+
|
|
134
|
+
### AttributionControl
|
|
135
|
+
|
|
136
|
+
• **AttributionControl**: typeof `AttributionControl`
|
|
137
|
+
|
|
138
|
+
#### Defined in
|
|
139
|
+
|
|
140
|
+
[src/index.ts:19](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L19)
|
|
141
|
+
|
|
142
|
+
___
|
|
143
|
+
|
|
144
|
+
### CanvasSource
|
|
145
|
+
|
|
146
|
+
• **CanvasSource**: typeof `CanvasSource`
|
|
147
|
+
|
|
148
|
+
#### Defined in
|
|
149
|
+
|
|
150
|
+
[src/index.ts:32](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L32)
|
|
151
|
+
|
|
152
|
+
___
|
|
153
|
+
|
|
154
|
+
### Evented
|
|
155
|
+
|
|
156
|
+
• **Evented**: typeof `Evented`
|
|
157
|
+
|
|
158
|
+
#### Defined in
|
|
159
|
+
|
|
160
|
+
[src/index.ts:30](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L30)
|
|
161
|
+
|
|
162
|
+
___
|
|
163
|
+
|
|
164
|
+
### FullscreenControl
|
|
165
|
+
|
|
166
|
+
• **FullscreenControl**: typeof `FullscreenControl`
|
|
167
|
+
|
|
168
|
+
#### Defined in
|
|
169
|
+
|
|
170
|
+
[src/index.ts:22](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L22)
|
|
171
|
+
|
|
172
|
+
___
|
|
173
|
+
|
|
174
|
+
### GeoJSONSource
|
|
175
|
+
|
|
176
|
+
• **GeoJSONSource**: typeof `GeoJSONSource`
|
|
177
|
+
|
|
178
|
+
#### Defined in
|
|
179
|
+
|
|
180
|
+
[src/index.ts:33](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L33)
|
|
181
|
+
|
|
182
|
+
___
|
|
183
|
+
|
|
184
|
+
### GeolocateControl
|
|
185
|
+
|
|
186
|
+
• **GeolocateControl**: typeof `GeolocateControl`
|
|
187
|
+
|
|
188
|
+
#### Defined in
|
|
189
|
+
|
|
190
|
+
[src/index.ts:18](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L18)
|
|
191
|
+
|
|
192
|
+
___
|
|
193
|
+
|
|
194
|
+
### GeolocationType
|
|
195
|
+
|
|
196
|
+
• `Const` **GeolocationType**: `Object`
|
|
197
|
+
|
|
198
|
+
#### Type declaration
|
|
199
|
+
|
|
200
|
+
| Name | Type |
|
|
201
|
+
| :------ | :------ |
|
|
202
|
+
| `COUNTRY` | ``"COUNTRY"`` |
|
|
203
|
+
| `POINT` | ``"POINT"`` |
|
|
204
|
+
|
|
205
|
+
#### Defined in
|
|
206
|
+
|
|
207
|
+
[src/Map.ts:40](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L40)
|
|
208
|
+
|
|
209
|
+
___
|
|
210
|
+
|
|
211
|
+
### ImageSource
|
|
212
|
+
|
|
213
|
+
• **ImageSource**: typeof `ImageSource`
|
|
214
|
+
|
|
215
|
+
#### Defined in
|
|
216
|
+
|
|
217
|
+
[src/index.ts:34](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L34)
|
|
218
|
+
|
|
219
|
+
___
|
|
220
|
+
|
|
221
|
+
### Language
|
|
222
|
+
|
|
223
|
+
• `Const` **Language**: `Object`
|
|
224
|
+
|
|
225
|
+
Languages. Note that not all the languages of this list are available but the compatibility list may be expanded in the future.
|
|
226
|
+
|
|
227
|
+
#### Type declaration
|
|
228
|
+
|
|
229
|
+
| Name | Type | Description |
|
|
230
|
+
| :------ | :------ | :------ |
|
|
231
|
+
| `ALBANIAN` | ``"sq"`` | - |
|
|
232
|
+
| `AMHARIC` | ``"am"`` | - |
|
|
233
|
+
| `ARABIC` | ``"ar"`` | - |
|
|
234
|
+
| `ARMENIAN` | ``"hy"`` | - |
|
|
235
|
+
| `AUTO` | ``"auto"`` | AUTO mode uses the language of the browser |
|
|
236
|
+
| `AZERBAIJANI` | ``"az"`` | - |
|
|
237
|
+
| `BASQUE` | ``"eu"`` | - |
|
|
238
|
+
| `BELORUSSIAN` | ``"be"`` | - |
|
|
239
|
+
| `BOSNIAN` | ``"bs"`` | - |
|
|
240
|
+
| `BRETON` | ``"br"`` | - |
|
|
241
|
+
| `BULGARIAN` | ``"bg"`` | - |
|
|
242
|
+
| `CATALAN` | ``"ca"`` | - |
|
|
243
|
+
| `CHINESE` | ``"zh"`` | - |
|
|
244
|
+
| `CORSICAN` | ``"co"`` | - |
|
|
245
|
+
| `CROATIAN` | ``"hr"`` | - |
|
|
246
|
+
| `CZECH` | ``"cs"`` | - |
|
|
247
|
+
| `DANISH` | ``"da"`` | - |
|
|
248
|
+
| `DUTCH` | ``"nl"`` | - |
|
|
249
|
+
| `ENGLISH` | ``"en"`` | - |
|
|
250
|
+
| `ESPERANTO` | ``"eo"`` | - |
|
|
251
|
+
| `ESTONIAN` | ``"et"`` | - |
|
|
252
|
+
| `FINNISH` | ``"fi"`` | - |
|
|
253
|
+
| `FRENCH` | ``"fr"`` | - |
|
|
254
|
+
| `FRISIAN` | ``"fy"`` | - |
|
|
255
|
+
| `GEORGIAN` | ``"ka"`` | - |
|
|
256
|
+
| `GERMAN` | ``"de"`` | - |
|
|
257
|
+
| `GREEK` | ``"el"`` | - |
|
|
258
|
+
| `HEBREW` | ``"he"`` | - |
|
|
259
|
+
| `HINDI` | ``"hi"`` | - |
|
|
260
|
+
| `HUNGARIAN` | ``"hu"`` | - |
|
|
261
|
+
| `ICELANDIC` | ``"is"`` | - |
|
|
262
|
+
| `INDONESIAN` | ``"id"`` | - |
|
|
263
|
+
| `IRISH` | ``"ga"`` | - |
|
|
264
|
+
| `ITALIAN` | ``"it"`` | - |
|
|
265
|
+
| `JAPANESE` | ``"ja"`` | - |
|
|
266
|
+
| `JAPANESE_2018` | ``"ja-Latn"`` | - |
|
|
267
|
+
| `JAPANESE_HIRAGANA` | ``"ja-Hira"`` | - |
|
|
268
|
+
| `JAPANESE_KANA` | ``"ja_kana"`` | - |
|
|
269
|
+
| `JAPANESE_LATIN` | ``"ja_rm"`` | - |
|
|
270
|
+
| `KANNADA` | ``"kn"`` | - |
|
|
271
|
+
| `KAZAKH` | ``"kk"`` | - |
|
|
272
|
+
| `KOREAN` | ``"ko"`` | - |
|
|
273
|
+
| `KOREAN_LATIN` | ``"ko-Latn"`` | - |
|
|
274
|
+
| `KURDISH` | ``"ku"`` | - |
|
|
275
|
+
| `LATIN` | ``"latin"`` | Default fallback languages that uses latin charaters |
|
|
276
|
+
| `LATVIAN` | ``"lv"`` | - |
|
|
277
|
+
| `LITHUANIAN` | ``"lt"`` | - |
|
|
278
|
+
| `LOCAL` | ``""`` | Labels are in their local language, when available |
|
|
279
|
+
| `LUXEMBOURGISH` | ``"lb"`` | - |
|
|
280
|
+
| `MACEDONIAN` | ``"mk"`` | - |
|
|
281
|
+
| `MALAYALAM` | ``"ml"`` | - |
|
|
282
|
+
| `MALTESE` | ``"mt"`` | - |
|
|
283
|
+
| `NON_LATIN` | ``"nonlatin"`` | Default fallback languages that uses non-latin charaters |
|
|
284
|
+
| `NORWEGIAN` | ``"no"`` | - |
|
|
285
|
+
| `OCCITAN` | ``"oc"`` | - |
|
|
286
|
+
| `POLISH` | ``"pl"`` | - |
|
|
287
|
+
| `PORTUGUESE` | ``"pt"`` | - |
|
|
288
|
+
| `ROMANIAN` | ``"ro"`` | - |
|
|
289
|
+
| `ROMANSH` | ``"rm"`` | - |
|
|
290
|
+
| `ROMAN_LATIN` | ``"la"`` | - |
|
|
291
|
+
| `RUSSIAN` | ``"ru"`` | - |
|
|
292
|
+
| `SCOTTISH_GAELIC` | ``"gd"`` | - |
|
|
293
|
+
| `SERBIAN_CYRILLIC` | ``"sr"`` | - |
|
|
294
|
+
| `SERBIAN_LATIN` | ``"sr-Latn"`` | - |
|
|
295
|
+
| `SLOVAK` | ``"sk"`` | - |
|
|
296
|
+
| `SLOVENE` | ``"sl"`` | - |
|
|
297
|
+
| `SPANISH` | ``"es"`` | - |
|
|
298
|
+
| `SWEDISH` | ``"sv"`` | - |
|
|
299
|
+
| `TAMIL` | ``"ta"`` | - |
|
|
300
|
+
| `TELUGU` | ``"te"`` | - |
|
|
301
|
+
| `THAI` | ``"th"`` | - |
|
|
302
|
+
| `TURKISH` | ``"tr"`` | - |
|
|
303
|
+
| `UKRAINIAN` | ``"uk"`` | - |
|
|
304
|
+
| `WELSH` | ``"cy"`` | - |
|
|
305
|
+
|
|
306
|
+
#### Defined in
|
|
307
|
+
|
|
308
|
+
[src/language.ts:4](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/language.ts#L4)
|
|
309
|
+
|
|
310
|
+
___
|
|
311
|
+
|
|
312
|
+
### LngLat
|
|
313
|
+
|
|
314
|
+
• **LngLat**: typeof `LngLat`
|
|
315
|
+
|
|
316
|
+
#### Defined in
|
|
317
|
+
|
|
318
|
+
[src/index.ts:27](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L27)
|
|
319
|
+
|
|
320
|
+
___
|
|
321
|
+
|
|
322
|
+
### LngLatBounds
|
|
323
|
+
|
|
324
|
+
• **LngLatBounds**: typeof `LngLatBounds`
|
|
325
|
+
|
|
326
|
+
#### Defined in
|
|
327
|
+
|
|
328
|
+
[src/index.ts:28](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L28)
|
|
329
|
+
|
|
330
|
+
___
|
|
331
|
+
|
|
332
|
+
### LogoControl
|
|
333
|
+
|
|
334
|
+
• **LogoControl**: typeof `LogoControl`
|
|
335
|
+
|
|
336
|
+
#### Defined in
|
|
337
|
+
|
|
338
|
+
[src/index.ts:20](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L20)
|
|
339
|
+
|
|
340
|
+
___
|
|
341
|
+
|
|
342
|
+
### Marker
|
|
343
|
+
|
|
344
|
+
• **Marker**: typeof `Marker`
|
|
345
|
+
|
|
346
|
+
#### Defined in
|
|
347
|
+
|
|
348
|
+
[src/index.ts:25](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L25)
|
|
349
|
+
|
|
350
|
+
___
|
|
351
|
+
|
|
352
|
+
### MercatorCoordinate
|
|
353
|
+
|
|
354
|
+
• **MercatorCoordinate**: typeof `MercatorCoordinate`
|
|
355
|
+
|
|
356
|
+
#### Defined in
|
|
357
|
+
|
|
358
|
+
[src/index.ts:29](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L29)
|
|
359
|
+
|
|
360
|
+
___
|
|
361
|
+
|
|
362
|
+
### NavigationControl
|
|
363
|
+
|
|
364
|
+
• **NavigationControl**: typeof `NavigationControl`
|
|
365
|
+
|
|
366
|
+
#### Defined in
|
|
367
|
+
|
|
368
|
+
[src/index.ts:17](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L17)
|
|
369
|
+
|
|
370
|
+
___
|
|
371
|
+
|
|
372
|
+
### Popup
|
|
373
|
+
|
|
374
|
+
• **Popup**: typeof `Popup`
|
|
375
|
+
|
|
376
|
+
#### Defined in
|
|
377
|
+
|
|
378
|
+
[src/index.ts:24](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L24)
|
|
379
|
+
|
|
380
|
+
___
|
|
381
|
+
|
|
382
|
+
### RasterDEMTileSource
|
|
383
|
+
|
|
384
|
+
• **RasterDEMTileSource**: typeof `RasterDEMTileSource`
|
|
385
|
+
|
|
386
|
+
#### Defined in
|
|
387
|
+
|
|
388
|
+
[src/index.ts:35](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L35)
|
|
389
|
+
|
|
390
|
+
___
|
|
391
|
+
|
|
392
|
+
### RasterTileSource
|
|
393
|
+
|
|
394
|
+
• **RasterTileSource**: typeof `RasterTileSource`
|
|
395
|
+
|
|
396
|
+
#### Defined in
|
|
397
|
+
|
|
398
|
+
[src/index.ts:36](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L36)
|
|
399
|
+
|
|
400
|
+
___
|
|
401
|
+
|
|
402
|
+
### ScaleControl
|
|
403
|
+
|
|
404
|
+
• **ScaleControl**: typeof `ScaleControl`
|
|
405
|
+
|
|
406
|
+
#### Defined in
|
|
407
|
+
|
|
408
|
+
[src/index.ts:21](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L21)
|
|
409
|
+
|
|
410
|
+
___
|
|
411
|
+
|
|
412
|
+
### Style
|
|
413
|
+
|
|
414
|
+
• **Style**: typeof `Style`
|
|
415
|
+
|
|
416
|
+
#### Defined in
|
|
417
|
+
|
|
418
|
+
[src/index.ts:26](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L26)
|
|
419
|
+
|
|
420
|
+
___
|
|
421
|
+
|
|
422
|
+
### TerrainControl
|
|
423
|
+
|
|
424
|
+
• **TerrainControl**: typeof `TerrainControl`
|
|
425
|
+
|
|
426
|
+
#### Defined in
|
|
427
|
+
|
|
428
|
+
[src/index.ts:23](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L23)
|
|
429
|
+
|
|
430
|
+
___
|
|
431
|
+
|
|
432
|
+
### VectorTileSource
|
|
433
|
+
|
|
434
|
+
• **VectorTileSource**: typeof `VectorTileSource`
|
|
435
|
+
|
|
436
|
+
#### Defined in
|
|
437
|
+
|
|
438
|
+
[src/index.ts:37](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L37)
|
|
439
|
+
|
|
440
|
+
___
|
|
441
|
+
|
|
442
|
+
### VideoSource
|
|
443
|
+
|
|
444
|
+
• **VideoSource**: typeof `VideoSource`
|
|
445
|
+
|
|
446
|
+
#### Defined in
|
|
447
|
+
|
|
448
|
+
[src/index.ts:38](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L38)
|
|
449
|
+
|
|
450
|
+
___
|
|
451
|
+
|
|
452
|
+
### config
|
|
453
|
+
|
|
454
|
+
• `Const` **config**: [`SdkConfig`](classes/SdkConfig.md)
|
|
455
|
+
|
|
456
|
+
#### Defined in
|
|
457
|
+
|
|
458
|
+
[src/config.ts:90](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/config.ts#L90)
|
|
459
|
+
|
|
460
|
+
___
|
|
461
|
+
|
|
462
|
+
### maxParallelImageRequests
|
|
463
|
+
|
|
464
|
+
• **maxParallelImageRequests**: `number`
|
|
465
|
+
|
|
466
|
+
#### Defined in
|
|
467
|
+
|
|
468
|
+
[src/index.ts:43](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L43)
|
|
469
|
+
|
|
470
|
+
___
|
|
471
|
+
|
|
472
|
+
### version
|
|
473
|
+
|
|
474
|
+
• **version**: `string`
|
|
475
|
+
|
|
476
|
+
#### Defined in
|
|
477
|
+
|
|
478
|
+
[src/index.ts:41](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L41)
|
|
479
|
+
|
|
480
|
+
___
|
|
481
|
+
|
|
482
|
+
### workerCount
|
|
483
|
+
|
|
484
|
+
• **workerCount**: `number`
|
|
485
|
+
|
|
486
|
+
#### Defined in
|
|
487
|
+
|
|
488
|
+
[src/index.ts:42](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L42)
|
|
489
|
+
|
|
490
|
+
___
|
|
491
|
+
|
|
492
|
+
### workerUrl
|
|
493
|
+
|
|
494
|
+
• **workerUrl**: `string`
|
|
495
|
+
|
|
496
|
+
#### Defined in
|
|
497
|
+
|
|
498
|
+
[src/index.ts:45](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/index.ts#L45)
|
|
499
|
+
|
|
500
|
+
## Functions
|
|
501
|
+
|
|
502
|
+
### addProtocol
|
|
503
|
+
|
|
504
|
+
▸ **addProtocol**(`customProtocol`, `loadFn`): `void`
|
|
505
|
+
|
|
506
|
+
Sets a custom load tile function that will be called when using a source that starts with a custom url schema.
|
|
507
|
+
The example below will be triggered for custom:// urls defined in the sources list in the style definitions.
|
|
508
|
+
The function passed will receive the request parameters and should call the callback with the resulting request,
|
|
509
|
+
for example a pbf vector tile, non-compressed, represented as ArrayBuffer.
|
|
510
|
+
|
|
511
|
+
**`Function`**
|
|
512
|
+
|
|
513
|
+
addProtocol
|
|
514
|
+
|
|
515
|
+
**`Example`**
|
|
516
|
+
|
|
517
|
+
// this will fetch a file using the fetch API (this is obviously a non iteresting example...)
|
|
518
|
+
maplibre.addProtocol('custom', (params, callback) => {
|
|
519
|
+
fetch(`https://${params.url.split("://")[1]}`)
|
|
520
|
+
.then(t => {
|
|
521
|
+
if (t.status == 200) {
|
|
522
|
+
t.arrayBuffer().then(arr => {
|
|
523
|
+
callback(null, arr, null, null);
|
|
524
|
+
});
|
|
525
|
+
} else {
|
|
526
|
+
callback(new Error(`Tile fetch error: ${t.statusText}`));
|
|
527
|
+
}
|
|
528
|
+
})
|
|
529
|
+
.catch(e => {
|
|
530
|
+
callback(new Error(e));
|
|
531
|
+
});
|
|
532
|
+
return { cancel: () => { } };
|
|
533
|
+
});
|
|
534
|
+
// the following is an example of a way to return an error when trying to load a tile
|
|
535
|
+
maplibre.addProtocol('custom2', (params, callback) => {
|
|
536
|
+
callback(new Error('someErrorMessage'));
|
|
537
|
+
return { cancel: () => { } };
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
#### Parameters
|
|
541
|
+
|
|
542
|
+
| Name | Type | Description |
|
|
543
|
+
| :------ | :------ | :------ |
|
|
544
|
+
| `customProtocol` | `string` | the protocol to hook, for example 'custom' |
|
|
545
|
+
| `loadFn` | (`requestParameters`: `RequestParameters`, `callback`: `ResponseCallback`<`any`\>) => `Cancelable` | the function to use when trying to fetch a tile specified by the customProtocol |
|
|
546
|
+
|
|
547
|
+
#### Returns
|
|
548
|
+
|
|
549
|
+
`void`
|
|
550
|
+
|
|
551
|
+
#### Defined in
|
|
552
|
+
|
|
553
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:12026
|
|
554
|
+
|
|
555
|
+
___
|
|
556
|
+
|
|
557
|
+
### clearPrewarmedResources
|
|
558
|
+
|
|
559
|
+
▸ **clearPrewarmedResources**(): `void`
|
|
560
|
+
|
|
561
|
+
#### Returns
|
|
562
|
+
|
|
563
|
+
`void`
|
|
564
|
+
|
|
565
|
+
#### Defined in
|
|
566
|
+
|
|
567
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:11814
|
|
568
|
+
|
|
569
|
+
___
|
|
570
|
+
|
|
571
|
+
### clearStorage
|
|
572
|
+
|
|
573
|
+
▸ **clearStorage**(`callback?`): `void`
|
|
574
|
+
|
|
575
|
+
Clears browser storage used by this library. Using this method flushes the MapLibre tile
|
|
576
|
+
cache that is managed by this library. Tiles may still be cached by the browser
|
|
577
|
+
in some cases.
|
|
578
|
+
|
|
579
|
+
This API is supported on browsers where the [`Cache` API](https://developer.mozilla.org/en-US/docs/Web/API/Cache)
|
|
580
|
+
is supported and enabled. This includes all major browsers when pages are served over
|
|
581
|
+
`https://`, except Internet Explorer and Edge Mobile.
|
|
582
|
+
|
|
583
|
+
When called in unsupported browsers or environments (private or incognito mode), the
|
|
584
|
+
callback will be called with an error argument.
|
|
585
|
+
|
|
586
|
+
**`Function`**
|
|
587
|
+
|
|
588
|
+
clearStorage
|
|
589
|
+
|
|
590
|
+
**`Example`**
|
|
591
|
+
|
|
592
|
+
```ts
|
|
593
|
+
maplibregl.clearStorage();
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
#### Parameters
|
|
597
|
+
|
|
598
|
+
| Name | Type | Description |
|
|
599
|
+
| :------ | :------ | :------ |
|
|
600
|
+
| `callback?` | (`err?`: `Error`) => `void` | Called with an error argument if there is an error. |
|
|
601
|
+
|
|
602
|
+
#### Returns
|
|
603
|
+
|
|
604
|
+
`void`
|
|
605
|
+
|
|
606
|
+
#### Defined in
|
|
607
|
+
|
|
608
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:11991
|
|
609
|
+
|
|
610
|
+
___
|
|
611
|
+
|
|
612
|
+
### getRTLTextPluginStatus
|
|
613
|
+
|
|
614
|
+
▸ **getRTLTextPluginStatus**(): `string`
|
|
615
|
+
|
|
616
|
+
#### Returns
|
|
617
|
+
|
|
618
|
+
`string`
|
|
619
|
+
|
|
620
|
+
#### Defined in
|
|
621
|
+
|
|
622
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:11884
|
|
623
|
+
|
|
624
|
+
___
|
|
625
|
+
|
|
626
|
+
### prewarm
|
|
627
|
+
|
|
628
|
+
▸ **prewarm**(): `void`
|
|
629
|
+
|
|
630
|
+
#### Returns
|
|
631
|
+
|
|
632
|
+
`void`
|
|
633
|
+
|
|
634
|
+
#### Defined in
|
|
635
|
+
|
|
636
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:11813
|
|
637
|
+
|
|
638
|
+
___
|
|
639
|
+
|
|
640
|
+
### removeProtocol
|
|
641
|
+
|
|
642
|
+
▸ **removeProtocol**(`customProtocol`): `void`
|
|
643
|
+
|
|
644
|
+
Removes a previusly added protocol
|
|
645
|
+
|
|
646
|
+
**`Function`**
|
|
647
|
+
|
|
648
|
+
removeProtocol
|
|
649
|
+
|
|
650
|
+
**`Example`**
|
|
651
|
+
|
|
652
|
+
```ts
|
|
653
|
+
maplibregl.removeProtocol('custom');
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
#### Parameters
|
|
657
|
+
|
|
658
|
+
| Name | Type | Description |
|
|
659
|
+
| :------ | :------ | :------ |
|
|
660
|
+
| `customProtocol` | `string` | the custom protocol to remove registration for |
|
|
661
|
+
|
|
662
|
+
#### Returns
|
|
663
|
+
|
|
664
|
+
`void`
|
|
665
|
+
|
|
666
|
+
#### Defined in
|
|
667
|
+
|
|
668
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:12035
|
|
669
|
+
|
|
670
|
+
___
|
|
671
|
+
|
|
672
|
+
### setRTLTextPlugin
|
|
673
|
+
|
|
674
|
+
▸ **setRTLTextPlugin**(`url`, `callback`, `deferred?`): `void`
|
|
675
|
+
|
|
676
|
+
#### Parameters
|
|
677
|
+
|
|
678
|
+
| Name | Type |
|
|
679
|
+
| :------ | :------ |
|
|
680
|
+
| `url` | `string` |
|
|
681
|
+
| `callback` | (`error?`: `Error`) => `void` |
|
|
682
|
+
| `deferred?` | `boolean` |
|
|
683
|
+
|
|
684
|
+
#### Returns
|
|
685
|
+
|
|
686
|
+
`void`
|
|
687
|
+
|
|
688
|
+
#### Defined in
|
|
689
|
+
|
|
690
|
+
node_modules/maplibre-gl/dist/maplibre-gl.d.ts:11883
|
|
691
|
+
|
|
692
|
+
___
|
|
693
|
+
|
|
694
|
+
### supported
|
|
695
|
+
|
|
696
|
+
▸ **supported**(`options?`): `boolean`
|
|
697
|
+
|
|
698
|
+
#### Parameters
|
|
699
|
+
|
|
700
|
+
| Name | Type |
|
|
701
|
+
| :------ | :------ |
|
|
702
|
+
| `options?` | `IsSupportedOptions` |
|
|
703
|
+
|
|
704
|
+
#### Returns
|
|
705
|
+
|
|
706
|
+
`boolean`
|
|
707
|
+
|
|
708
|
+
#### Defined in
|
|
709
|
+
|
|
710
|
+
node_modules/@mapbox/mapbox-gl-supported/index.d.ts:7
|