Skip to content

Commit 6649069

Browse files
committed
fix: adjust default zoom level in app.js for improved consistency across zoom-dependent features
1 parent dcee9e7 commit 6649069

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

js/app.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ShelterAccessApp {
8484
};
8585

8686
// Current zoom and view state for zoom-dependent features
87-
this._currentZoom = 11;
87+
this._currentZoom = 10.5;
8888
this._currentViewState = null;
8989

9090
// Debouncing for view state changes
@@ -512,7 +512,7 @@ class ShelterAccessApp {
512512
initialViewState: {
513513
longitude: centerLng,
514514
latitude: centerLat,
515-
zoom: 11,
515+
zoom: 10.5,
516516
pitch: 0,
517517
bearing: 0,
518518
minZoom: 7,
@@ -535,7 +535,7 @@ class ShelterAccessApp {
535535
this.deckgl.setProps({layers: this.currentLayers});
536536

537537
// Store initial zoom level
538-
this._currentZoom = 11;
538+
this._currentZoom = 10.5;
539539

540540
// Initialize scale bar
541541
this.updateScaleBar();
@@ -665,7 +665,7 @@ class ShelterAccessApp {
665665
return;
666666
}
667667

668-
const currentZoom = currentViewState.zoom || 11;
668+
const currentZoom = currentViewState.zoom || 10.5;
669669
const newZoom = Math.min(currentZoom + 1, 19);
670670

671671
console.log(`Zooming from ${currentZoom} to ${newZoom}`);
@@ -711,7 +711,7 @@ class ShelterAccessApp {
711711
return;
712712
}
713713

714-
const currentZoom = currentViewState.zoom || 11;
714+
const currentZoom = currentViewState.zoom || 10.5;
715715
const newZoom = Math.max(currentZoom - 1, 7);
716716

717717
console.log(`Zooming from ${currentZoom} to ${newZoom}`);
@@ -1504,7 +1504,7 @@ class ShelterAccessApp {
15041504
* Get zoom-dependent icon configuration with smooth interpolation
15051505
*/
15061506
getZoomConfig() {
1507-
const currentZoom = this._currentZoom || 11;
1507+
const currentZoom = this._currentZoom || 10.5;
15081508

15091509
// Define breakpoint ranges for ultra-smooth interpolation
15101510
const breakpoints = [
@@ -1834,7 +1834,7 @@ class ShelterAccessApp {
18341834
if (!scaleBar || !scaleLine || !scaleText) return;
18351835

18361836
// Calculate scale based on zoom and latitude
1837-
const zoom = this._currentZoom || 11;
1837+
const zoom = this._currentZoom || 10.5;
18381838
const latitude = (this._currentViewState && this._currentViewState.latitude) || 31.25; // Fallback to center of Israel
18391839

18401840
// Earth circumference in meters at the equator

0 commit comments

Comments
 (0)