Skip to content

Commit 3b4c14f

Browse files
Dev 1 (#24)
* FIX relative path style file * ENH geolocate control no longer zooming out from background to active
1 parent 8693345 commit 3b4c14f

Some content is hidden

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

63 files changed

+435
-382
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
## [v1.0.4](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.4)
4+
- Improved the geolocate control behavior by not zooming out
5+
6+
## [v1.0.3](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.3)
7+
- Fixed the usage of relative path style JSON (in `Map` constructor and `.setStyle()`)
8+
9+
## [v1.0.2](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.2)
10+
- Fixed the dependency scheme of MapLibre import.
11+
12+
## [v1.0.1](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.1)
13+
- Reducing the NPM size by ignoring documentation images
14+
15+
## [v1.0.0](https://github.com/maptiler/maptiler-sdk-js/releases/tag/v1.0.0)
16+
- First public version!

demos/maptiler-sdk.umd.js

Lines changed: 11 additions & 2 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: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ class MaptilerNavigationControl extends maplibregl__default.NavigationControl {
328328
}
329329

330330
var __defProp$1 = Object.defineProperty;
331+
var __defProps$1 = Object.defineProperties;
332+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
331333
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
332334
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
333335
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
@@ -343,6 +345,7 @@ var __spreadValues$1 = (a, b) => {
343345
}
344346
return a;
345347
};
348+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
346349
const GeolocateControl$1 = maplibregl__default.GeolocateControl;
347350
const Marker$1 = maplibregl__default.Marker;
348351
const LngLat$1 = maplibregl__default.LngLat;
@@ -358,9 +361,15 @@ class CustomGeolocateControl extends GeolocateControl$1 {
358361
);
359362
const radius = position.coords.accuracy;
360363
const bearing = this._map.getBearing();
361-
const options = __spreadValues$1({
364+
const options = __spreadProps$1(__spreadValues$1({
362365
bearing
363-
}, this.options.fitBoundsOptions);
366+
}, this.options.fitBoundsOptions), {
367+
linear: true
368+
});
369+
const currentMapZoom = this._map.getZoom();
370+
if (currentMapZoom > this.options.fitBoundsOptions.maxZoom) {
371+
options.zoom = currentMapZoom;
372+
}
364373
this._map.fitBounds(center.toBounds(radius), options, {
365374
geolocateSource: true
366375
});

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 & 2 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: 4 additions & 4 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.

0 commit comments

Comments
 (0)