Skip to content

Commit b3ddc5f

Browse files
committed
Added min/max zoom settings matching with the Tileset.
1 parent 5addb49 commit b3ddc5f

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/components/widgets/LivelihoodZonesMap.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ export default {
273273
window.MBL.resetCenter()
274274
}, 200)
275275
}
276-
277-
window.MBL.toggleHandlers(false)
276+
// window.MBL.toggleHandlers(false)
278277
},
279278
280279
updateLegend (provinceName) {
@@ -296,7 +295,7 @@ export default {
296295
297296
if (features.length > 0) {
298297
window.MBL.isLoading = false
299-
window.MBL.toggleHandlers(true)
298+
// window.MBL.toggleHandlers(true)
300299
loadedOnce = true
301300
console.log(`--loaded vector length: ${features.length}`)
302301

static/map.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ MapboxMap.prototype.initMap = function ({ mapContainer = 'map', style, zoom = 5.
5050
container: mapContainer,
5151
style,
5252
zoom,
53-
center: center
53+
center: center,
54+
minZoom: 1,
55+
maxZoom: 12
5456
})
5557

5658
.addControl(new mapboxgl.FullscreenControl())
@@ -67,14 +69,14 @@ MapboxMap.prototype.initMap = function ({ mapContainer = 'map', style, zoom = 5.
6769
this.colorCodes = this.getLegendColorCodes()
6870

6971
// Disable map controls
70-
this.toggleHandlers(false)
72+
// this.toggleHandlers(false)
7173

7274
// Listen for basemap loading events
7375
const that = this
7476

7577
this.map.on('load', function() {
7678
console.log('---basemap loaded')
77-
that.toggleHandlers(true)
79+
// that.toggleHandlers(true)
7880
that.isLoading = false
7981
})
8082

0 commit comments

Comments
 (0)