diff --git a/ckanext/odsh/fanstatic/odsh_spatial_query.js b/ckanext/odsh/fanstatic/odsh_spatial_query.js index 7c01944ccfa4fe0bdc742477644a7278e28875d5..70586e614fa6c58e739d35e5ed77b48cd74d5ae8 100644 --- a/ckanext/odsh/fanstatic/odsh_spatial_query.js +++ b/ckanext/odsh/fanstatic/odsh_spatial_query.js @@ -137,7 +137,7 @@ this.ckan.module('odsh-spatial-query', function ($, _) rectangle: { shapeOptions: module.options.style } } }); - L.drawLocal.draw.toolbar.buttons.rectangle='Rechteck ziehen' + L.drawLocal.draw.toolbar.buttons.rectangle = 'Rechteck ziehen' // Initialize the draw control map.addControl(drawControl); @@ -178,15 +178,15 @@ this.ckan.module('odsh-spatial-query', function ($, _) { if (extentLayer) { - // $('body').removeClass('dataset-map-expanded'); - // is_exanded = false; - // resetMap(); - // // Eugh, hacky hack. + $('body').removeClass('dataset-map-expanded'); + is_exanded = false; + resetMap(); + // Eugh, hacky hack. setTimeout(function () { - // map.fitBounds(extentLayer.getBounds()); + map.fitBounds(extentLayer.getBounds()); submitForm(); - }, 0); + }, 200); } }); @@ -263,7 +263,7 @@ this.ckan.module('odsh-spatial-query', function ($, _) setTimeout(function () { form.submit(); - }, 0); + }, 800); } } }