@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
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* Overiding the default dark mode with color scheme from the light mode */
|
|
2
|
+
@media (prefers-color-scheme: dark) {
|
|
3
|
+
:root {
|
|
4
|
+
--color-background: var(--light-color-background);
|
|
5
|
+
--color-background-secondary: var(--light-color-background-secondary);
|
|
6
|
+
--color-background-warning: var(--light-color-background-warning);
|
|
7
|
+
--color-warning-text: var(--light-color-warning-text);
|
|
8
|
+
--color-icon-background: var(--light-color-icon-background);
|
|
9
|
+
--color-accent: var(--light-color-accent);
|
|
10
|
+
--color-text: var(--light-color-text);
|
|
11
|
+
--color-text-aside: var(--light-color-text-aside);
|
|
12
|
+
--color-link: var(--light-color-link);
|
|
13
|
+
--color-ts: var(--light-color-ts);
|
|
14
|
+
--color-ts-interface: var(--light-color-ts-interface);
|
|
15
|
+
--color-ts-enum: var(--light-color-ts-enum);
|
|
16
|
+
--color-ts-class: var(--light-color-ts-class);
|
|
17
|
+
--color-ts-function: var(--light-color-ts-function);
|
|
18
|
+
--color-ts-namespace: var(--light-color-ts-namespace);
|
|
19
|
+
--color-ts-private: var(--light-color-ts-private);
|
|
20
|
+
--color-ts-variable: var(--light-color-ts-variable);
|
|
21
|
+
--external-icon: var(--light-external-icon);
|
|
22
|
+
--color-scheme: var(--light-color-scheme);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
background: #fff;
|
|
28
|
+
font-family: "Open Sans", sans-serif;
|
|
29
|
+
color: #6B7C92;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
|
|
33
|
+
font-family: "Ubuntu","Open Sans",sans-serif;
|
|
34
|
+
color: #525a65;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tsd-page-toolbar {
|
|
38
|
+
background: #fff;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#tsd-search > .title {
|
|
42
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%20161%2041%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C-1.20801%2C-0.711928)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.965%2C33.743C14.023%2C35.769%2019.5%2C41.264%2019.497%2C41.269C19.477%2C41.305%2024.938%2C35.908%2027.113%2C33.768L19.526%2C26.3L11.965%2C33.743Z%22%20style%3D%22fill%3Argb(58%2C24%2C136)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C26.3L27.113%2C33.768C27.124%2C33.756%2027.138%2C33.741%2027.15%2C33.731L34.73%2C26.27L27.143%2C18.802L19.526%2C26.3Z%22%20style%3D%22fill%3Argb(3%2C161%2C196)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M34.73%2C26.27L34.749%2C26.25C38.942%2C22.123%2038.945%2C15.435%2034.762%2C11.302L27.144%2C18.802L34.73%2C26.27Z%22%20style%3D%22fill%3Argb(5%2C208%2C223)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.908%2C18.802L4.349%2C26.243C4.351%2C26.245%204.352%2C26.248%204.355%2C26.25L11.953%2C33.73C11.957%2C33.734%2011.961%2C33.738%2011.966%2C33.743L19.526%2C26.3L11.908%2C18.802Z%22%20style%3D%22fill%3Argb(118%2C31%2C232)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C11.303L27.143%2C18.802L34.762%2C11.303C34.755%2C11.298%2034.753%2C11.295%2034.749%2C11.29L27.15%2C3.81C27.149%2C3.808%2027.146%2C3.806%2027.144%2C3.804L19.526%2C11.303Z%22%20style%3D%22fill%3Argb(255%2C170%2C1)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.317%2C11.328C0.161%2C15.46%200.172%2C22.124%204.349%2C26.243L11.908%2C18.802L4.317%2C11.328Z%22%20style%3D%22fill%3Argb(241%2C23%2C93)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C11.303L11.934%2C3.829L4.355%2C11.29C4.341%2C11.303%204.33%2C11.317%204.316%2C11.329L11.908%2C18.802L19.526%2C11.303Z%22%20style%3D%22fill%3Argb(251%2C58%2C27)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M27.144%2C3.804C22.946%2C-0.321%2016.148%2C-0.319%2011.953%2C3.81L11.934%2C3.829L19.526%2C11.303L27.144%2C3.804Z%22%20style%3D%22fill%3Argb(251%2C201%2C53)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M58.567%2C28.139L58.567%2C20.497C58.567%2C18.616%2057.566%2C16.908%2055.595%2C16.908C53.654%2C16.908%2052.508%2C18.616%2052.508%2C20.497L52.508%2C28.139L48.922%2C28.139L48.922%2C13.84L52.244%2C13.84L52.508%2C15.578C53.273%2C14.129%2054.949%2C13.609%2056.33%2C13.609C58.066%2C13.609%2059.8%2C14.304%2060.624%2C16.271C61.918%2C14.245%2063.595%2C13.667%2065.476%2C13.667C69.593%2C13.667%2071.622%2C16.155%2071.622%2C20.44L71.622%2C28.139L68.034%2C28.139L68.034%2C20.44C68.034%2C18.559%2067.24%2C16.966%2065.301%2C16.966C63.359%2C16.966%2062.153%2C18.616%2062.153%2C20.497L62.153%2C28.139L58.567%2C28.139Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M86.765%2C13.87L90.206%2C13.87L90.206%2C28.139L86.824%2C28.139L86.647%2C26.056C85.825%2C27.734%2083.561%2C28.543%2081.943%2C28.573C77.651%2C28.603%2074.474%2C25.997%2074.474%2C20.989C74.474%2C16.069%2077.798%2C13.493%2082.033%2C13.522C83.973%2C13.522%2085.824%2C14.419%2086.647%2C15.838L86.765%2C13.87ZM78.062%2C20.989C78.062%2C23.71%2079.973%2C25.331%2082.355%2C25.331C88%2C25.331%2088%2C16.677%2082.355%2C16.677C79.973%2C16.677%2078.062%2C18.269%2078.062%2C20.989Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M93.236%2C34.105L93.236%2C13.87L96.589%2C13.87L96.822%2C15.838C97.94%2C14.245%2099.882%2C13.551%20101.528%2C13.551C105.996%2C13.551%20108.968%2C16.822%20108.968%2C21.019C108.968%2C25.187%20106.291%2C28.487%20101.645%2C28.487C100.118%2C28.487%2097.852%2C28.023%2096.822%2C26.461L96.822%2C34.104L93.236%2C34.104L93.236%2C34.105ZM105.381%2C21.019C105.381%2C18.791%20103.851%2C16.966%20101.264%2C16.966C98.676%2C16.966%2097.146%2C18.791%2097.146%2C21.019C97.146%2C23.247%2098.823%2C25.073%20101.264%2C25.073C103.705%2C25.073%20105.381%2C23.247%20105.381%2C21.019Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M115.378%2C9.528L115.378%2C13.84L120.319%2C13.84L120.319%2C15.026L115.378%2C15.026L115.378%2C23.739C115.378%2C25.679%20115.791%2C27.04%20118.055%2C27.04C118.76%2C27.04%20119.554%2C26.808%20120.289%2C26.461L120.789%2C27.617C119.877%2C28.054%20118.965%2C28.342%20118.055%2C28.342C114.968%2C28.342%20113.967%2C26.547%20113.967%2C23.74L113.967%2C15.027L110.879%2C15.027L110.879%2C13.84L113.967%2C13.84L113.967%2C9.672L115.378%2C9.528Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M125.554%2C9.18C125.554%2C10.685%20123.23%2C10.685%20123.23%2C9.18C123.23%2C7.675%20125.554%2C7.675%20125.554%2C9.18ZM123.643%2C13.782L123.643%2C28.14L125.082%2C28.14L125.082%2C13.782L123.643%2C13.782Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Crect%20x%3D%22129.199%22%20y%3D%227.878%22%20width%3D%221.441%22%20height%3D%2220.261%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M153.488%2C13.84L153.547%2C16.389C154.459%2C14.448%20156.518%2C13.696%20158.37%2C13.696C159.459%2C13.667%20160.515%2C13.956%20161.486%2C14.536L160.839%2C15.693C160.076%2C15.23%20159.221%2C15.027%20158.37%2C15.027C155.663%2C15.057%20153.576%2C17.198%20153.576%2C19.804L153.576%2C28.14L152.135%2C28.14L152.135%2C13.84L153.488%2C13.84Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M135.54%2C23.414C135.541%2C23.415%20135.543%2C23.417%20135.543%2C23.418L147.303%2C20.354C147.302%2C20.349%20147.302%2C20.345%20147.302%2C20.341L135.54%2C23.414Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M141.214%2C27.28C138.654%2C27.28%20136.461%2C25.701%20135.543%2C23.458L135.535%2C23.458L135.542%2C23.457C135.542%2C23.456%20135.541%2C23.455%20135.54%2C23.454L147.301%2C20.38C147.301%2C20.385%20147.302%2C20.389%20147.302%2C20.394L148.555%2C20.068C148.049%2C16.446%20144.956%2C13.658%20141.214%2C13.658C137.12%2C13.658%20133.802%2C16.996%20133.802%2C21.113C133.802%2C25.23%20137.12%2C28.569%20141.214%2C28.569C144.276%2C28.569%20146.905%2C26.7%20148.035%2C24.037L146.855%2C23.532C145.921%2C25.734%20143.747%2C27.28%20141.214%2C27.28ZM135.083%2C21.113C135.083%2C17.708%20137.828%2C14.946%20141.214%2C14.946C143.862%2C14.946%20146.117%2C16.634%20146.976%2C18.999L135.16%2C22.085C135.11%2C21.768%20135.083%2C21.444%20135.083%2C21.113Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
|
|
43
|
+
background-repeat: no-repeat;
|
|
44
|
+
color: #0000;
|
|
45
|
+
font-size: 1.5em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tsd-page-title h2 {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tsd-page-toolbar--hide {
|
|
53
|
+
transform: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.col-menu--hide {
|
|
57
|
+
top: 4em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.tsd-page-toolbar {
|
|
62
|
+
border-color: #d3dbec;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.col-menu {
|
|
66
|
+
border-left: none;
|
|
67
|
+
background-color: #F3F6FF;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.menu-sticky-wrap {
|
|
71
|
+
top: 2.5rem;
|
|
72
|
+
margin-top: 2.5rem;
|
|
73
|
+
/* height: 100vh; */
|
|
74
|
+
height: calc(100vh - 2.5rem);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tsd-generator {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.settings {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.tsd-navigation a {
|
|
86
|
+
color: #252525;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tsd-navigation.primary ul li a:hover {
|
|
90
|
+
border-color: #b3deff;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tsd-navigation.primary li.selected > a,
|
|
94
|
+
.tsd-navigation.primary li.current > a {
|
|
95
|
+
border-color: #8bc9f9;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.tsd-index-panel > .tsd-index-heading {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#tsd-search.has-focus {
|
|
103
|
+
background-color: #fff;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.tsd-navigation.secondary {
|
|
107
|
+
border-top: solid 1px #d3dbec;
|
|
108
|
+
padding-top: 1rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
pre {
|
|
112
|
+
border-color: #d3dbec;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
code, pre {
|
|
116
|
+
border-radius: 3px;
|
|
117
|
+
background-color: #fafbff;
|
|
118
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
[MapTiler SDK - v1.0.0](../README.md) / Map
|
|
2
|
+
|
|
3
|
+
# Class: Map
|
|
4
|
+
|
|
5
|
+
The Map class can be instanciated to display a map in a `<div>`
|
|
6
|
+
|
|
7
|
+
## Hierarchy
|
|
8
|
+
|
|
9
|
+
- `Map`
|
|
10
|
+
|
|
11
|
+
↳ **`Map`**
|
|
12
|
+
|
|
13
|
+
## Table of contents
|
|
14
|
+
|
|
15
|
+
### Constructors
|
|
16
|
+
|
|
17
|
+
- [constructor](Map.md#constructor)
|
|
18
|
+
|
|
19
|
+
### Methods
|
|
20
|
+
|
|
21
|
+
- [centerOnIpPoint](Map.md#centeronippoint)
|
|
22
|
+
- [disableTerrain](Map.md#disableterrain)
|
|
23
|
+
- [enableTerrain](Map.md#enableterrain)
|
|
24
|
+
- [fitToIpBounds](Map.md#fittoipbounds)
|
|
25
|
+
- [getCameraHash](Map.md#getcamerahash)
|
|
26
|
+
- [getTerrainExaggeration](Map.md#getterrainexaggeration)
|
|
27
|
+
- [hasTerrain](Map.md#hasterrain)
|
|
28
|
+
- [setLanguage](Map.md#setlanguage)
|
|
29
|
+
- [setPrimaryLanguage](Map.md#setprimarylanguage)
|
|
30
|
+
- [setSecondaryLanguage](Map.md#setsecondarylanguage)
|
|
31
|
+
- [setStyle](Map.md#setstyle)
|
|
32
|
+
- [setTerrainExaggeration](Map.md#setterrainexaggeration)
|
|
33
|
+
|
|
34
|
+
## Constructors
|
|
35
|
+
|
|
36
|
+
### constructor
|
|
37
|
+
|
|
38
|
+
• **new Map**(`options`)
|
|
39
|
+
|
|
40
|
+
#### Parameters
|
|
41
|
+
|
|
42
|
+
| Name | Type |
|
|
43
|
+
| :------ | :------ |
|
|
44
|
+
| `options` | [`MapOptions`](../README.md#mapoptions) |
|
|
45
|
+
|
|
46
|
+
#### Overrides
|
|
47
|
+
|
|
48
|
+
maplibregl.Map.constructor
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[src/Map.ts:131](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L131)
|
|
53
|
+
|
|
54
|
+
## Methods
|
|
55
|
+
|
|
56
|
+
### centerOnIpPoint
|
|
57
|
+
|
|
58
|
+
▸ **centerOnIpPoint**(`zoom`): `Promise`<`void`\>
|
|
59
|
+
|
|
60
|
+
#### Parameters
|
|
61
|
+
|
|
62
|
+
| Name | Type |
|
|
63
|
+
| :------ | :------ |
|
|
64
|
+
| `zoom` | `number` |
|
|
65
|
+
|
|
66
|
+
#### Returns
|
|
67
|
+
|
|
68
|
+
`Promise`<`void`\>
|
|
69
|
+
|
|
70
|
+
#### Defined in
|
|
71
|
+
|
|
72
|
+
[src/Map.ts:879](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L879)
|
|
73
|
+
|
|
74
|
+
___
|
|
75
|
+
|
|
76
|
+
### disableTerrain
|
|
77
|
+
|
|
78
|
+
▸ **disableTerrain**(): `void`
|
|
79
|
+
|
|
80
|
+
Disable the 3D terrain visualization
|
|
81
|
+
|
|
82
|
+
#### Returns
|
|
83
|
+
|
|
84
|
+
`void`
|
|
85
|
+
|
|
86
|
+
#### Defined in
|
|
87
|
+
|
|
88
|
+
[src/Map.ts:814](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L814)
|
|
89
|
+
|
|
90
|
+
___
|
|
91
|
+
|
|
92
|
+
### enableTerrain
|
|
93
|
+
|
|
94
|
+
▸ **enableTerrain**(`exaggeration?`): `void`
|
|
95
|
+
|
|
96
|
+
Enables the 3D terrain visualization
|
|
97
|
+
|
|
98
|
+
#### Parameters
|
|
99
|
+
|
|
100
|
+
| Name | Type |
|
|
101
|
+
| :------ | :------ |
|
|
102
|
+
| `exaggeration` | `number` |
|
|
103
|
+
|
|
104
|
+
#### Returns
|
|
105
|
+
|
|
106
|
+
`void`
|
|
107
|
+
|
|
108
|
+
#### Defined in
|
|
109
|
+
|
|
110
|
+
[src/Map.ts:769](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L769)
|
|
111
|
+
|
|
112
|
+
___
|
|
113
|
+
|
|
114
|
+
### fitToIpBounds
|
|
115
|
+
|
|
116
|
+
▸ **fitToIpBounds**(): `Promise`<`void`\>
|
|
117
|
+
|
|
118
|
+
#### Returns
|
|
119
|
+
|
|
120
|
+
`Promise`<`void`\>
|
|
121
|
+
|
|
122
|
+
#### Defined in
|
|
123
|
+
|
|
124
|
+
[src/Map.ts:868](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L868)
|
|
125
|
+
|
|
126
|
+
___
|
|
127
|
+
|
|
128
|
+
### getCameraHash
|
|
129
|
+
|
|
130
|
+
▸ **getCameraHash**(): `string`
|
|
131
|
+
|
|
132
|
+
#### Returns
|
|
133
|
+
|
|
134
|
+
`string`
|
|
135
|
+
|
|
136
|
+
#### Defined in
|
|
137
|
+
|
|
138
|
+
[src/Map.ts:887](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L887)
|
|
139
|
+
|
|
140
|
+
___
|
|
141
|
+
|
|
142
|
+
### getTerrainExaggeration
|
|
143
|
+
|
|
144
|
+
▸ **getTerrainExaggeration**(): `number`
|
|
145
|
+
|
|
146
|
+
Get the exaggeration factor applied to the terrain
|
|
147
|
+
|
|
148
|
+
#### Returns
|
|
149
|
+
|
|
150
|
+
`number`
|
|
151
|
+
|
|
152
|
+
#### Defined in
|
|
153
|
+
|
|
154
|
+
[src/Map.ts:752](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L752)
|
|
155
|
+
|
|
156
|
+
___
|
|
157
|
+
|
|
158
|
+
### hasTerrain
|
|
159
|
+
|
|
160
|
+
▸ **hasTerrain**(): `boolean`
|
|
161
|
+
|
|
162
|
+
Know if terrian is enabled or not
|
|
163
|
+
|
|
164
|
+
#### Returns
|
|
165
|
+
|
|
166
|
+
`boolean`
|
|
167
|
+
|
|
168
|
+
#### Defined in
|
|
169
|
+
|
|
170
|
+
[src/Map.ts:760](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L760)
|
|
171
|
+
|
|
172
|
+
___
|
|
173
|
+
|
|
174
|
+
### setLanguage
|
|
175
|
+
|
|
176
|
+
▸ **setLanguage**(`language?`): `any`
|
|
177
|
+
|
|
178
|
+
Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
179
|
+
This function is a short for `.setPrimaryLanguage()`
|
|
180
|
+
|
|
181
|
+
#### Parameters
|
|
182
|
+
|
|
183
|
+
| Name | Type | Default value |
|
|
184
|
+
| :------ | :------ | :------ |
|
|
185
|
+
| `language` | [`LanguageString`](../README.md#languagestring) | `defaults.primaryLanguage` |
|
|
186
|
+
|
|
187
|
+
#### Returns
|
|
188
|
+
|
|
189
|
+
`any`
|
|
190
|
+
|
|
191
|
+
#### Defined in
|
|
192
|
+
|
|
193
|
+
[src/Map.ts:441](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L441)
|
|
194
|
+
|
|
195
|
+
___
|
|
196
|
+
|
|
197
|
+
### setPrimaryLanguage
|
|
198
|
+
|
|
199
|
+
▸ **setPrimaryLanguage**(`language?`): `void`
|
|
200
|
+
|
|
201
|
+
Define the primary language of the map. Note that not all the languages shorthands provided are available.
|
|
202
|
+
|
|
203
|
+
#### Parameters
|
|
204
|
+
|
|
205
|
+
| Name | Type | Default value |
|
|
206
|
+
| :------ | :------ | :------ |
|
|
207
|
+
| `language` | [`LanguageString`](../README.md#languagestring) | `defaults.primaryLanguage` |
|
|
208
|
+
|
|
209
|
+
#### Returns
|
|
210
|
+
|
|
211
|
+
`void`
|
|
212
|
+
|
|
213
|
+
#### Defined in
|
|
214
|
+
|
|
215
|
+
[src/Map.ts:452](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L452)
|
|
216
|
+
|
|
217
|
+
___
|
|
218
|
+
|
|
219
|
+
### setSecondaryLanguage
|
|
220
|
+
|
|
221
|
+
▸ **setSecondaryLanguage**(`language?`): `void`
|
|
222
|
+
|
|
223
|
+
Define the secondary language of the map.
|
|
224
|
+
Note that most styles do not allow a secondary language and this function only works if the style allows (no force adding)
|
|
225
|
+
|
|
226
|
+
#### Parameters
|
|
227
|
+
|
|
228
|
+
| Name | Type | Default value |
|
|
229
|
+
| :------ | :------ | :------ |
|
|
230
|
+
| `language` | [`LanguageString`](../README.md#languagestring) | `defaults.secondaryLanguage` |
|
|
231
|
+
|
|
232
|
+
#### Returns
|
|
233
|
+
|
|
234
|
+
`void`
|
|
235
|
+
|
|
236
|
+
#### Defined in
|
|
237
|
+
|
|
238
|
+
[src/Map.ts:618](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L618)
|
|
239
|
+
|
|
240
|
+
___
|
|
241
|
+
|
|
242
|
+
### setStyle
|
|
243
|
+
|
|
244
|
+
▸ **setStyle**(`style`, `options?`): [`Map`](Map.md)
|
|
245
|
+
|
|
246
|
+
Update the style of the map.
|
|
247
|
+
Can be:
|
|
248
|
+
- a full style URL (possibly with API key)
|
|
249
|
+
- a shorthand with only the MapTIler style name (eg. `"streets-v2"`)
|
|
250
|
+
- a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)
|
|
251
|
+
|
|
252
|
+
#### Parameters
|
|
253
|
+
|
|
254
|
+
| Name | Type |
|
|
255
|
+
| :------ | :------ |
|
|
256
|
+
| `style` | `string` \| `StyleSpecification` \| `MapStyleVariant` \| `ReferenceMapStyle` |
|
|
257
|
+
| `options?` | `StyleSwapOptions` & `StyleOptions` |
|
|
258
|
+
|
|
259
|
+
#### Returns
|
|
260
|
+
|
|
261
|
+
[`Map`](Map.md)
|
|
262
|
+
|
|
263
|
+
#### Overrides
|
|
264
|
+
|
|
265
|
+
maplibregl.Map.setStyle
|
|
266
|
+
|
|
267
|
+
#### Defined in
|
|
268
|
+
|
|
269
|
+
[src/Map.ts:429](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L429)
|
|
270
|
+
|
|
271
|
+
___
|
|
272
|
+
|
|
273
|
+
### setTerrainExaggeration
|
|
274
|
+
|
|
275
|
+
▸ **setTerrainExaggeration**(`exaggeration`): `void`
|
|
276
|
+
|
|
277
|
+
Sets the 3D terrain exageration factor.
|
|
278
|
+
Note: this is only a shortcut to `.enableTerrain()`
|
|
279
|
+
|
|
280
|
+
#### Parameters
|
|
281
|
+
|
|
282
|
+
| Name | Type |
|
|
283
|
+
| :------ | :------ |
|
|
284
|
+
| `exaggeration` | `number` |
|
|
285
|
+
|
|
286
|
+
#### Returns
|
|
287
|
+
|
|
288
|
+
`void`
|
|
289
|
+
|
|
290
|
+
#### Defined in
|
|
291
|
+
|
|
292
|
+
[src/Map.ts:827](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Map.ts#L827)
|