@maptiler/sdk 1.0.3 → 1.0.4
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/CHANGELOG.md +16 -0
- package/demos/maptiler-sdk.umd.js +11 -2
- package/dist/maptiler-sdk.min.mjs +1 -1
- package/dist/maptiler-sdk.mjs +11 -2
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/dist/maptiler-sdk.umd.js +11 -2
- package/dist/maptiler-sdk.umd.js.map +1 -1
- package/dist/maptiler-sdk.umd.min.js +4 -4
- package/package.json +1 -1
- package/src/CustomGeolocateControl.ts +7 -0
- package/src/TerrainControl.ts +0 -6
package/package.json
CHANGED
|
@@ -25,8 +25,15 @@ export class CustomGeolocateControl extends GeolocateControl {
|
|
|
25
25
|
const options = {
|
|
26
26
|
bearing,
|
|
27
27
|
...this.options.fitBoundsOptions,
|
|
28
|
+
linear: true,
|
|
28
29
|
};
|
|
29
30
|
|
|
31
|
+
const currentMapZoom = this._map.getZoom();
|
|
32
|
+
|
|
33
|
+
if (currentMapZoom > this.options.fitBoundsOptions.maxZoom) {
|
|
34
|
+
options.zoom = currentMapZoom;
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
this._map.fitBounds(center.toBounds(radius), options, {
|
|
31
38
|
geolocateSource: true, // tag this camera change so it won't cause the control to change to background state
|
|
32
39
|
});
|
package/src/TerrainControl.ts
CHANGED
|
@@ -53,12 +53,6 @@ export class TerrainControl implements maplibregl.IControl {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
_toggleTerrain() {
|
|
56
|
-
// if (this._map.getTerrain()) {
|
|
57
|
-
// this._map.setTerrain(null);
|
|
58
|
-
// } else {
|
|
59
|
-
// this._map.setTerrain(this.options);
|
|
60
|
-
// }
|
|
61
|
-
|
|
62
56
|
if (this._map.hasTerrain()) {
|
|
63
57
|
this._map.disableTerrain();
|
|
64
58
|
} else {
|