-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitoring.php
574 lines (465 loc) · 20.3 KB
/
monitoring.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
<?php
// Inialize session
session_start();
include_once "conexion.php";
// Check, if username session is NOT set then this page will jump to login page
if (!isset($_SESSION['username'])) {
header('Location: index.php');
}
else
{
$sql="SELECT dwtppoi, dwdsinfo FROM dwitaumon ORDER BY dwdsinfo";
//echo "se ejecuta el SQL";
$query=pg_query($sql);
//$select= '<div class="confirmation-box round dark"><label for="TipoPOI">Usuario Habilitados: </label><select name="TipoPOI" id="TipoPOI"><optgroup label="Haga su seleccion"><option value="16">Opcion 1</option><option value="2">Opcion 2</option><option value="3">Opcion 3</option></optgroup></select></div>'
$select= '<div class="confirmation-box round dark"><label for="TipoPOI">Show User: </label><select multiple SIZE=5 name="TipoPOI" id="TipoPOI"><option selected value="9999999999">Show All</option>';
if(pg_num_rows($query) > 0)
{
while($rs=pg_fetch_row($query)){
$select.='<option value="'.$rs[0].'">'.$rs[1].'</option>';
$CheckBoxUsers.= '<input type="checkbox" name="topping0" id="topping0" value="Pepperoni"/><label for="topping0">Pepperoni</label>';
}
pg_free_result($res);
//Cerramos la conexión
pg_close($conn);
}
$select.='</optgroup></select></div>';
//echo $select;
}
?>
<!DOCTYPE html>
<html lang="pt">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
<title>BCF Solutions S.A. - Galileo v2.1.1</title>
<link rel="stylesheet" type="text/css" href="pro_dropdown_3/pro_dropdown_3.css" />
<!-- Leaflet -->
<link rel="stylesheet" href="leaflet-js/v7.3/leaflet.css" />
<script src="leaflet-js/v7.3/leaflet.js"></script>
<link rel="stylesheet" href="css/menu.css" />
<link rel="stylesheet" href="css/menuBotones.css" />
<!-- Leaflet Plugins -->
<link rel="stylesheet" href="css/Control.Zoomslider.css" />
<script src="plugins/Control.Zoomslider.js" ></script>
<link rel="stylesheet" href="css/Control.MiniMap.css" />
<script src="plugins/Control.MiniMap.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/Control.MousePosition.css" />
<script src="plugins/Control.MousePosition.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/leaflet.fullscreen.css" />
<script src="plugins/Leaflet.fullscreen.js" type="text/javascript"></script>
<script src="plugins/leaflet.markercluster-src.js"></script>
<link rel="stylesheet" href="css/MarkerCluster.css" />
<link rel="stylesheet" href="css/MarkerCluster.Default.css" />
<script src="plugins/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" href="css/jquery-ui.min.css">
<link rel="stylesheet" href="css/jquery-ui.theme.min.css">
<script src="plugins/jquery-ui.min.js"></script>
<link rel="stylesheet" href="css/BarPPal.css" />
<link href='css/leaflet.draw.css' rel='stylesheet' />
<script src='plugins/leaflet.draw.js'></script>
<script src="plugins/leaflet.ajax.min.js"></script>
<script src="plugins/Bing.js"></script>
<link rel="stylesheet" href="css/style.css">
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.ui-widget {
font-size: 0.7em;
font-style: normal;
}
.container { border:2px solid #ccc; width:200px; height: 100px; overflow-y: scroll; background: #e5f5f9 url('../images/icons/message-boxes/information.png') no-repeat 0.833em center;
border: 1px solid #cae0e5;
color: #5a9bab;}
</style>
</head>
<body onload="initialize()" >
<div id='map'></div>
<script>
timeElapsed = 0;
var googleLayer_roadmap ;
var googleLayer_satellite ;
var googleLayer_hybrid ;
var googleLayer_terrain ;
function onEachFeature(feature, layer) {
if (feature.properties && feature.properties.popupContent) {
layer.bindPopup('<a target="_blank" href="' + feature.properties.url + '">' +
'<img src="' + feature.properties.image + '"width="128" height="128">' +
'<h2>' + feature.properties.name + '</h2>' +
'</a>'
,{closeButton: true,
minWidth: 135}
);
}
}
function ReturnSQL(){
var Selector = document.getElementById("TipoPOI");
var SelBranchVal = "";
var x = 0;
for (x=0; x < Selector.length; x++)
{
if (Selector[x].selected)
{
if (SelBranchVal == "")
{
SelBranchVal = Selector[x].value;
}
else
{
SelBranchVal = SelBranchVal + "," + Selector[x].value;
}
}
}
alert(SelBranchVal);
}
function initialize() {
var EntregasAEX;
var lat = -23.554700;
var lon = -46.634438;
var osmAttrib = '(c) OpenStreetMap contributors'
TileSvrURL = 'http://10.0.0.200/bcf_tiles/{z}/{x}/{y}.png'
inicialZoom = 14;
var MapaBase = new L.tileLayer(TileSvrURL, {
maxZoom: 18,
minZoom: 3,
attribution: osmAttrib
});
var map = L.map('map',{
zoomsliderControl: true,
zoomControl: false,
center: [lat,lon],
zoom: inicialZoom,
layers: [MapaBase]
});
var MapaBingHybrid = new L.BingLayer("AvcpKC4awcn042na3LJ5vIzVQs5xSw1iykahgh7JiA93oVrjSeClwf_k71367Aez", {type: "AerialWithLabels", maxZoom: 18, minZoom: 1, detectRetina: true});
var MapaBing = new L.BingLayer("AvcpKC4awcn042na3LJ5vIzVQs5xSw1iykahgh7JiA93oVrjSeClwf_k71367Aez", {type: "Aerial", maxZoom: 18, minZoom: 1, detectRetina: true});
// ---- BARA DE HERRAMIENTAS
var ToolbarGroup = L.featureGroup().addTo(map);
var drawControl = new L.Control.Draw({
edit: {
featureGroup: ToolbarGroup
}
}).addTo(map);
map.on('draw:created', function(e) {
ToolbarGroup.addLayer(e.layer);
}); // ---- BARA DE HERRAMIENTAS
// ------- AGREGO FUNCION PARA VER LAT Y LONG CON EL MOVIEMIENTO DEL MOUSE
L.control.mousePosition({
position: 'bottomleft',
separator: ' : ',
prefix: 'Latitude | Longitude: '
}).addTo(map);
// --------- FIN ------ AGREGO FUNCION PARA VER LAT Y LONG CON EL MOVIEMIENTO DEL MOUSE
var IconLocatorOrange = L.icon({
iconUrl: 'images/icons/locator-orange.png',
iconAnchor: [25, 25], // point of the icon which will correspond to marker's location
iconSize: [32, 37], // size of the icon
shadowUrl: 'images/marker-shadow'
});
var IconOcurrenciaRed = L.icon({
iconUrl: 'images/icons/caution-red.png',
shadowUrl: 'images/marker-shadow',
iconSize: [32, 37], // size of the icon
iconAnchor: [25, 25] // point of the icon which will correspond to marker's location
});
var IconCadastroBlue = L.icon({
iconUrl: 'images/icons/male-2-blue.png',
iconSize: [32, 37], // size of the icon
iconAnchor: [25, 25], // point of the icon which will correspond to marker's location
shadowUrl: 'images/marker-shadow'
});
var IconAgenciasITAU = L.icon({
iconUrl: 'images/itauPoi.png',
iconSize: [26, 38], // size of the icon
iconAnchor: [25, 25], // point of the icon which will correspond to marker's location
shadowUrl: 'images/marker-shadow'
});
map.on('moveend', function() {
//alert(map.getBounds());
});
var markers = new L.layerGroup();
function loadPoisTracking() {
elapsedTime = new Date().getMilliseconds();
//var bBoxSW = map.getBounds().getSouthWest();
//var bBoxNE = map.getBounds().getNorthEast();
//console.log("current bounding box: SouthWest " + bBoxSW + ", NorthEast: " + bBoxNE);
console.log("BUSCANDO POIS EN EL BOUNDINBOX ACTUAL ...");
var requestString = "http://10.0.0.200/GalileoITAU/GetTracking.php";
console.log("request URL: " + requestString);
$.getJSON(requestString,
function(pois) {
console.log(pois.features.length + " ENCONTRADOS PARA ACTUALIZAR POSICION!");
console.log("checking for POI layer from previous bounding box...");
if (map.hasLayer(markers)) {
console.log("previous POI layer found!");
console.log("removing previous POI layer...");
//markers.clearLayers(); // better redeclare variable 'markers', see next two lines
map.removeLayer(markers);
markers = new L.layerGroup();
console.log("previous POI layer removed!");
} else {
console.log("no previous POI layer found!"); //only happens on initial pois load
}
console.log("creating clustered POI layer...");
for (var i in pois.features) {
var popupText = '<a target="_blank" href="' + 'http://www.itau.com.br' + '">' +
'<img src="' + pois.features[i].properties.icon + ' "width="48" height="64" align="middle">' +
'</a>' +
'<h4>User Name: ' + pois.features[i].properties.UserName + '</h4>' +
'<h5>User ID: ' + pois.features[i].properties.id + '</h4>' +
'<h5>Last Contact: ' + pois.features[i].properties.time + '</h5>' +
'<h5>Lat: ' + pois.features[i].properties.lat + '</h5>' +
'<h5>Long: ' + pois.features[i].properties.long + '</h5>'
//if (feature.properties.color) {
// popupText += '<br/>color: ' + feature.properties.color
//}
var marker = new L.Marker(new L.LatLng(pois.features[i].geometry.coordinates[1], pois.features[i].geometry.coordinates[0]), {icon: IconLocatorOrange});
marker.bindPopup(popupText);
markers.addLayer(marker);
}
console.log("clustered POI layer created!");
console.log("adding clustered POI layer to map...");
map.addLayer(markers);
console.log("clustered POI layer added to map!");
elapsedTime = new Date().getMilliseconds() - elapsedTime;
setTimeout(loadPoisTracking, 30000 - elapsedTime);
}
)
.fail(function(e) {
console.debug("error while fetching POIs:\n" + e.responseText);
});
}
function httpGet(httpURL)
{
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", httpURL, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
//window.alert(httpGet());
var AgenciasITAUGeoJSON = JSON.parse(httpGet("http://10.0.0.200/GalileoITAU/GetPoi.php?DWTPPOI=500"));
var AgenciasITAU = L.geoJson(AgenciasITAUGeoJSON, {
style: function (feature) {
return {color: feature.properties.color};
},
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {icon: IconAgenciasITAU});
},
onEachFeature: function (feature, layer) {
var popupText = '<a target="_blank" href="' + 'https://www.itau.com.br/' + '">' +
'<img src="' + feature.properties.icon + ' "width="48" height="64" align="middle">' +
'</a>' +
'<h4>Nome: ' + feature.properties.name + '</h4>' +
'<h5>Dir: ' + feature.properties.desc + '</h5>' +
'<h5>Tel: ' + feature.properties.tel + '</h5>' +
'<h5>eMail: ' + feature.properties.email + '</h5>' +
'<h5>Date: ' + feature.properties.date + '</h5>' +
'<h5>Lat: ' + feature.properties.lat + '</h5>' +
'<h5>Long: ' + feature.properties.long + '</h5>'
//'<h5>IMGs: ' + feature.properties.images + '</h5>'
layer.bindPopup(popupText);
}
});
var AgenciasITAUAgrupadas = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
//var OcurrenciasITAUAgrupadas = L.markerClusterGroup();
// COMENTAR LA SIGUIENTE FUNCION PARA DESACTIVAR EL SPIDER DE POIS E INTERCAMBIAR LAS DOS FUNCIONES DE ARRIBA
AgenciasITAUAgrupadas.on('clusterclick', function (a) {
a.layer.spiderfy();
});
AgenciasITAUAgrupadas.addLayer(AgenciasITAU);
//var CadastroITAGeoJSON = <?php print json_encode($geojson,JSON_NUMERIC_CHECK); ?>;
var CadastroITAUGeoJSON = JSON.parse(httpGet("http://10.0.0.200/GalileoITAU/GetPoi.php?DWTPPOI=100"));
var CadastroITAU = L.geoJson(CadastroITAUGeoJSON, {
style: function (feature) {
return {color: feature.properties.color};
},
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {icon: IconCadastroBlue});
},
onEachFeature: function (feature, layer) {
var popupText = '<a target="_blank" href="' + 'https://www.itau.com.br/' + '">' +
'<img src="' + feature.properties.icon + ' "width="48" height="64" align="middle">' +
'</a>' +
'<h4>Nome: ' + feature.properties.name + '</h4>' +
'<h5>Dir: ' + feature.properties.desc + '</h5>' +
'<h5>Tel: ' + feature.properties.tel + '</h5>' +
'<h5>eMail: ' + feature.properties.email + '</h5>' +
'<h5>Date: ' + feature.properties.date + '</h5>' +
'<h5>Lat: ' + feature.properties.lat + '</h5>' +
'<h5>Long: ' + feature.properties.long + '</h5>'
//'<h5>IMGs: ' + feature.properties.images + '</h5>'
var IMGs = feature.properties.images.split("|")
for (var i in IMGs)
{
popupText = popupText + '<a target="_blank" href="' + 'http://200.42.109.109/ITAU_IMGs/'+ IMGs[i] + '">' +
'<img src="' + 'http://200.42.109.109/ITAU_IMGs/'+ IMGs[i] + ' "width="128" height="96" align="middle" border="1">'
}
layer.bindPopup(popupText);
}
});
//var OcurrenciaITAGeoJSON = <?php print json_encode($geojsonOcurrencia,JSON_NUMERIC_CHECK); ?>;
var OcurrenciaITAGeoJSON = JSON.parse(httpGet("http://10.0.0.200/GalileoITAU/GetPoi.php?DWTPPOI=115"));
var OcurrenciaITAU = L.geoJson(OcurrenciaITAGeoJSON, {
style: function (feature) {
return {color: feature.properties.color};
},
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {icon: IconOcurrenciaRed});
},
onEachFeature: function (feature, layer) {
var popupText = '<a target="_blank" href="' + 'https://www.itau.com.br/' + '">' +
'<img src="' + feature.properties.icon + ' "width="48" height="64" align="middle">' +
'</a>' +
'<h4>Send By: ' + feature.properties.sendby + '</h4>' +
'<h5>Clase: ' + feature.properties.clase + '</h5>' +
'<h5>Desc.: ' + feature.properties.desc + '</h5>' +
'<h5>Date: ' + feature.properties.date + '</h5>' +
'<h5>Lat: ' + feature.properties.lat + '</h5>' +
'<h5>Long: ' + feature.properties.long + '</h5>'
//'<h5>IMGs: ' + feature.properties.images + '</h5>'
var IMGs = feature.properties.images.split("|")
for (var i in IMGs)
{
popupText = popupText + '<a target="_blank" href="' + 'http://200.42.109.109/ITAU_IMGs/'+ IMGs[i] + '">' +
'<img src="' + 'http://200.42.109.109/ITAU_IMGs/'+ IMGs[i] + ' "width="128" height="96" align="middle" border="1">'
}
layer.bindPopup(popupText);
}
});
var CadastroITAUAgrupadas = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
//var CadastroITAUAgrupadas = L.markerClusterGroup();
// COMENTAR LA SIGUIENTE FUNCION PARA DESACTIVAR EL SPIDER DE POIS E INTERCAMBIAR LAS DOS FUNCIONES DE ARRIBA
CadastroITAUAgrupadas.on('clusterclick', function (a) {
a.layer.spiderfy();
});
CadastroITAUAgrupadas.addLayer(CadastroITAU);
var OcurrenciasITAUAgrupadas = L.markerClusterGroup({ spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false });
//var OcurrenciasITAUAgrupadas = L.markerClusterGroup();
// COMENTAR LA SIGUIENTE FUNCION PARA DESACTIVAR EL SPIDER DE POIS E INTERCAMBIAR LAS DOS FUNCIONES DE ARRIBA
OcurrenciasITAUAgrupadas.on('clusterclick', function (a) {
a.layer.spiderfy();
});
OcurrenciasITAUAgrupadas.addLayer(OcurrenciaITAU);
var baseMaps = {"Cartografico": MapaBase, "Satelital": MapaBing, "Hybrido": MapaBingHybrid};
var overlayMaps = {
"Agencias ITAU (Single)": AgenciasITAU,
"Agencias ITAU (Group)": AgenciasITAUAgrupadas,
//"Cadastro (Single)": CadastroITAU,
"Cadastro All (Group)": CadastroITAUAgrupadas,
//"Ocurrencias (Single)": OcurrenciaITAU,
"Ocorrencias All (Group)": OcurrenciasITAUAgrupadas
};
console.log("LLAMO A LA FUNCION DE TRACKING POIS");
loadPoisTracking();
L.control.fullscreen().addTo(map);
L.control.layers(baseMaps, overlayMaps).addTo(map)
//MINI MAPA -- AQUI SE COLOCA EL CODIGO DEL MINI MAPA
var osm2 = new L.TileLayer(TileSvrURL, {minZoom: 2, maxZoom: 18, attribution: osmAttrib });
var miniMap = new L.Control.MiniMap(osm2, {toggleDisplay: true}).addTo(map);
/*
var AddButton= L.Control.extend({//creating the buttons
options: {
position: 'topright'
},
onAdd: function (map) {
// create the control container with a particular class name
var div = L.DomUtil.create('div','bgroup');
var addButton = L.DomUtil.create('button', 'addStuff',div);
addButton.type="button";
addButton.innerHTML="Filtar POIs";
L.DomEvent.addListener(addButton,"click",function(){
morePoints(map.getCenter().lat,map.getCenter().lng);//make sure it's where you currently are.
});
var allButton = L.DomUtil.create('button', 'allStuff',div);
allButton.type="button";
allButton.innerHTML="ShowAll";
L.DomEvent.addListener(allButton,"click",function(){
redoBox();
});
return div;
}
});
//add them to the map
map.addControl(new AddButton());
*/
// COMBOBOX DE USUARIOS
var legend = L.control({position: 'topright'});
legend.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info legend');
div.innerHTML = ' <?php print $select; ?> ';
div.firstChild.onmousedown = div.firstChild.ondblclick = L.DomEvent.stopPropagation;
return div;
};
legend.addTo(map);
//VERIFICO CUANDO SE PRECIONO SI SE ELIGIO ALGUN VALOR Y LO PROCESO
/*
$('select').change(function(){
var e = document.getElementById("TipoPOI");
var strUser = e.options[e.selectedIndex].value;
alert(strUser); //COMPRUEBO EL ID SELECCIONADO
});
*/
var ADDFechaDesde = L.control({position: 'topright'});
ADDFechaDesde.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info ADDFechaDesde');
div.innerHTML = '<div class="confirmation-box round dark"><label for="first">Fecha de Seleccion: </label><input type="text" name="FechaDesde" id="DatePickerDesde" size="10" value=""/></div>';
div.firstChild.onmousedown = div.firstChild.ondblclick = L.DomEvent.stopPropagation;
return div;
};
ADDFechaDesde.addTo(map);
$(function () {
$("#DatePickerDesde").datepicker({
firstDay: 1,
closeText: 'Cerrar',
currentText: 'Hoy',
monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun',
'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié;', 'Juv', 'Vie', 'Sáb'],
dayNamesMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sá'],
weekHeader: 'Sm',
dateFormat: 'yy-mm-dd',
onSelect: function (date) {
//alert(date) //AQUI EL CODIGO CUANDO SELECCIONE FECHA
},
})
.datepicker("setDate", new Date());
});
var BotonShowTracking = L.control({position: 'topright'});
BotonShowTracking.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info BotonShowTracking');
div.innerHTML = '<input type="submit" id="MostrarTrack" class="button round blue image-right ic-right-arrow" value="Show Tracking">';
div.firstChild.onmousedown = div.firstChild.ondblclick = L.DomEvent.stopPropagation;
return div;
};
BotonShowTracking.addTo(map);
var BotonShowOcorrencia = L.control({position: 'topright'});
BotonShowOcorrencia.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info BotonShowOcorrencia');
div.innerHTML = '<input type="submit" id="BotonShowOcorrencia" class="button round blue image-right ic-right-arrow" value="Ocorrencias (Single)">';
div.firstChild.onmousedown = div.firstChild.ondblclick = L.DomEvent.stopPropagation;
return div;
};
BotonShowOcorrencia.addTo(map);
var BotonShowCadastro = L.control({position: 'topright'});
BotonShowCadastro.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info BotonShowCadastro');
div.innerHTML = '<input type="submit" id="BotonShowCadastro" class="button round blue image-right ic-right-arrow" value="Cadastros (Single)">';
div.firstChild.onmousedown = div.firstChild.ondblclick = L.DomEvent.stopPropagation;
return div;
};
BotonShowCadastro.addTo(map);
$("input").click(function(e){
var idClicked = e.target.id;
if (idClicked == "MostrarTrack"){
//var popup_message = "You typed: " + document.getElementById("DatePickerDesde").value;
//alert(popup_message);
ReturnSQL();
}
});
}
</script>
</body>
</html>