Commit c26ca437 authored by Sarath's avatar Sarath

Map scrolling with mousewheel disabled

parent 043ef4cc
Pipeline #3226390 passed with stage
in 7 seconds
...@@ -47,8 +47,12 @@ function stateDetails (name) { ...@@ -47,8 +47,12 @@ function stateDetails (name) {
} }
} }
// Create the map
var map = L.map('map').setView([defaultLat, defaultLng], defaultZoom); var map = L.map('map').setView([defaultLat, defaultLng], defaultZoom);
// Disable scrollwheel zooming
map.scrollWheelZoom.disable();
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', { L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', {
maxZoom: 20, maxZoom: 20,
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment