Skip to content

Commit 76f936a

Browse files
Merge pull request #22 from maptiler/dev-1
Dev 1
2 parents 691fee3 + 9c500f7 commit 76f936a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+417
-395
lines changed

demos/maptiler-sdk.umd.js

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/maptiler-sdk.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/maptiler-sdk.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import maplibregl__default, { GeolocateControl as GeolocateControl$1, LngLat as LngLat$1, Marker as Marker$1 } from 'maplibre-gl';
1+
import maplibregl__default from 'maplibre-gl';
22
export * from 'maplibre-gl';
33
import { Base64 } from 'js-base64';
44
import { v4 } from 'uuid';
@@ -339,7 +339,14 @@ var __spreadValues$1 = (a, b) => {
339339
}
340340
return a;
341341
};
342+
const GeolocateControl$1 = maplibregl__default.GeolocateControl;
343+
const Marker$1 = maplibregl__default.Marker;
344+
const LngLat$1 = maplibregl__default.LngLat;
342345
class CustomGeolocateControl extends GeolocateControl$1 {
346+
constructor() {
347+
super(...arguments);
348+
this.lastUpdatedCenter = new LngLat$1(0, 0);
349+
}
343350
_updateCamera(position) {
344351
const center = new LngLat$1(
345352
position.coords.longitude,
@@ -377,12 +384,10 @@ class CustomGeolocateControl extends GeolocateControl$1 {
377384
return;
378385
}
379386
this.lastUpdatedCenter = this._map.getCenter();
380-
this.lastUpdatedZoom = this._map.getZoom();
381387
});
382388
}
383389
_setupUI(supported) {
384390
this.lastUpdatedCenter = this._map.getCenter();
385-
this.lastUpdatedZoom = this._map.getZoom();
386391
this._container.addEventListener(
387392
"contextmenu",
388393
(e) => e.preventDefault()

dist/maptiler-sdk.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/maptiler-sdk.umd.js

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/maptiler-sdk.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/maptiler-sdk.umd.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/Map.html

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.

docs/classes/Point.html

Lines changed: 30 additions & 30 deletions
Large diffs are not rendered by default.

docs/classes/SdkConfig.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SdkConfig | MapTiler SDK - v1.0.1</title><meta name="description" content="Documentation for MapTiler SDK - v1.0.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SdkConfig | MapTiler SDK - v1.0.2</title><meta name="description" content="Documentation for MapTiler SDK - v1.0.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
22
<div class="tsd-toolbar-contents container">
33
<div class="table-cell" id="tsd-search" data-base="..">
44
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
55
<div class="field">
66
<div id="tsd-toolbar-links"></div></div>
77
<ul class="results">
88
<li class="state loading">Preparing search index...</li>
9-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler SDK - v1.0.1</a></div>
9+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler SDK - v1.0.2</a></div>
1010
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
1111
<div class="container container-main">
1212
<div class="col-8 col-content">
1313
<div class="tsd-page-title">
1414
<ul class="tsd-breadcrumb">
15-
<li><a href="../modules.html">MapTiler SDK - v1.0.1</a></li>
15+
<li><a href="../modules.html">MapTiler SDK - v1.0.2</a></li>
1616
<li><a href="SdkConfig.html">SdkConfig</a></li></ul>
1717
<h1>Class SdkConfig</h1></div>
1818
<section class="tsd-panel tsd-comment">
@@ -25,7 +25,7 @@ <h4>Hierarchy</h4>
2525
<ul class="tsd-hierarchy">
2626
<li><span class="target">SdkConfig</span></li></ul></li></ul></section><aside class="tsd-sources">
2727
<ul>
28-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L9">src/config.ts:9</a></li></ul></aside>
28+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L9">src/config.ts:9</a></li></ul></aside>
2929
<section class="tsd-panel-group tsd-index-group">
3030
<section class="tsd-panel tsd-index-panel">
3131
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -57,7 +57,7 @@ <h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-
5757
<h4 class="tsd-returns-title">Returns <a href="SdkConfig.html" class="tsd-signature-type" data-tsd-kind="Class">SdkConfig</a></h4><aside class="tsd-sources">
5858
<p>Overrides EventEmitter.constructor</p>
5959
<ul>
60-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L40">src/config.ts:40</a></li></ul></aside></li></ul></section></section>
60+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L40">src/config.ts:40</a></li></ul></aside></li></ul></section></section>
6161
<section class="tsd-panel-group tsd-member-group">
6262
<h2>Properties</h2>
6363
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="primaryLanguage" class="tsd-anchor"></a>
@@ -66,15 +66,15 @@ <h3 class="tsd-anchor-link"><span>primary<wbr/>Language</span><a href="#primaryL
6666
<div class="tsd-comment tsd-typography"><p>The primary language. By default, the language of the web browser is used.</p>
6767
</div><aside class="tsd-sources">
6868
<ul>
69-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L13">src/config.ts:13</a></li></ul></aside></section>
69+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L13">src/config.ts:13</a></li></ul></aside></section>
7070
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="secondaryLanguage" class="tsd-anchor"></a>
7171
<h3 class="tsd-anchor-link"><span>secondary<wbr/>Language</span><a href="#secondaryLanguage" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
7272
<div class="tsd-signature">secondary<wbr/>Language<span class="tsd-signature-symbol">:</span> <a href="../types/LanguageString.html" class="tsd-signature-type" data-tsd-kind="Type alias">LanguageString</a><span class="tsd-signature-symbol"> = null</span></div>
7373
<div class="tsd-comment tsd-typography"><p>The secondary language, to overwrite the default language defined in the map style.
7474
This settings is highly dependant on the style compatibility and may not work in most cases.</p>
7575
</div><aside class="tsd-sources">
7676
<ul>
77-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L19">src/config.ts:19</a></li></ul></aside></section>
77+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L19">src/config.ts:19</a></li></ul></aside></section>
7878
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="session" class="tsd-anchor"></a>
7979
<h3 class="tsd-anchor-link"><span>session</span><a href="#session" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
8080
<div class="tsd-signature">session<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div>
@@ -85,7 +85,7 @@ <h3 class="tsd-anchor-link"><span>session</span><a href="#session" aria-label="P
8585
on the MapTiler Cloud API. This allows MapTiler to enable &quot;session based billing&quot;.</p>
8686
</div><aside class="tsd-sources">
8787
<ul>
88-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L28">src/config.ts:28</a></li></ul></aside></section></section>
88+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L28">src/config.ts:28</a></li></ul></aside></section></section>
8989
<section class="tsd-panel-group tsd-member-group">
9090
<h2>Accessors</h2>
9191
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="apiKey" class="tsd-anchor"></a>
@@ -97,7 +97,7 @@ <h3 class="tsd-anchor-link"><span>api<wbr/>Key</span><a href="#apiKey" aria-labe
9797
</div>
9898
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
9999
<ul>
100-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L71">src/config.ts:71</a></li></ul></aside></li>
100+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L71">src/config.ts:71</a></li></ul></aside></li>
101101
<li class="tsd-signature" id="apiKey.apiKey-2"><span class="tsd-signature-symbol">set</span> apiKey<span class="tsd-signature-symbol">(</span>k<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
102102
<li class="tsd-description">
103103
<div class="tsd-comment tsd-typography"><p>Set the MapTiler Cloud API key</p>
@@ -109,7 +109,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
109109
<h5>k: <span class="tsd-signature-type">string</span></h5></li></ul></div>
110110
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
111111
<ul>
112-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L62">src/config.ts:62</a></li></ul></aside></li></ul></section>
112+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L62">src/config.ts:62</a></li></ul></aside></li></ul></section>
113113
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fetch" class="tsd-anchor"></a>
114114
<h3 class="tsd-anchor-link"><span>fetch</span><a href="#fetch" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
115115
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
@@ -119,7 +119,7 @@ <h3 class="tsd-anchor-link"><span>fetch</span><a href="#fetch" aria-label="Perma
119119
</div>
120120
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">FetchFunction</span></h4><aside class="tsd-sources">
121121
<ul>
122-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L85">src/config.ts:85</a></li></ul></aside></li>
122+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L85">src/config.ts:85</a></li></ul></aside></li>
123123
<li class="tsd-signature" id="fetch.fetch-2"><span class="tsd-signature-symbol">set</span> fetch<span class="tsd-signature-symbol">(</span>f<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FetchFunction</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
124124
<li class="tsd-description">
125125
<div class="tsd-comment tsd-typography"><p>Set a the custom fetch function to replace the default one</p>
@@ -131,7 +131,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
131131
<h5>f: <span class="tsd-signature-type">FetchFunction</span></h5></li></ul></div>
132132
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
133133
<ul>
134-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L78">src/config.ts:78</a></li></ul></aside></li></ul></section>
134+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L78">src/config.ts:78</a></li></ul></aside></li></ul></section>
135135
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="unit" class="tsd-anchor"></a>
136136
<h3 class="tsd-anchor-link"><span>unit</span><a href="#unit" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
137137
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
@@ -141,7 +141,7 @@ <h3 class="tsd-anchor-link"><span>unit</span><a href="#unit" aria-label="Permali
141141
</div>
142142
<h4 class="tsd-returns-title">Returns <a href="../types/Unit.html" class="tsd-signature-type" data-tsd-kind="Type alias">Unit</a></h4><aside class="tsd-sources">
143143
<ul>
144-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L55">src/config.ts:55</a></li></ul></aside></li>
144+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L55">src/config.ts:55</a></li></ul></aside></li>
145145
<li class="tsd-signature" id="unit.unit-2"><span class="tsd-signature-symbol">set</span> unit<span class="tsd-signature-symbol">(</span>u<span class="tsd-signature-symbol">: </span><a href="../types/Unit.html" class="tsd-signature-type" data-tsd-kind="Type alias">Unit</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
146146
<li class="tsd-description">
147147
<div class="tsd-comment tsd-typography"><p>Set the unit system</p>
@@ -153,7 +153,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
153153
<h5>u: <a href="../types/Unit.html" class="tsd-signature-type" data-tsd-kind="Type alias">Unit</a></h5></li></ul></div>
154154
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
155155
<ul>
156-
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/24b7e02/src/config.ts#L47">src/config.ts:47</a></li></ul></aside></li></ul></section></section></div>
156+
<li>Defined in <a href="https://github.com/maptiler/maptiler-sdk-js/blob/0c3df69/src/config.ts#L47">src/config.ts:47</a></li></ul></aside></li></ul></section></section></div>
157157
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
158158
<div class="tsd-navigation settings">
159159
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -170,7 +170,7 @@ <h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option
170170
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
171171
<div class="tsd-accordion-details">
172172
<ul>
173-
<li><a href="../modules.html">Map<wbr/>Tiler SDK -<wbr/> v1.0.1</a>
173+
<li><a href="../modules.html">Map<wbr/>Tiler SDK -<wbr/> v1.0.2</a>
174174
<ul></ul></li></ul></div></details></nav>
175175
<nav class="tsd-navigation secondary menu-sticky">
176176
<ul>

0 commit comments

Comments
 (0)