(function($) {
  Drupal.behaviors.incubatorMappingAdmin = {
    attach: function() {
      $('#edit-submit').click(function() {
        var center = Drupal.settings.leaflet[0].lMap.getCenter();
        var zoom = Drupal.settings.leaflet[0].lMap.getZoom();
        $('#incubator_mapping_centerpoint_set').val(center.lng+', '+center.lat);
        $('#incubator_mapping_zoom_set').val(zoom);
      });
    }
  }
})(jQuery);
