mejora usabilidad en sidebar mapero

This commit is contained in:
humano 2020-04-17 19:38:14 -05:00
parent b8a0ac8d71
commit 7844e793b4

View File

@ -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;
<div class="leaflet-sidebar-tabs" >
<!-- top aligned tabs -->
<ul role="tablist">
<li><a href="#home" role="tab"><i class="fa fa-bars active"></i></a></li>
<li><a href="#search" role="tab"><i class="fa fa-search active"></i></a></li>
<li><a href="#home" onclick="sidebar.open();" role="tab"><i class="fa fa-bars active"></i></a></li>
<li><a href="#search" onclick="sidebar.open();" role="tab"><i class="fa fa-search active"></i></a></li>
</ul>
@ -252,7 +266,7 @@ print $css_adicional;
</div>
</div>
<div id="map" title='<?php echo $mapa_aviso; ?>'></div>
<div id="map" title='<?php echo $mapa_aviso; ?>'></div>
<script src="librerias/leaflet/leaflet.js" crossorigin=""></script>
@ -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();
}
<?php echo $map_click; ?>