Mejopras en categorizacion

This commit is contained in:
humano 2020-04-07 07:02:02 -05:00
parent 5c180454e6
commit 37ca026879
3 changed files with 67 additions and 28 deletions

View File

@ -30,12 +30,7 @@ $color_fondo= random_color();
?> ?>
<link rel="shortcut icon" href="favicon-152.png"> <link rel="shortcut icon" href="favicon-152.png">
<link rel="apple-touch-icon-precomposed" href="favicon-152.png"> <link rel="apple-touch-icon-precomposed" href="favicon-152.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous" > <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous" >
<style> <style>
@font-face { @font-face {
font-family: 'AlfphabetIV'; font-family: 'AlfphabetIV';

View File

@ -154,7 +154,7 @@ $css_adicional[0]
</style>"; </style>";
} }
print $css_adicional; print $css_adicional[0];
?> ?>
<style> <style>
body { body {
@ -215,13 +215,14 @@ print $css_adicional;
<hr> <hr>
<label id='formulario_descripcion_mapa'><?php echo $formulario_descripcion[0] ?></label> <label id='formulario_descripcion_mapa'><?php echo $formulario_descripcion[0] ?></label>
<center> <center>
<a href='/g<?php echo $_REQUEST[id]; ?>' target='_blank' class="btn btn-default btn-xs"><i class="fa fa-plus-circle" aria-hidden="true"></i> Agregar</a> <br>
<span class="label label-warning">Despues de agregar, recarga el mapa</span> <span class="label label-warning">Click en el mapa para agregar datos.</span>
</center> </center>
<hr> <hr>
<div id='div_categorias'>
<?php echo $categorias; ?> <?php echo $categorias; ?>
</div>
</div> </div>
<div class="leaflet-sidebar-pane" id="search"> <div class="leaflet-sidebar-pane" id="search">
<label>Buscar en el Mapa</label> <label>Buscar en el Mapa</label>
@ -232,7 +233,7 @@ print $css_adicional;
</div> </div>
</div> </div>
<div id="map"></div> <div id="map" title='Click en el mapa para agregar datos.'></div>
<script src="librerias/leaflet/leaflet.js" crossorigin=""></script> <script src="librerias/leaflet/leaflet.js" crossorigin=""></script>

View File

@ -63,6 +63,7 @@ $buscador ="
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> --> <!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<meta name="description" content=""> <meta name="description" content="">
<meta NAME="Language" CONTENT="Spanish"> <meta NAME="Language" CONTENT="Spanish">
<meta NAME="Revisit" CONTENT="1 days"> <meta NAME="Revisit" CONTENT="1 days">
<meta NAME="Distribution" CONTENT="Global"> <meta NAME="Distribution" CONTENT="Global">
<meta NAME="Robots" CONTENT="All"> <meta NAME="Robots" CONTENT="All">
@ -85,6 +86,7 @@ $buscador ="
<link rel="shortcut icon" href="favicon-152.png"> <link rel="shortcut icon" href="favicon-152.png">
<link rel="apple-touch-icon-precomposed" href="favicon-152.png"> <link rel="apple-touch-icon-precomposed" href="favicon-152.png">
<link rel="stylesheet" href="librerias/leaflet/leaflet.css" /> <link rel="stylesheet" href="librerias/leaflet/leaflet.css" />
<script src="milfs/js/scripts.js"></script>
<?php <?php
$otro_json = remplacetas('form_parametrizacion','campo',$_REQUEST[id],'descripcion'," tabla='form_id' and opcion = 'json'","","") ;; $otro_json = remplacetas('form_parametrizacion','campo',$_REQUEST[id],'descripcion'," tabla='form_id' and opcion = 'json'","","") ;;
//$obj = file_get_contents('https://www.kleper.net/wiki/RutaPazTerritorial.geojson'); //$obj = file_get_contents('https://www.kleper.net/wiki/RutaPazTerritorial.geojson');
@ -103,6 +105,7 @@ $ids = json_decode($otro_json[0]);
iconSize: [100, 100], iconSize: [100, 100],
iconAnchor: [13, 27], iconAnchor: [13, 27],
popupAnchor: [1, -24], popupAnchor: [1, -24],
className: 'mapIcon',
/*iconUrl: feature.properties.icon.iconUrl*/ /*iconUrl: feature.properties.icon.iconUrl*/
iconUrl: 'https://tupale.co/milfs/images/secure/?file=150/da6d16547658ebc06c5378b30d1ee4bf.png' iconUrl: 'https://tupale.co/milfs/images/secure/?file=150/da6d16547658ebc06c5378b30d1ee4bf.png'
@ -138,24 +141,50 @@ $ids = json_decode($otro_json[0]);
<link href="librerias/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <link href="librerias/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="librerias/leaflet/css/leaflet-sidebar.css" /> <link rel="stylesheet" href="librerias/leaflet/css/leaflet-sidebar.css" />
<link rel="stylesheet" href="librerias/bootstrap/css/bootstrap.min.css" /> <link rel="stylesheet" href="librerias/bootstrap/css/bootstrap.min.css" />
<?php
$hoja_css = remplacetas('form_parametrizacion','campo',"index",'descripcion'," tabla='hoja_css' and opcion = 'hoja_css' and id_empresa = '$id_empresa[0]'") ;
if ($hoja_css[0] ==""){ $hoja_estilo ="<link href='./milfs/css/style.css' rel='stylesheet'>";}
else{ $hoja_estilo ="<link href='$hoja_css[0]' rel='stylesheet'>";}
print $hoja_estilo;
$css_adicional = remplacetas('form_parametrizacion','campo',"index",'descripcion'," tabla='css' and opcion = 'adicional' and id_empresa = '$empresa[0]'") ;
if($css_adicional[0] !="") {
$css_adicional ="<style >
$css_adicional[0]
</style>";
}
print $css_adicional[0];
?>
<style> <style>
body { body {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
html, body, #map { html, body, #map {
height: 100%; height: 100%;
} }
</style> </style>
</head> </head>
<body onload=""> <body onload="">
<!-- modal -->
<div class='modal fade ' id='muestraInfo' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true' data-backdrop='static' data-keyboard='false'>
<div class='modal-dialog modal-MD' style='' >
<div class='modal-content'>
<div class='modal-header' >
<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>
<h4 class='modal-title' id='myModalLabel_info'><div id='titulo_modal'></div></h4>
</div>
<div class='modal-body'>
<div id='muestra_form'></div>
</div>
<div class='modal-footer' id='pie_modal'>
</div>
</div>
</div>
</div>
<!-- modal -->
<!-- optionally define the sidebar content via HTML markup --> <!-- optionally define the sidebar content via HTML markup -->
<div id="sidebar" class="leaflet-sidebar collapsed"> <div id="sidebar" class="leaflet-sidebar collapsed">
@ -186,13 +215,14 @@ $ids = json_decode($otro_json[0]);
<hr> <hr>
<label id='formulario_descripcion_mapa'><?php echo $formulario_descripcion[0] ?></label> <label id='formulario_descripcion_mapa'><?php echo $formulario_descripcion[0] ?></label>
<center> <center>
<a href='/g<?php echo $_REQUEST[id]; ?>' target='_blank' class="btn btn-default btn-xs"><i class="fa fa-plus-circle" aria-hidden="true"></i> Agregar</a> <br>
<span class="label label-warning">Despues de agregar, recarga el mapa</span> <span class="label label-warning">Click en el mapa para agregar datos.</span>
</center> </center>
<hr> <hr>
<div id='div_categorias'>
<?php echo $categorias; ?> <?php echo $categorias; ?>
</div>
</div> </div>
<div class="leaflet-sidebar-pane" id="search"> <div class="leaflet-sidebar-pane" id="search">
<label>Buscar en el Mapa</label> <label>Buscar en el Mapa</label>
@ -203,7 +233,7 @@ $ids = json_decode($otro_json[0]);
</div> </div>
</div> </div>
<div id="map"></div> <div id="map" title='Click en el mapa para agregar datos.'></div>
<script src="librerias/leaflet/leaflet.js" crossorigin=""></script> <script src="librerias/leaflet/leaflet.js" crossorigin=""></script>
@ -213,7 +243,10 @@ $ids = json_decode($otro_json[0]);
<link rel="stylesheet" href="librerias/leaflet/dist/MarkerCluster.css" /> <link rel="stylesheet" href="librerias/leaflet/dist/MarkerCluster.css" />
<link rel="stylesheet" href="librerias/leaflet/dist/MarkerCluster.Default.css" /> <link rel="stylesheet" href="librerias/leaflet/dist/MarkerCluster.Default.css" />
<script src="librerias/leaflet/dist/leaflet.markercluster-src.js"></script> <script src="librerias/leaflet/dist/leaflet.markercluster-src.js"></script>
<script src="librerias/jquery/jquery-2.1.4.min.js"></script> <script src="https://code.jquery.com/jquery-3.3.1.js" ></script>
<script src="./librerias/bootstrap/js/bootstrap.min.js" ></script>
<!-- <script src="librerias/jquery/jquery-2.1.4.min.js"></script> -->
<?php $cadena_busqueda = $_REQUEST['buscar']; ?> <?php $cadena_busqueda = $_REQUEST['buscar']; ?>
<script type="text/javascript" src="milfs/geojson.js.php?id=<?php echo $_REQUEST['id'] ?>&buscar=<?php echo $cadena_busqueda ?>&item=<?php echo $_REQUEST['item'] ?>"></script> <script type="text/javascript" src="milfs/geojson.js.php?id=<?php echo $_REQUEST['id'] ?>&buscar=<?php echo $cadena_busqueda ?>&item=<?php echo $_REQUEST['item'] ?>"></script>
@ -237,10 +270,11 @@ $ids = json_decode($otro_json[0]);
pointToLayer: function(feature, latlng) { pointToLayer: function(feature, latlng) {
var smallIcon = new L.Icon({ var smallIcon = new L.Icon({
iconSize: [50, 50], iconSize: [70, 70],
iconAnchor: [13, 27], iconAnchor: [13, 27],
popupAnchor: [1, -24], popupAnchor: [1, -24],
autoPanPadding: [30,30], autoPanPadding: [30,30],
className: 'mapIcon',
iconUrl: feature.properties.icon.iconUrl iconUrl: feature.properties.icon.iconUrl
@ -285,6 +319,15 @@ function openMarkerPopup(e){
marker.openPopup(); marker.openPopup();
} }
function onMapClick(e) {
var coordenadas =""+e.latlng.lat+"|"+e.latlng.lng;
setCookie('ubicacion',coordenadas, 1);
// alert("You clicked the map at " + e.latlng);
sidebar.close();
xajax_formulario_embebido_ajax("","<?php echo $_REQUEST[id]; ?>","","");
}
map.on('click', onMapClick);
// add panels dynamically to the sidebar // add panels dynamically to the sidebar