Skip to content

Commit 8a8ef29

Browse files
committed
feat: release candidate
1 parent b2bed86 commit 8a8ef29

File tree

5 files changed

+18
-3667
lines changed

5 files changed

+18
-3667
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# MapTiler SDK Changelog
22

3+
4+
## 3.1.0
5+
### New Features
6+
* Option to externalize controls
7+
8+
39
## 3.0.1
410
### New Features
511
- Update Maplibre to v5.0.1

demos/external-controls.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
container: document.getElementById('map'),
103103
style: maptilersdk.MapStyle.STREETS,
104104
center: [0, 0],
105-
projection: 'globe',
105+
projection: 'mercator',
106106
zoom: 1,
107107
defaultControls: false
108108
});
@@ -117,10 +117,10 @@
117117
});
118118

119119
// Add projection control with custom element
120-
/* const projectionControl = new maptilersdk.MaptilerProjectionControl({
120+
const projectionControl = new maptilersdk.MaptilerProjectionControl({
121121
removeDefaultDOM: true,
122122
projectionElement: document.getElementById('projection')
123-
}); */
123+
});
124124

125125
// Add terrain control with custom element
126126
const terrainControl = new maptilersdk.MaptilerTerrainControl({
@@ -130,6 +130,10 @@
130130
const geolocateControl = new maptilersdk.MaptilerGeolocateControl({
131131
removeDefaultDOM: true,
132132
geolocateElement: document.getElementById('geolocate'),
133+
positionOptions: {
134+
enableHighAccuracy: true
135+
},
136+
trackUserLocation: true
133137
});
134138
const scaleControl = new maptilersdk.MaptilerScaleControl({
135139
removeDefaultDOM: true,
@@ -141,11 +145,13 @@
141145
map.addControl(navControl);
142146
map.addControl(terrainControl);
143147
map.addControl(scaleControl);
148+
map.addControl(projectionControl);
144149
// Update compass rotation when map bearing changes
145150
map.on('rotate', () => {
146151
const bearing = map.getBearing();
147152
document.getElementById('compass').style.transform = `rotate(${bearing}deg)`;
148153
});
154+
149155
</script>
150156
</body>
151157
</html>

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@maptiler/sdk",
3-
"version": "3.0.1",
3+
"version": "3.2.0-rc.1",
44
"description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
55
"author": "MapTiler",
66
"module": "dist/maptiler-sdk.mjs",

0 commit comments

Comments
 (0)