API KEY DE GOOGLE MAPS CENTRALIZADA

This commit is contained in:
2020-05-13 12:00:28 -07:00
parent c70a308020
commit acf231d10c
17 changed files with 177 additions and 17714 deletions

View File

@@ -33,8 +33,6 @@ 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
@@ -46,6 +44,16 @@ Namespace Extensiones
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#

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -158,6 +158,7 @@ Partial Class GPS_GeoReferencias
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)

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -623,11 +623,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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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>