From 485cc2c73583d4df8da3610e8b6da95bc98d73d3 Mon Sep 17 00:00:00 2001 From: zalitoar <3695043+Zalitoar@users.noreply.github.com> Date: Fri, 31 May 2024 22:28:23 -0300 Subject: [PATCH] =?UTF-8?q?saco=20animaci=C3=B3n=20al=20buscar=20un=20luga?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/buscador.js | 3 ++- assets/js/buscador.min.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/buscador.js b/assets/js/buscador.js index a95860e..4211d6e 100644 --- a/assets/js/buscador.js +++ b/assets/js/buscador.js @@ -18,7 +18,8 @@ function viajar(bbox) { [ bbox[2], bbox[0] ], [ bbox[3], bbox[1] ] ], { - padding: { top: 10, bottom:25, left: 15, right: 5 } + padding: { top: 10, bottom:25, left: 15, right: 5 }, + duration: 0 }); }; diff --git a/assets/js/buscador.min.js b/assets/js/buscador.min.js index 58aad49..d01f90d 100644 --- a/assets/js/buscador.min.js +++ b/assets/js/buscador.min.js @@ -1 +1 @@ -var bbox,searchLat,searchLon,respuesta="",lugar="";function keypressInBox(a){13==(a.keyCode?a.keyCode:a.which)&&(a.preventDefault(),buscar(lugar=$("#buscarLugar")[0].value))}function viajar(a){map.fitBounds([[a[2],a[0]],[a[3],a[1]]],{padding:{top:10,bottom:25,left:15,right:5}})}function buscar(a){$.getJSON("https://nominatim.openstreetmap.org/search?format=json&limit=1&q="+a,function(a){$.each(a,function(a,e){bbox=e.boundingbox}),viajar(bbox)})}$("#buscarLugar").bind("keypress",{},keypressInBox); \ No newline at end of file +function keypressInBox(a){var r=a.keyCode?a.keyCode:a.which;13==r&&(a.preventDefault(),lugar=$("#buscarLugar")[0].value,buscar(lugar))}function viajar(a){map.fitBounds([[a[2],a[0]],[a[3],a[1]]],{padding:{top:10,bottom:25,left:15,right:5},duration:0})}function buscar(a){$.getJSON("https://nominatim.openstreetmap.org/search?format=json&limit=1&q="+a,function(a){$.each(a,function(a,r){bbox=r.boundingbox}),viajar(bbox)})}var bbox,searchLat,searchLon,respuesta="",lugar="";$("#buscarLugar").bind("keypress",{},keypressInBox); \ No newline at end of file