Leaflet views: how to zoom on the marker while clicking on it in order to get the popup
Install and enable jQuery update. Set the jQuery version to >= 1.7.

Create a module, then create a zoom.js JavaScript file and paste this:

(function ($) {
  Drupal.behaviors.MYMODULE = {
    attach: function (context, settings) {
      $(document).bind('leaflet.feature', function(e, lFeature, feature) {
        lFeature.on('click', function(e) {
          var lMap = Drupal.settings.leaflet[0].lMap;
          lMap.setView(e.latlng,8);
        })
      });

    }
  }
})(jQuery);


Use your module name instead of MYMODULE

Then use drupal_add_js() in your module to include zoom.js. Note the weight option:

  drupal_add_js(drupal_get_path('module', 'MYMODULE') .'/zoom.js',array('group' =&gt; JS_DEFAULT, 'weight' =&gt; -5));