1
0
Fork 0
This commit is contained in:
fredyrivera 2017-03-05 20:18:33 -05:00
parent 05e4ec3a95
commit 43be30c986
6 changed files with 531 additions and 459 deletions

View File

@ -1,35 +0,0 @@
.leaflet-control-slidemenu{
cursor: pointer;
}
.leaflet-menu{
position: absolute;
background-color: rgba(255, 255, 255, 0.5);
overflow: auto;
cursor: default;
z-index: 9999;
opacity: 0,5;
}
.leaflet-menu::-webkit-scrollbar{
width: 7px;
height: 7px;
background: #f2f2f2;
}
.leaflet-menu::-webkit-scrollbar-thumb{
border-radius: 2px;
background: #777;
}
.leaflet-menu-close-button{
background-color: transparent;
border: none;
font-size: 14pt;
color: #777;
cursor: pointer;
}
.leaflet-menu-close-button:hover{
color: #4285F4;
}

View File

@ -1,148 +0,0 @@
L.Control.SlideMenu = L.Control.extend({
options: {
position: 'topleft',
menuposition: 'topleft', // topleft,topright,bottomleft,bottomright
width: '300px',
height: '100%',
direction: 'horizontal', // vertical or horizontal
changeperc: '10',
delay: '10'
},
initialize: function (innerHTML, options) {
L.Util.setOptions(this, options);
this._innerHTML = innerHTML;
this._isLeftPosition = this.options.menuposition == 'topleft' ||
this.options.menuposition == 'bottomleft' ? true : false;
this._isTopPosition = this.options.menuposition == 'topleft' ||
this.options.menuposition == 'topright' ? true : false;
this._isHorizontal = this.options.direction == 'horizontal' ? true : false;
},
onAdd: function (map) {
this._container = L.DomUtil.create('div', 'leaflet-control-slidemenu leaflet-bar leaflet-control');
var link = L.DomUtil.create('a', 'leaflet-bar-part leaflet-bar-part-single', this._container);
link.title = 'Menu';
L.DomUtil.create('span', 'fa fa-info', link);
this._menu = L.DomUtil.create('div', 'leaflet-menu', map._container);
this._menu.style.width = this.options.width;
this._menu.style.height = this.options.height;
if (this._isHorizontal){
var frominit = -(parseInt(this.options.width, 10));
if (this._isLeftPosition){
this._menu.style.left = '-' + this.options.width;
} else {
this._menu.style.right = '-' + this.options.width;
}
if (this._isTopPosition) {
this._menu.style.top = '0px';
} else {
this._menu.style.bottom = '0px';
}
} else {
var frominit = -(parseInt(this.options.height, 10));
if (this._isLeftPosition){
this._menu.style.left = '0px';
} else {
this._menu.style.right = '0px';
}
if (this._isTopPosition) {
this._menu.style.top = '-' + this.options.height;
} else {
this._menu.style.bottom = '-' + this.options.height;
}
}
var closeButton = L.DomUtil.create('button', 'leaflet-menu-close-button fa', this._menu);
if (this._isHorizontal){
if (this._isLeftPosition) {
closeButton.style.float = 'right';
L.DomUtil.addClass(closeButton, 'fa-chevron-left');
}
else {
closeButton.style.float = 'left';
L.DomUtil.addClass(closeButton, 'fa-chevron-right');
}
} else {
if (this._isTopPosition) {
closeButton.style.float = 'right';
L.DomUtil.addClass(closeButton, 'fa-chevron-up');
}
else {
closeButton.style.float = 'right';
L.DomUtil.addClass(closeButton, 'fa-chevron-down');
}
}
this._contents = L.DomUtil.create('div', 'leaflet-menu-contents', this._menu);
this._contents.innerHTML = this._innerHTML;
this._contents.style.clear = 'both';
if (this._isHorizontal){
var ispx = this.options.width.slice(-1) == 'x' ? true : false;
var unit = parseInt(this.options.width, 10) * parseInt(this.options.changeperc, 10) / 100;
} else {
var ispx = this.options.height.slice(-1) == 'x' ? true : false;
var unit = parseInt(this.options.height, 10) * parseInt(this.options.changeperc, 10) / 100;
}
L.DomEvent.disableClickPropagation(this._menu);
L.DomEvent
.on(link, 'click', L.DomEvent.stopPropagation)
.on(link, 'click', function() {
// Open
this._animate(this._menu, frominit, 0, true, ispx, unit);
}, this)
.on(closeButton, 'click', L.DomEvent.stopPropagation)
.on(closeButton, 'click', function() {
// Close
this._animate(this._menu, 0, frominit, false, ispx, unit);
}, this);
return this._container;
},
onRemove: function(map){
//Remove sliding menu from DOM
map._container.removeChild(this._menu);
delete this._menu;
},
setContents: function(innerHTML) {
this._innerHTML = innerHTML;
this._contents.innerHTML = this._innerHTML;
},
_animate: function(menu, from, to, isOpen, ispx, unit) {
if (this._isHorizontal){
if (this._isLeftPosition){
menu.style.left = from + (ispx ? 'px' : '%');
} else {
menu.style.right = from + (ispx ? 'px' : '%');
}
} else {
if (this._isTopPosition) {
menu.style.top = from + (ispx ? 'px' : '%');
} else {
menu.style.bottom = from + (ispx ? 'px' : '%');
}
}
if (from != to){
setTimeout(function(slideMenu) {
var value = isOpen ? from + unit : from - unit;
slideMenu._animate(slideMenu._menu, value, to, isOpen, ispx, unit);
}, parseInt(this.options.delay), this);
} else {
return;
}
}
});
L.control.slideMenu = function(innerHTML, options) {
return new L.Control.SlideMenu(innerHTML, options);
}

View File

@ -0,0 +1,385 @@
/* Adding gvnix styles css - NO COPIAR */
/* @import 'http://geo-gvnix.rhcloud.com/resources/styles/standard.css';*/
/* Custom fixed navs */
.sidebar-logo{
padding: 20px;
margin: 0px auto;
text-align:center;
}
h1{
font-size: 20px; !important;
}
h2{
font-size: 16px; !important;
}
header.navbar+nav.navbar{
/* margin-top: 20px;same margin-bottom .navbar */
}
.navbar.navbar-default.navbar-fixed-top{
margin-top: 50px;
}
.sidebar.navbar-fixed-top{
margin-top: 100px;
}
@media (min-width: 768px) and (max-width: 998px){
.navbar.navbar-default.navbar-fixed-top{
margin-top: 100px;
}
.sidebar.navbar-fixed-top{
margin-top: 150px;
}
}
/* Custom navbar default: global*/
.navbar.navbar-default{
background-color: #f8f8f8;
border-color: #e7e7e7;
margin: 0;
border-radius: 0;
}
.navbar.navbar-default .navbar-brand {
color: #666;
text-shadow: none;
min-width: 150px;
}
.navbar.navbar-default .navbar-nav > li > a {
color: #666;
text-shadow: none;
}
.navbar.navbar-default .navbar-nav > li > a {
color: #666;
text-shadow: none;
}
.navbar.navbar-default .navbar-nav > li > a:hover{
color: #acc47f;
}
.navbar.navbar-default .navbar-nav > .active > a{
color: #fff;
background-color: #acc47f;
}
.navbar.navbar-default .navbar-nav > .active > a:hover{
color: #608224;
background-color: #acc47f;
}
.navbar.navbar-default .caret {
border-top-color: #ccc;
border-bottom-color: #ccc;
}
.navbar.navbar-default .caret:hover {
border-top-color: #333;
border-bottom-color: #333;
}
/* Custom sidebar menu */
/*Remove rounded coners*/
nav.sidebar.navbar {
border-radius: 0px;
}
nav.sidebar, .main{
-webkit-transition: margin 200ms ease-out;
-moz-transition: margin 200ms ease-out;
-o-transition: margin 200ms ease-out;
transition: margin 200ms ease-out;
}
/* Add gap to nav and right windows.*/
.main{
padding: 10px 10px 0 10px;
}
/* .....NavBar: Icon only with coloring/layout.....*/
/*small/medium side display*/
@media (min-width: 768px) {
/*Allow main to be next to Nav*/
.main{
position: absolute;
width: calc(100% - 40px); /*keeps 100% minus nav size*/
margin-left: 40px;
float: right;
}
/*lets nav bar to be showed on mouseover*/
nav.sidebar:hover + .main{
margin-left: 200px;
}
/*Center Brand*/
nav.sidebar.navbar.sidebar>.container .navbar-brand, .navbar>.container-fluid .navbar-brand {
margin-left: 0px;
}
/*Center Brand*/
nav.sidebar .navbar-brand, nav.sidebar .navbar-header{
text-align: center;
width: 100%;
margin-left: 0px;
}
/*Center Icons*/
nav.sidebar a{
padding-right: 13px;
min-width: 100px;
}
/*custom sidebar nav*/
nav.sidebar ul.nav.navbar-nav{
margin: 0;
}
nav.sidebar.navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
color: white;
}
/*adds border top to first nav box */
nav.sidebar .navbar-nav > li:first-child{
border-top: 1px #e5e5e5 solid;
}
/*adds border to bottom nav boxes*/
nav.sidebar .navbar-nav > li{
border-bottom: 1px #e5e5e5 solid;
}
/*adds background on hover*/
nav.sidebar .navbar-nav > li:hover{
color: #fff;
background-color: #43600E;
}
/*removes border last element*/
nav.sidebar .navbar-nav > li.last{
border-bottom: none;
}
/* Colors/style dropdown box*/
nav.sidebar .navbar-nav .open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
/*allows nav box to use 100% width*/
nav.sidebar .navbar-collapse, nav.sidebar .container-fluid{
padding: 0 0px 0 0px;
}
/*colors dropdown box text */
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
color: #777;
}
/*O quanto o menu irá esconder á esquerda*/
/*gives sidebar width/height*/
nav.sidebar{
width: 200px;
height: 100%;
margin-left: -270px;
float: left;
z-index: 8000;
margin-bottom: 0px;
}
/*give sidebar 100% width;*/
nav.sidebar li {
width: 100%;
}
/* Move nav to full on mouse over*/
nav.sidebar:hover{
margin-left: 0px;
}
/*for hiden things when navbar hidden*/
.forAnimate{
opacity: 0;
}
}
/* .....NavBar: Fully showing nav bar..... */
@media (min-width: 1330px) {
/* Allow main to be next to Nav
.main{
width: calc(100% - 200px); keeps 100% minus nav size
margin-left: 200px;
}
Show all nav
nav.sidebar{
margin-left: 0px;
float: left;
}
Show hidden items on nav
nav.sidebar .forAnimate{
opacity: 1;
} */
}
nav.sidebar .navbar-nav .open .dropdown-menu>li>a:hover, nav.sidebar .navbar-nav .open .dropdown-menu>li>a:focus {
color: #CCC;
background-color: transparent;
}
nav:hover .forAnimate{
opacity: 1;
}
/*---- FIM SLIDE MENU*/
.nav-side-menu {
overflow: auto;
font-family: verdana;
font-size: 12px;
font-weight: 200;
background-color: #2e353d;
position: fixed;
top: 0px;
width: 300px;
height: 100%;
color: #e1ffff;
}
.nav-side-menu .brand {
background-color: #23282e;
line-height: 50px;
display: block;
text-align: center;
font-size: 14px;
}
.nav-side-menu .toggle-btn {
display: none;
}
.nav-side-menu ul,
.nav-side-menu li {
list-style: none;
padding: 0px;
margin: 0px;
line-height: 35px;
cursor: pointer;
/*
.collapsed{
.arrow:before{
font-family: FontAwesome;
content: "\f053";
display: inline-block;
padding-left:10px;
padding-right: 10px;
vertical-align: middle;
float:right;
}
}
*/
}
.nav-side-menu ul :not(collapsed) .arrow:before,
.nav-side-menu li :not(collapsed) .arrow:before {
font-family: FontAwesome;
content: "\f078";
display: inline-block;
padding-left: 10px;
padding-right: 10px;
vertical-align: middle;
float: right;
}
.nav-side-menu ul .active,
.nav-side-menu li .active {
border-left: 3px solid #d19b3d;
background-color: #4f5b69;
}
.nav-side-menu ul .sub-menu li.active,
.nav-side-menu li .sub-menu li.active {
color: #d19b3d;
}
.nav-side-menu ul .sub-menu li.active a,
.nav-side-menu li .sub-menu li.active a {
color: #d19b3d;
}
.nav-side-menu ul .sub-menu li,
.nav-side-menu li .sub-menu li {
background-color: #181c20;
border: none;
line-height: 28px;
border-bottom: 1px solid #23282e;
margin-left: 0px;
}
.nav-side-menu ul .sub-menu li:hover,
.nav-side-menu li .sub-menu li:hover {
background-color: #020203;
}
.nav-side-menu ul .sub-menu li:before,
.nav-side-menu li .sub-menu li:before {
font-family: FontAwesome;
content: "\f105";
display: inline-block;
padding-left: 10px;
padding-right: 10px;
vertical-align: middle;
}
.nav-side-menu li {
padding-left: 0px;
border-left: 3px solid #2e353d;
border-bottom: 1px solid #23282e;
}
.nav-side-menu li a {
text-decoration: none;
color: #e1ffff;
}
.nav-side-menu li a i {
padding-left: 10px;
width: 20px;
padding-right: 20px;
}
.nav-side-menu li:hover {
border-left: 3px solid #d19b3d;
background-color: #4f5b69;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
@media (max-width: 767px) {
.nav-side-menu {
position: relative;
width: 100%;
margin-bottom: 10px;
}
.nav-side-menu .toggle-btn {
display: block;
cursor: pointer;
position: absolute;
right: 10px;
top: 10px;
z-index: 10 !important;
padding: 3px;
background-color: #ffffff;
color: #000;
width: 40px;
text-align: center;
}
.brand {
text-align: left !important;
font-size: 22px;
padding-left: 20px;
line-height: 50px !important;
}
}
@media (min-width: 767px) {
.nav-side-menu .menu-list .menu-content {
display: block;
}
}
body {
margin: 0px;
padding: 0px;
}

View File

@ -5061,7 +5061,9 @@ $consulta = "
$sql=mysqli_query($link,$consulta);
if (mysqli_num_rows($sql)!='0'){
$resultado = "<div class='' style='vertical-align: top; text-align:center;'>";
$resultado = "<ul class='list-group'>
";
while( $row = mysqli_fetch_array( $sql ) ) {
$icono = remplacetas('form_parametrizacion','campo',$perfil,'descripcion'," tabla='form_id' and opcion = 'categoria:icon:$row[md5_contenido]'") ;
@ -5072,10 +5074,18 @@ while( $row = mysqli_fetch_array( $sql ) ) {
$icon = $icono[0];
}
$icono = "$icon";
$contenido= substr($row[contenido],0, $length = 15);
$resultado .= "<div class='' style='width:50px; heigth:100px; float:left; vertical-align: top; margin: 5px; text-align:center'><a href='?id=$perfil&buscar=$categoria_campo:$contenido'><img style=' height:50px;' class='' src='$icono' style=''></a><small>$contenido</small></div>";
$contenido= html_entity_decode($row[contenido]);
$resultadox .= "
<div class='' style='width:50px; heigth:100px; float:left; vertical-align: top; margin: 5px; text-align:center'>
<a href='?id=$perfil&buscar=$categoria_campo:$contenido'>
<img style=' height:50px;' class='' src='$icono' style=''>
</a>
<small>$contenido</small>
</div>";
$resultado .="<li class='list-group'><a href='?id=$perfil&buscar=$categoria_campo:$contenido'><img style=' height:50px;' class='' src='$icono' style=''> $contenido</a></li>";
}
$resultado .= " </div >";
$resultado .= " </ul >";
}
else{$resultado = '';}
}

View File

@ -10,8 +10,11 @@ require ("milfs/funciones/conex.php");
$xajax->processRequests();
//if($_REQUEST[id2] =='') {$agregar= $_REQUEST[id];}else {$agregar = $_REQUEST[id2];}
$formulario_nombre = remplacetas('form_id','id',$_REQUEST[id],'nombre') ;
$formulario_descripcion = remplacetas('form_id','id',$_REQUEST[id],'descripcion') ;
$agregar_nombre = remplacetas('form_id','id',$agregar,'nombre') ;
$id_empresa = remplacetas('form_id','id',$_REQUEST[id],'id_empresa') ;
$logo = remplacetas('empresa','id',"$id_empresa[0]",'imagen','') ;
$razon_social = remplacetas('empresa','id',"$id_empresa[0]",'razon_social','') ;
$plantilla ="mapa";
?>
<!DOCTYPE html>
@ -19,9 +22,9 @@ $plantilla ="mapa";
<head >
<title><?php echo $formulario_nombre[0] ?> MILFS</title>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1">
<!-- <meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1"> -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<meta name="description" content="">
<?php $xajax->printJavascript("milfs/xajax/"); ?>
<link rel="shortcut icon" href="favicon-152.png">
@ -32,8 +35,8 @@ $plantilla ="mapa";
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="librerias/leaflet/leaflet-providers.js"></script>
<script src="librerias/leaflet/leaflet-search.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="milfs/css/bootstrap.css">
<link rel="stylesheet" type="text/css" media="screen" href="milfs/css/bootstrap.css">
@ -48,12 +51,9 @@ $plantilla ="mapa";
<script src="librerias/leaflet/dist/leaflet.markercluster-src.js"></script>
<script type="text/javascript" src="milfs/geojson.js.php?id=<?php echo $_REQUEST['id'] ?>&buscar=<?php echo $_REQUEST['buscar'] ?>"></script>
<link rel="stylesheet" type="text/css" media="screen" href="milfs/css/bootstrap.css">
<style type="text/css">
.navbar-default {
background:rgba(255,255,255,1) ;
}
<style type="text/css">
@media (max-width: 800px) {
.panel-map{
max-width: 970px;
@ -73,28 +73,9 @@ background:rgba(255,255,255,1) ;
#map { position:absolute; top:0; bottom:0; width:100%; }
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
padding: 0; margin: 0;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
body > .container {
padding: 60px 15px 0;
}
.container .text-muted {
margin: 20px 0;
}
.footer {
position: absolute;
@ -121,9 +102,7 @@ body > .container {
}
code {
font-size: 80%;
}
.modal-dialog {
width: 70%;
height: 50%;
@ -133,8 +112,23 @@ code {
.modal-content {
height: 50%;
}
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
</style>
<?php
$categorias = lista_categorias($_REQUEST['id'],'','') ;
$css_adicional = remplacetas('form_parametrizacion','campo',"index",'descripcion'," tabla='css' and opcion = 'adicional' and id_empresa = '$id_empresa[0]'") ;
if($css_adicional[0] !="") {
@ -149,9 +143,54 @@ code {
echo $css_adicional; ?>
</head>
<body>
<!--nav sidebar -->
<aside>
<nav class="navbar navbar-inverse sidebar navbar-fixed-top" role="navigation">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="librerias/leaflet/css/sidebar.css" rel="stylesheet">
<div class="nav-side-menu">
<div class="brand"><a href="./"><img style='width: 100%;' src='images/banner.png' class='image-responsive'></a><br> <i class="fa fa-info-circle fa-lg pull-right" style="margin-top: 10px; margin-right: 5px;"></i></div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class='input-group '>
<input type='text' id='buscador_campos' class='form-control' placeholder='Buscador de campos' onkeyup = \" xajax_campos_tabla(document.getElementById('filtro_campos').value,'div_tabla_campos','','',(this.value));\" >
<span class='input-group-addon' id='basic-addon2'><i class='glyphicon glyphicon-search'></i></span>
</div><br>
<div class="menu-list">
<div style='width: calc(90% - 40px);;' class="container-fluid">
<h1><?php echo $formulario_nombre[0]; ?></h1>
<h2><?php echo $formulario_descripcion[0]; ?></h2>
<hr>
<h3>Categorías</h3>
<div style="height: 300px; overflow: auto;" >
<?php echo $categorias; ?>
</div>
<div class="sidebar-logo">
<a href="e<?php echo $id_empresa[0]; ?>" >
<img style='margin: 0px auto;' class='img img-responsive block-center' src="milfs/images/secure/?file=150/<?php echo $logo[0]; ?>" alt="<?php echo $razon_social[0]; ?>">
<h4><?php echo $razon_social[0]; ?></h4>
</a>
</div>
</div>
</div>
</div>
</nav>
</aside>
<div id="map"></div>
<?php $categorias = lista_categorias($_REQUEST['id'],'','') ;
<?php
if($categorias !="") {
$pie="
<div style='' class='' id='contenedor_pie' >
@ -171,14 +210,66 @@ $leyenda ="<div id='div_leyenda'><a class='btn btn-default btn-xs' onclick=xaja
<script type="text/javascript">
function htmlbodyHeightUpdate(){
var height3 = $( window ).height()
var height1 = $('.nav').height()+50
height2 = $('.main').height()
if(height2 > height3){
$('html').height(Math.max(height1,height3,height2)+10);
$('body').height(Math.max(height1,height3,height2)+10);
}
else
{
$('html').height(Math.max(height1,height3,height2));
$('body').height(Math.max(height1,height3,height2));
}
}
$(document).ready(function () {
htmlbodyHeightUpdate()
$( window ).resize(function() {
htmlbodyHeightUpdate()
});
$( window ).scroll(function() {
height2 = $('.main').height()
htmlbodyHeightUpdate()
});
});
function htmlbodyHeightUpdate(){
var height3 = $( window ).height()
var height1 = $('.nav').height()+50
height2 = $('.main').height()
if(height2 > height3){
$('html').height(Math.max(height1,height3,height2)+10);
$('body').height(Math.max(height1,height3,height2)+10);
}
else
{
$('html').height(Math.max(height1,height3,height2));
$('body').height(Math.max(height1,height3,height2));
}
}
$(document).ready(function () {
htmlbodyHeightUpdate()
$( window ).resize(function() {
htmlbodyHeightUpdate()
});
$( window ).scroll(function() {
height2 = $('.main').height()
htmlbodyHeightUpdate()
});
});
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(4, -74.9005222);
var map = L.map('map', {center: latlng, zoom: 5, layers: [tiles]});
var map = L.map('map', {center: latlng, zoom: 5, layers: [tiles],zoomControl: false});
var geojson = L.geoJson(geojsonSample, {
@ -210,12 +301,18 @@ onEachFeature: function(feature, layer) {
map.fitBounds(geojson.getBounds());
var legend = L.control({position: 'bottomright'});
//disable zoomControl when initializing map (which is topleft by default)
//add zoom control with your options
L.control.zoom({
position:'topright'
}).addTo(map);
legend.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info legend');
div.innerHTML = "<?php echo $leyenda; ?> <a class='btn btn-info btn-xs' onclick=\"xajax_contenido_show('div_leyenda'); \"><span class=''>Leyenda</span></a>";
div.innerHTML = "";
div.id = "info legend"

View File

@ -1,237 +0,0 @@
<?php session_start();
if(isset($_REQUEST['debug'])) {ini_set('display_errors', 'On');}
require ('milfs/xajax/xajax.inc.php');
$xajax = new xajax();
//require ('json.lab.php');
require ('milfs/funciones/funciones.php');
require ("milfs/funciones/conex.php");
//require_once ('includes/markdown.php');
//require ('funciones/convert.php');
$xajax->processRequests();
//if($_REQUEST[id2] =='') {$agregar= $_REQUEST[id];}else {$agregar = $_REQUEST[id2];}
$formulario_nombre = remplacetas('form_id','id',$_REQUEST[id],'nombre') ;
$agregar_nombre = remplacetas('form_id','id',$agregar,'nombre') ;
$id_empresa = remplacetas('form_id','id',$_REQUEST[id],'id_empresa') ;
$plantilla ="mapa";
?>
<!DOCTYPE html>
<html lang="en">
<head >
<title>Mapa <?php echo $formulario_nombre[0] ?></title>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<?php $xajax->printJavascript("milfs/xajax/"); ?>
<link rel="shortcut icon" href="favicon-152.png">
<link rel="apple-touch-icon-precomposed" href="favicon-152.png">
<link rel="stylesheet" href="librerias/leaflet/leaflet-search.css"/>
<script src="librerias/leaflet/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="librerias/leaflet/leaflet-providers.js"></script>
<script src="librerias/leaflet/leaflet-search.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="milfs/css/bootstrap.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.js"></script>
<link rel="stylesheet" href="librerias/leaflet/dist/MarkerCluster.css" />
<link rel="stylesheet" href="librerias/leaflet/dist/MarkerCluster.Default.css" />
<script src="librerias/leaflet/dist/leaflet.markercluster-src.js"></script>
<script type="text/javascript" src="milfs/geojson.js.php?id=<?php echo $_REQUEST['id'] ?>&buscar=<?php echo $_REQUEST['buscar'] ?>"></script>
<link rel="stylesheet" type="text/css" media="screen" href="milfs/css/bootstrap.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="librerias/leaflet/L.Control.SlideMenu.css">
<script src="librerias/leaflet/L.Control.SlideMenu.js"></script>
<style type="text/css">
.navbar-default {
background:rgba(255,255,255,1) ;
}
@media (max-width: 800px) {
.panel-map{
max-width: 970px;
}
}
@media (min-width: 800px) {
.panel-map{
max-width: 200px;
}
}
.leaflet-popup-content { word-wrap: break-word !important; /*width:600px !important; */ }
#map { position:absolute; top:0; bottom:0; width:100%; }
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
padding: 0; margin: 0;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
body > .container {
padding: 60px 15px 0;
}
.container .text-muted {
margin: 20px 0;
}
.footer {
position: absolute;
bottom: 3px;
width: 95%;
margin: 0 auto;
height: 120px;
/* Set the fixed height of the footer here */
z-index: 999999;
}
#div_leyenda {
padding: 6px;
background-color: white;
border-radius: 3px;
width: 90%;
overflow-x: scroll;
}
code {
font-size: 80%;
}
.modal-dialog {
width: 70%;
height: 50%;
padding: 0;
}
.modal-content {
height: 50%;
}
</style>
<?php
$css_adicional = remplacetas('form_parametrizacion','campo',"index",'descripcion'," tabla='css' and opcion = 'adicional' and id_empresa = '$id_empresa[0]'") ;
if($css_adicional[0] !="") {
$css_adicional ="<style >
$css_adicional[0]
<!-- adicional -->
</style>";
}
else {
$css_adicional ="<style ><!-- nada --></style>";
}
echo $css_adicional; ?>
</head>
<body>
<div id="map"></div>
<?php $categorias = lista_categorias($_REQUEST['id'],'','') ;
if($categorias !="") {
$pie="
<div style='' class='' id='contenedor_pie' >
<div style='' class='container' >
<a href='#' onclick=\"xajax_limpia_div('contenedor_pie'); \"><span class='pull-right'><i class='fa fa-times'></i></span></a>
$categorias
</div></div>
</div>";
$leyenda ="<div id='div_leyenda'><a class='btn btn-default btn-xs' onclick=xajax_contenido_ocultar('div_leyenda');>Cerrar</a> $categorias </div> ";
}else{
}
//echo $pie;
?>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
latlng = L.latLng(4, -74.9005222);
var map = L.map('map', {center: latlng, zoom: 5, layers: [tiles]});
var geojson = L.geoJson(geojsonSample, {
pointToLayer: function(feature, latlng) {
var smallIcon = new L.Icon({
iconSize: [60, 60],
iconAnchor: [13, 27],
popupAnchor: [1, -24],
iconUrl: feature.properties.icon.iconUrl
});
return L.marker(latlng, {icon: smallIcon});
},
onEachFeature: function(feature, layer) {
var popupText = feature.properties.description
layer.bindPopup(popupText); }
});
var markers = L.markerClusterGroup();
markers.addLayer(geojson);
// var legend = L.control({position: 'bottomright'});
// legend.onAdd = function (map) {
//var div = L.DomUtil.create('div', 'info legend');
//div.innerHTML = "<?php echo $leyenda; ?> <a class='btn btn-info btn-xs' onclick=\"xajax_contenido_show('div_leyenda'); \"><span class=''>Leyenda</span></a>";
//div.id = "info legend"
//return div;
//};
//legend.addTo(map);
map.addLayer(markers);
// right
var left = '<h2>Creditos</h2>';
var right = '<h2>Titulo MAPA</h2>';
var contents = '<hr>';
contents += 'When you click the menu button and the menu is displayed to slide.<br>';
contents += 'Please set the innerHTML to slide menu.</p>';
var contents2 = '<hr>';
contents2 += '<h3>Categorias</h3>';
contents2 += "<?php echo $leyenda; ?> <a class='btn btn-info btn-xs' onclick=\"xajax_contenido_show('div_leyenda'); \"><span class=''>Leyenda</span></a>";
/// L.control.slideMenu(left + contents).addTo(map);
var slideMenu = L.control.slideMenu('', {position: 'topright', menuposition: 'topright', delay: '50'}).addTo(map);
slideMenu.setContents(right + contents2 );
</script>
</body>
</html>