API KEY DE GOOGLE MAPS CENTRALIZADA
This commit is contained in:
@@ -29,12 +29,10 @@ Imports System.Web.Http.Controllers
|
|||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports System.Net
|
Imports System.Net
|
||||||
|
|
||||||
Namespace Extensiones
|
Namespace Extensiones
|
||||||
|
|
||||||
#Region "E X T E N S I O N E S"
|
#Region "E X T E N S I O N E S"
|
||||||
Public Module ModExtensiones
|
Public Module ModExtensiones
|
||||||
|
|
||||||
'Public Const DirectorioBaseEmpresas As String = "C:\inetpub\"
|
|
||||||
Public ReadOnly Property DirectorioBaseEmpresas As String
|
Public ReadOnly Property DirectorioBaseEmpresas As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas")) Then
|
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas")) Then
|
||||||
@@ -44,13 +42,23 @@ Namespace Extensiones
|
|||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly DirectorioEmpresas As String = String.Format("{0}Empresas\", DirectorioBaseEmpresas)
|
Public ReadOnly DirectorioEmpresas As String = String.Format("{0}Empresas\", DirectorioBaseEmpresas)
|
||||||
|
|
||||||
|
Public ReadOnly Property GOOGLE_MAPS_API_KEY As String
|
||||||
|
Get
|
||||||
|
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("GOOGLE_MAPS_API_KEY")) Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return System.Configuration.ConfigurationManager.AppSettings("GOOGLE_MAPS_API_KEY").ToString()
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Const IMEI As String = "IMEISISTEMAGERENCIAL"
|
Public Const IMEI As String = "IMEISISTEMAGERENCIAL"
|
||||||
Public Const MinFecha As Date = #1/1/1900#
|
Public Const MinFecha As Date = #1/1/1900#
|
||||||
Public Const MaxFecha As Date = #1/1/9999#
|
Public Const MaxFecha As Date = #1/1/9999#
|
||||||
Public Const GlobalRowVersion As Integer = 555555
|
Public Const GlobalRowVersion As Integer = 555555
|
||||||
|
|
||||||
#Region "PropiedadesEncriptación"
|
#Region "PropiedadesEncriptación"
|
||||||
Private _Key() As Byte = {}
|
Private _Key() As Byte = {}
|
||||||
Private ReadOnly _IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
|
Private ReadOnly _IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
|
||||||
@@ -90,10 +98,10 @@ Namespace Extensiones
|
|||||||
Else
|
Else
|
||||||
Return Valor
|
Return Valor
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region "Log"
|
#Region "Log"
|
||||||
|
|
||||||
<Runtime.CompilerServices.Extension()>
|
<Runtime.CompilerServices.Extension()>
|
||||||
Public Sub GuardaLog(Str As String)
|
Public Sub GuardaLog(Str As String)
|
||||||
Dim ArchivoW As StreamWriter
|
Dim ArchivoW As StreamWriter
|
||||||
|
|||||||
@@ -513,9 +513,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -266,8 +266,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -632,11 +632,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%--<script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -769,12 +769,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=geometry&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=drawing&libraries=geometry&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%-- <script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=drawing&libraries=geometry&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ Partial Class GPS_GeoReferencias
|
|||||||
Finally
|
Finally
|
||||||
|
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
ObjGPS.RollBack()
|
ObjGPS.RollBack()
|
||||||
|
Alert("Ocurrió un error al agregar la georeferencia", TipoMensaje.MsgError)
|
||||||
Else
|
Else
|
||||||
ObjGPS.Commit()
|
ObjGPS.Commit()
|
||||||
Alert("Se agregó correctamente la Ruta", TipoMensaje.MsgInformacion)
|
Alert("Se agregó correctamente la Ruta", TipoMensaje.MsgInformacion)
|
||||||
|
|||||||
@@ -754,11 +754,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places&callback=initMap">
|
|
||||||
</script>
|
|
||||||
<%-- <script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places&callback=initMap">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -3130,9 +3130,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||||
<script src="Rastreo/JS/GeoRutas.js"></script>
|
<script src="Rastreo/JS/GeoRutas.js"></script>
|
||||||
|
|||||||
@@ -1495,7 +1495,7 @@ Partial Class GPS_Rastreo
|
|||||||
End If
|
End If
|
||||||
'RegistraScript("CreaRuta();")
|
'RegistraScript("CreaRuta();")
|
||||||
ElseIf HdnTipo.Value = "Geocerca" Then
|
ElseIf HdnTipo.Value = "Geocerca" Then
|
||||||
GeoRefString = $"POLYGON(({GeoCerca.Value}))"
|
GeoRefString = $"POLYGON(({GeoCerca.Value} {CommandArg.Value}))"
|
||||||
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Geocerca", True, TxtFechaIG.Text.ToDate, TxtFechaFG.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, MinFecha, MaxFecha, TxtColor.Text, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Geocerca", True, TxtFechaIG.Text.ToDate, TxtFechaFG.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, MinFecha, MaxFecha, TxtColor.Text, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||||
For Each Dr As GridViewRow In GvEquiposDetalle.Rows
|
For Each Dr As GridViewRow In GvEquiposDetalle.Rows
|
||||||
If Dr.RowType = DataControlRowType.DataRow Then
|
If Dr.RowType = DataControlRowType.DataRow Then
|
||||||
|
|||||||
@@ -234,7 +234,7 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places"></script>
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
<script src="../Metronic/assets/global/plugins/datatables2/datatables.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/datatables2/datatables.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/datatables2/extensions/Scroller/js/dataTables.scroller.js"></script>
|
<script src="../Metronic/assets/global/plugins/datatables2/extensions/Scroller/js/dataTables.scroller.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/datatables2/extensions/KeyTable/js/dataTables.keyTable.js"></script>
|
<script src="../Metronic/assets/global/plugins/datatables2/extensions/KeyTable/js/dataTables.keyTable.js"></script>
|
||||||
|
|||||||
@@ -3,47 +3,47 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
html, body {
|
html, body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 51px);
|
height: calc(100% - 51px);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#map {
|
#map {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.pac-container.pac-logo {
|
.pac-container.pac-logo {
|
||||||
z-index: 100000;
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#showdiv1 {
|
#showdiv1 {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ShowDiv3:hover {
|
#ShowDiv3:hover {
|
||||||
line-height: 34px !important;
|
line-height: 34px !important;
|
||||||
-webkit-transition: line-height ease 1s;
|
-webkit-transition: line-height ease 1s;
|
||||||
-moz-transition: line-height ease 1s;
|
-moz-transition: line-height ease 1s;
|
||||||
-o-transition: line-height ease 1s;
|
-o-transition: line-height ease 1s;
|
||||||
transition: line-height ease 1s;
|
transition: line-height ease 1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v-center {
|
.v-center {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
||||||
@@ -332,10 +332,10 @@
|
|||||||
<script src="../Metronic/assets/layouts/layout3/scripts/jquery.datetimepicker.full.js"></script>
|
<script src="../Metronic/assets/layouts/layout3/scripts/jquery.datetimepicker.full.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var map;
|
var map;
|
||||||
function initMap() {
|
function initMap() {
|
||||||
map = new google.maps.Map(document.getElementById('map'), {
|
map = new google.maps.Map(document.getElementById('map'), {
|
||||||
center: { lat: 29.0730, lng: -110.9559 },
|
center: { lat: 29.0730, lng: -110.9559 },
|
||||||
zoom: 7
|
zoom: 7
|
||||||
});
|
});
|
||||||
|
|
||||||
var ShowDiv1 = document.createElement('div');
|
var ShowDiv1 = document.createElement('div');
|
||||||
@@ -344,11 +344,11 @@
|
|||||||
ShowDiv1.id = "showdiv1"
|
ShowDiv1.id = "showdiv1"
|
||||||
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(ShowDiv1);
|
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(ShowDiv1);
|
||||||
|
|
||||||
google.maps.Polygon.prototype.my_getBounds = function () {
|
google.maps.Polygon.prototype.my_getBounds = function () {
|
||||||
var bounds = new google.maps.LatLngBounds()
|
var bounds = new google.maps.LatLngBounds()
|
||||||
this.getPath().forEach(function (element, index) { bounds.extend(element) })
|
this.getPath().forEach(function (element, index) { bounds.extend(element) })
|
||||||
return bounds
|
return bounds
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
var polylines = [];
|
var polylines = [];
|
||||||
@@ -357,172 +357,172 @@
|
|||||||
var markers = [];
|
var markers = [];
|
||||||
var lastOpenedInfoWindow;
|
var lastOpenedInfoWindow;
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initMap();
|
initMap();
|
||||||
$("#SideNav").removeClass("nav-is-visible");
|
$("#SideNav").removeClass("nav-is-visible");
|
||||||
$("#dvConsulta").modal({ backdrop: 'static', keyboard: false });
|
$("#dvConsulta").modal({ backdrop: 'static', keyboard: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
function creaPoligono(coords, color, Geocerca) {
|
function creaPoligono(coords, color, Geocerca) {
|
||||||
var polygon = new google.maps.Polygon({
|
var polygon = new google.maps.Polygon({
|
||||||
paths: coords,
|
paths: coords,
|
||||||
strokeColor: color,
|
strokeColor: color,
|
||||||
strokeOpacity: 0.8,
|
strokeOpacity: 0.8,
|
||||||
strokeWeight: 2,
|
strokeWeight: 2,
|
||||||
fillColor: color,
|
fillColor: color,
|
||||||
fillOpacity: 0.35
|
fillOpacity: 0.35
|
||||||
});
|
});
|
||||||
polygon.setMap(map);
|
polygon.setMap(map);
|
||||||
polygons.push(polygon);
|
polygons.push(polygon);
|
||||||
CreaMarcadorPoligono(coords, Geocerca)
|
CreaMarcadorPoligono(coords, Geocerca)
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreaMarcadorPoligono(coords, GeoCerca) {
|
function CreaMarcadorPoligono(coords, GeoCerca) {
|
||||||
var bounds = new google.maps.LatLngBounds();
|
var bounds = new google.maps.LatLngBounds();
|
||||||
for (i = 0; i < coords.length; i++) {
|
for (i = 0; i < coords.length; i++) {
|
||||||
bounds.extend(coords[i]);
|
bounds.extend(coords[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var marker = new google.maps.Marker({
|
var marker = new google.maps.Marker({
|
||||||
position: bounds.getCenter(),
|
position: bounds.getCenter(),
|
||||||
title: GeoCerca,
|
title: GeoCerca,
|
||||||
map: map
|
map: map
|
||||||
});
|
});
|
||||||
|
|
||||||
var infowindow = new google.maps.InfoWindow({
|
var infowindow = new google.maps.InfoWindow({
|
||||||
content: '<h4><b>' + GeoCerca + '</b></h4>'
|
content: '<h4><b>' + GeoCerca + '</b></h4>'
|
||||||
});
|
});
|
||||||
|
|
||||||
marker.addListener('click', function () {
|
marker.addListener('click', function () {
|
||||||
closeLastOpenedInfoWindow();
|
closeLastOpenedInfoWindow();
|
||||||
infowindow.open(map, marker);
|
infowindow.open(map, marker);
|
||||||
lastOpenedInfoWindow = infowindow;
|
lastOpenedInfoWindow = infowindow;
|
||||||
});
|
});
|
||||||
|
|
||||||
markers.push(marker);
|
markers.push(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CenterPoligono(coords) {
|
function CenterPoligono(coords) {
|
||||||
var bounds = new google.maps.LatLngBounds();
|
var bounds = new google.maps.LatLngBounds();
|
||||||
for (i = 0; i < coords.length; i++) {
|
for (i = 0; i < coords.length; i++) {
|
||||||
bounds.extend(coords[i]);
|
bounds.extend(coords[i]);
|
||||||
}
|
}
|
||||||
map.fitBounds(bounds)
|
map.fitBounds(bounds)
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeLastOpenedInfoWindow() {
|
function closeLastOpenedInfoWindow() {
|
||||||
if (lastOpenedInfoWindow) {
|
if (lastOpenedInfoWindow) {
|
||||||
lastOpenedInfoWindow.close();
|
lastOpenedInfoWindow.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function FitBounds() {
|
function FitBounds() {
|
||||||
var bounds = new google.maps.LatLngBounds();
|
var bounds = new google.maps.LatLngBounds();
|
||||||
for (var i = 0; i < polygons.length; i++) {
|
for (var i = 0; i < polygons.length; i++) {
|
||||||
var paths = polygons[i].getPaths();
|
var paths = polygons[i].getPaths();
|
||||||
paths.forEach(function (path) {
|
paths.forEach(function (path) {
|
||||||
var ar = path.getArray();
|
var ar = path.getArray();
|
||||||
for (var i = 0, l = ar.length; i < l; i++) {
|
for (var i = 0, l = ar.length; i < l; i++) {
|
||||||
bounds.extend(ar[i]);
|
bounds.extend(ar[i]);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
for (var i = 0; i < polybounds.length; i++) {
|
for (var i = 0; i < polybounds.length; i++) {
|
||||||
bounds.extend(polybounds[i]);
|
bounds.extend(polybounds[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < markers.length; i++) {
|
for (var i = 0; i < markers.length; i++) {
|
||||||
if (markers[i].getVisible()) {
|
if (markers[i].getVisible()) {
|
||||||
bounds.extend(markers[i].getPosition());
|
bounds.extend(markers[i].getPosition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
map.fitBounds(bounds)
|
map.fitBounds(bounds)
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreaMarcador(coords, nomEquipo, ContentString, imagen) {
|
function CreaMarcador(coords, nomEquipo, ContentString, imagen) {
|
||||||
if (typeof imagen === 'undefined') { imagen = image; }
|
if (typeof imagen === 'undefined') { imagen = image; }
|
||||||
var marker = new google.maps.Marker({
|
var marker = new google.maps.Marker({
|
||||||
position: coords,
|
position: coords,
|
||||||
title: nomEquipo,
|
title: nomEquipo,
|
||||||
map: map,
|
map: map,
|
||||||
icon: imagen
|
icon: imagen
|
||||||
});
|
});
|
||||||
|
|
||||||
var infowindow = new google.maps.InfoWindow({
|
var infowindow = new google.maps.InfoWindow({
|
||||||
content: ContentString
|
content: ContentString
|
||||||
});
|
});
|
||||||
marker.addListener('click', function () {
|
marker.addListener('click', function () {
|
||||||
closeLastOpenedInfoWindow();
|
closeLastOpenedInfoWindow();
|
||||||
infowindow.open(map, marker);
|
infowindow.open(map, marker);
|
||||||
lastOpenedInfoWindow = infowindow;
|
lastOpenedInfoWindow = infowindow;
|
||||||
});
|
});
|
||||||
markers.push(marker);
|
markers.push(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
function creaPolyline(coords, color, GeoCerca) {
|
function creaPolyline(coords, color, GeoCerca) {
|
||||||
var polyline = new google.maps.Polyline({
|
var polyline = new google.maps.Polyline({
|
||||||
path: coords,
|
path: coords,
|
||||||
strokeColor: color,
|
strokeColor: color,
|
||||||
strokeOpacity: 0.8,
|
strokeOpacity: 0.8,
|
||||||
strokeWeight: 2,
|
strokeWeight: 2,
|
||||||
fillOpacity: 0.35
|
fillOpacity: 0.35
|
||||||
});
|
});
|
||||||
polyline.setMap(map);
|
polyline.setMap(map);
|
||||||
polylines.push(polyline);
|
polylines.push(polyline);
|
||||||
polybounds.push(coords[0]);
|
polybounds.push(coords[0]);
|
||||||
polybounds.push(coords[coords.length - 1]);
|
polybounds.push(coords[coords.length - 1]);
|
||||||
CreaMarcadorPoligono(coords, GeoCerca);
|
CreaMarcadorPoligono(coords, GeoCerca);
|
||||||
}
|
}
|
||||||
|
|
||||||
function NuevaConsulta() {
|
function NuevaConsulta() {
|
||||||
for (var i = 0; i < polygons.length; i++) {
|
for (var i = 0; i < polygons.length; i++) {
|
||||||
polygons[i].setMap(null);
|
polygons[i].setMap(null);
|
||||||
}
|
}
|
||||||
polygons = [];
|
polygons = [];
|
||||||
for (var i = 0; i < polylines.length; i++) {
|
for (var i = 0; i < polylines.length; i++) {
|
||||||
polylines[i].setMap(null);
|
polylines[i].setMap(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < markers.length; i++) {
|
for (var i = 0; i < markers.length; i++) {
|
||||||
markers[i].setMap(null);
|
markers[i].setMap(null);
|
||||||
}
|
}
|
||||||
polylines = [];
|
polylines = [];
|
||||||
polybounds = [];
|
polybounds = [];
|
||||||
markers = [];
|
markers = [];
|
||||||
$("#dvConsulta").modal({ backdrop: 'static', keyboard: false })
|
$("#dvConsulta").modal({ backdrop: 'static', keyboard: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
function fitBoundsToVisibleMarkers() {
|
function fitBoundsToVisibleMarkers() {
|
||||||
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
var bounds = new google.maps.LatLngBounds();
|
||||||
|
|
||||||
for (var i = 0; i < polygons.length; i++) {
|
for (var i = 0; i < polygons.length; i++) {
|
||||||
bounds.extend(polygons[i].my_getBounds().getCenter())
|
bounds.extend(polygons[i].my_getBounds().getCenter())
|
||||||
|
|
||||||
}
|
}
|
||||||
for (var i = 0; i < markers.length; i++) {
|
for (var i = 0; i < markers.length; i++) {
|
||||||
if (markers[i].getVisible()) {
|
if (markers[i].getVisible()) {
|
||||||
bounds.extend(markers[i].getPosition());
|
bounds.extend(markers[i].getPosition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
map.fitBounds(bounds);
|
map.fitBounds(bounds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CargaPickers() {
|
function CargaPickers() {
|
||||||
$.datetimepicker.setLocale('es');
|
$.datetimepicker.setLocale('es');
|
||||||
$('input.ADDateTimePicker').each(function () {
|
$('input.ADDateTimePicker').each(function () {
|
||||||
var TThis = $(this);
|
var TThis = $(this);
|
||||||
TThis.datetimepicker({
|
TThis.datetimepicker({
|
||||||
dayOfWeekStart: 1,
|
dayOfWeekStart: 1,
|
||||||
lang: 'es',
|
lang: 'es',
|
||||||
format: 'd/m/Y H:i',
|
format: 'd/m/Y H:i',
|
||||||
formatDate: 'd/m/Y H:i',
|
formatDate: 'd/m/Y H:i',
|
||||||
step: 30
|
step: 30
|
||||||
});
|
});
|
||||||
var Div = TThis.parent()
|
var Div = TThis.parent()
|
||||||
var boton = document.createElement('span');
|
var boton = document.createElement('span');
|
||||||
@@ -531,42 +531,42 @@
|
|||||||
var subboton = document.createElement('a')
|
var subboton = document.createElement('a')
|
||||||
subboton.className = "btn default"
|
subboton.className = "btn default"
|
||||||
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
||||||
subboton.addEventListener('click', function () {
|
subboton.addEventListener('click', function () {
|
||||||
TThis.datetimepicker('show')
|
TThis.datetimepicker('show')
|
||||||
});
|
});
|
||||||
boton.appendChild(subboton)
|
boton.appendChild(subboton)
|
||||||
|
|
||||||
Div[0].appendChild(boton)
|
Div[0].appendChild(boton)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function DisplayGV() {
|
function DisplayGV() {
|
||||||
if ($("#C_chkUp").prop('checked')) {
|
if ($("#C_chkUp").prop('checked')) {
|
||||||
($("#dvDispositivos").css('display', ''))
|
($("#dvDispositivos").css('display', ''))
|
||||||
} else {
|
} else {
|
||||||
($("#dvDispositivos").css('display', 'none'))
|
($("#dvDispositivos").css('display', 'none'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function CargaModal() {
|
function CargaModal() {
|
||||||
$('#C_TxtHoraI').datetimepicker({
|
$('#C_TxtHoraI').datetimepicker({
|
||||||
datepicker: false,
|
datepicker: false,
|
||||||
lang: 'es',
|
lang: 'es',
|
||||||
format: 'H:i',
|
format: 'H:i',
|
||||||
formatDate: 'H:i',
|
formatDate: 'H:i',
|
||||||
step: 30
|
step: 30
|
||||||
});
|
});
|
||||||
$('#C_TxtHoraF').datetimepicker({
|
$('#C_TxtHoraF').datetimepicker({
|
||||||
datepicker: false,
|
datepicker: false,
|
||||||
lang: 'es',
|
lang: 'es',
|
||||||
format: 'H:i',
|
format: 'H:i',
|
||||||
formatDate: 'H:i',
|
formatDate: 'H:i',
|
||||||
step: 30
|
step: 30
|
||||||
});
|
});
|
||||||
$('#dvEditar').modal()
|
$('#dvEditar').modal()
|
||||||
}
|
}
|
||||||
|
|
||||||
function ShowDiv(controlDiv, map) {
|
function ShowDiv(controlDiv, map) {
|
||||||
@@ -599,35 +599,30 @@
|
|||||||
controlUI.appendChild(controlText);
|
controlUI.appendChild(controlText);
|
||||||
|
|
||||||
// Setup the click event listeners: simply set the map to Chicago.
|
// Setup the click event listeners: simply set the map to Chicago.
|
||||||
controlUI.addEventListener('click', function () {
|
controlUI.addEventListener('click', function () {
|
||||||
FNShowDiv();
|
FNShowDiv();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var open = false;
|
var open = false;
|
||||||
function FNShowDiv() {
|
function FNShowDiv() {
|
||||||
if (open === false) {
|
if (open === false) {
|
||||||
$("#h").modal()
|
$("#h").modal()
|
||||||
$("#ShowDiv3").css("line-height", "34px")
|
$("#ShowDiv3").css("line-height", "34px")
|
||||||
open = true
|
open = true
|
||||||
$("#ShowDiv3").html('<i class="fa fa-angle-down" aria-hidden="true"></i>')
|
$("#ShowDiv3").html('<i class="fa fa-angle-down" aria-hidden="true"></i>')
|
||||||
} else {
|
} else {
|
||||||
$("#h").modal('hide')
|
$("#h").modal('hide')
|
||||||
$("#ShowDiv3").css("line-height", "20px")
|
$("#ShowDiv3").css("line-height", "20px")
|
||||||
open = false
|
open = false
|
||||||
$("#ShowDiv3").html('<i class="fa fa-angle-up" aria-hidden="true"></i>')
|
$("#ShowDiv3").html('<i class="fa fa-angle-up" aria-hidden="true"></i>')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%--<script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -356,11 +356,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places&callback=initMap">
|
|
||||||
</script>
|
|
||||||
<%-- <script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places&callback=initMap">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -731,8 +731,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -725,8 +725,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -1333,8 +1333,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
17504
GPS/data.txt
17504
GPS/data.txt
File diff suppressed because it is too large
Load Diff
@@ -340,11 +340,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%--<script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user