Skip to content

Commit 940f0a2

Browse files
AminTaheri23claude
authored andcommitted
feat: add geolocate control to show user location on map
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6e0c5e3 commit 940f0a2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/where_the_plow/static/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ <h3>Where the Plow</h3>
216216
zoom: 12,
217217
});
218218

219+
const geolocate = new maplibregl.GeolocateControl({
220+
positionOptions: { enableHighAccuracy: true },
221+
trackUserLocation: true,
222+
showUserHeading: true,
223+
});
224+
map.addControl(geolocate, 'bottom-right');
225+
219226
function formatTimestamp(ts) {
220227
const d = new Date(ts);
221228
return d.toLocaleString(undefined, {

0 commit comments

Comments
 (0)