File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ document.getElementById('repoLink').href = REPO_URL;
4444async function boot ( ) {
4545 await loadCitiesManifest ( ) ;
4646
47- const landingMap = L . map ( 'mapLanding' , { zoomControl : true } ) . setView ( [ 42.5 , 12.5 ] , 5 ) ;
47+ const landingMap = L . map ( 'mapLanding' , { zoomControl : false } ) . setView ( [ 42.5 , 12.5 ] , 5 ) ;
48+ L . control . zoom ( { position : 'bottomright' } ) . addTo ( landingMap ) ;
4849 const baseLanding = L . tileLayer ( 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png' , { attribution : '© OpenStreetMap & CARTO' , maxZoom : 19 } ) . addTo ( landingMap ) ;
4950
5051 const markers = [ ] ;
@@ -236,7 +237,9 @@ async function loadCity(slug){
236237 document . getElementById ( 'cityBreadcrumb' ) . textContent = city . name ;
237238
238239 if ( ! cityMap ) {
239- cityMap = L . map ( 'map' , { zoomControl :true } ) ;
240+ cityMap = L . map ( 'map' , { zoomControl :false } ) ;
241+ // add zoom control manually in bottom-right
242+ L . control . zoom ( { position : 'bottomright' } ) . addTo ( cityMap ) ;
240243 baseLayer = L . tileLayer ( 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png' , { attribution : '© OpenStreetMap & CARTO' , maxZoom :19 } ) . addTo ( cityMap ) ;
241244 layerControl = L . control . layers ( { 'Light' : baseLayer } , { } , { collapsed :false } ) . addTo ( cityMap ) ;
242245 legend = new Legend ( { position : 'topright' } ) ; legend . addTo ( cityMap ) ;
You can’t perform that action at this time.
0 commit comments