Skip to content

Commit 616d6bd

Browse files
Merge pull request #31 from maptiler/dev-styles
FIX geolocate not provided
2 parents e427428 + b9992b7 commit 616d6bd

File tree

114 files changed

+666
-493
lines changed

Some content is hidden

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

114 files changed

+666
-493
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22
## [v1.0.9](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.9)
3+
- FIX: if the geolocate option is missing from `Map` constructor, then it's considered `false`
4+
35
- FIX: The instance types for the following MapLibre classes are now fully exported:
46
- `NavigationControl`
57
- `GeolocateControl`
@@ -44,6 +46,11 @@
4446
- `FullscreenControl`
4547
- `TerrainControl`
4648

49+
- ADD: new styles:
50+
- `MapStyle.STREETS.NIGHT`
51+
- `MapStyle.WINTER.DARK`
52+
- `MapStyle.OUTDOOR.DARK`
53+
4754
## [v1.0.8](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.8)
4855
- FIX: Since v1.0.7, the `Map` primary language (when custom) was no longer persistant on style update.
4956

demos/maptiler-sdk.umd.js

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

demos/simple.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@
3636
<script src ="maptiler-sdk.umd.js"></script>
3737

3838
<script>
39-
// maptilersdk.config.apiKey = "ZFEK2gQSwT4Jcimbtcy7";
39+
maptilersdk.config.apiKey = "YOUR_API_KEY";
4040

4141
const map = new maptilersdk.Map({
4242
container: document.getElementById("map-container"),
43+
style: maptilersdk.MapStyle.OUTDOOR.DARK,
4344
hash: true,
44-
maxPitch: 85,
4545
scaleControl: true,
4646
fullscreenControl: true,
4747
terrainControl: true,
48+
geolocate: true,
4849
})
4950

5051
const styleDropDown = document.getElementById("mapstyles-picker")

dist/maptiler-sdk.min.mjs

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

dist/maptiler-sdk.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ class Map extends maplibregl__default.Map {
617617
this.primaryLanguage = (_a = options.language) != null ? _a : config.primaryLanguage;
618618
this.secondaryLanguage = config.secondaryLanguage;
619619
this.once("styledata", () => __async(this, null, function* () {
620-
if (options.geolocate === false) {
620+
if (!options.geolocate) {
621621
return;
622622
}
623623
if (options.center) {

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.

0 commit comments

Comments
 (0)