From 7844e793b4985e24d4f06efd3c879baa358dfa1f Mon Sep 17 00:00:00 2001 From: humano Date: Fri, 17 Apr 2020 19:38:14 -0500 Subject: [PATCH] mejora usabilidad en sidebar mapero --- mapero.php | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/mapero.php b/mapero.php index 7f35fcd..1465228 100644 --- a/mapero.php +++ b/mapero.php @@ -43,7 +43,19 @@ xajax_formulario_embebido_ajax('','$_REQUEST[id]','',''); map.on('dblclick', onMapClick); "; -}else{ $map_click =""; $mapa_aviso="";} +}else{ + + $map_click =" + function onMapClick(e) { + + sidebar.close(); + + } + + map.on('dblclick', onMapClick); + map.on('click', onMapClick); + + "; $mapa_aviso="";} $proveedor_mapa = remplacetas('form_parametrizacion','campo',$_REQUEST['id'],'descripcion'," tabla='form_id' and opcion = 'proveedor_mapa'") ;; if($proveedor_mapa[0] !=""){ $proveedor ="'$proveedor_mapa[0]'"; @@ -135,7 +147,9 @@ $ids = json_decode($otro_json[0]); var popupText = feature.properties.description - layer.bindPopup(popupText); } + layer.bindPopup(popupText) + + ; } }); @@ -212,8 +226,8 @@ print $css_adicional;
@@ -252,7 +266,7 @@ print $css_adicional;
-
+
@@ -308,7 +322,10 @@ print $css_adicional; var popupText = L.responsivePopup().setContent(feature.properties.description ); layer.bindPopup(popupText, { maxWidth: 200 - }); + } + + ); + layer.bindTooltip(feature.properties.title).openTooltip(); } }); @@ -344,6 +361,7 @@ function openMarkerPopup(e){ const markerID = e.id; const marker = markers.getLayer(markerID); marker.openPopup(); + }