this is not an issue, maybe info to who need it..
if you need to use scroll gesture handling like ctrl+scroll to zoom, you can use this leaflet addon
- download the addon release, copy 'dist' folder to your path in yii2
- add this code to your form or view.. (in my case, '@web/vendor/leaflet_gesture' is my folder for addon)
$this->registerCssFile('@web/vendor/leaflet_gesture/leaflet-gesture-handling.min.css');
$this->registerJsFile('@web/vendor/leaflet_gesture/leaflet-gesture-handling.min.js', ['depends' => [\dosamigos\leaflet\LeafLetAsset::className()]]);
- add this code
$leafLet->appendJs('map.gestureHandling.enable();');, the end result maybe like this :
$leafLet = new LeafLet([
'name' => 'map',
'tileLayer' => $tileLayer,
'center' => $center,
'zoom' => 12,
]);
$leafLet->appendJs('map.gestureHandling.enable();');