Ignore:
Timestamp:
Jul 7, 2021, 2:07:20 PM (3 years ago)
Author:
alloc
Message:

Map: Added options for fractional zoom to map.js lines 42 - 46

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/webserver/js/map.js

    r347 r366  
    4040                zoomsliderControl: true,
    4141                attributionControl: false,
    42                 crs: SDTD_CRS
     42                crs: SDTD_CRS,
     43                // For the below options read section "Fractional zoom" here: https://leafletjs.com/examples/zoom-levels/
     44                zoomSnap: 1, // Defines the zoom levels that can be achieved at all
     45                zoomDelta: 1, // Defines how much the zoom is changed with keyboard +/- and the zoom slider control
     46                wheelPxPerZoomLevel: 60 // Defines how much mouse scrolling is needed per zoom level. If zoomDelta is e.g. 0.25 and you want the mouse scroll zoom to match that make this 4 times as high, i.e. 240
    4347        }).setView([0, 0], Math.max(0, mapinfo.maxzoom - 5));
    4448
Note: See TracChangeset for help on using the changeset viewer.