Skip to content

Commit f643158

Browse files
author
Vincent van der Wal
committed
switch order
1 parent 5d7a03b commit f643158

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ if (mapContainer) {
168168

169169
map.touchZoomRotate.disableRotation();
170170

171+
// Add zoom and rotation controls to the map.
172+
map.addControl(
173+
new maplibregl.NavigationControl({
174+
showZoom: true,
175+
showCompass: true
176+
})
177+
);
178+
171179
// Add geolocate control to the map.
172180
map.addControl(
173181
new maplibregl.GeolocateControl({
@@ -181,14 +189,6 @@ if (mapContainer) {
181189
})
182190
);
183191

184-
// Add zoom and rotation controls to the map.
185-
map.addControl(
186-
new maplibregl.NavigationControl({
187-
showZoom: true,
188-
showCompass: true
189-
})
190-
);
191-
192192
map.addControl(new maplibregl.GlobeControl());
193193

194194
// improved scrolling

0 commit comments

Comments
 (0)