Torna al Thread
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--include virtual = "/pr/include/inc_Check_Session.asp"-->
<!--#include virtual = "/pr/include/inc_Variabili.asp"-->
<!--#include virtual = "/pr/include/inc_Funzioni.asp"-->
<!--#include virtual = "/pr/include/inc_Database.asp"-->
<%
'Targa = request.Querystring("Targa")
Dim rsLog, strSQLLog
'strSQLLog = request.QueryString("strSQL")
Set rsLog = Server.CreateObject("ADODB.Recordset")
strSQLLog = "SELECT * FROM [log] WHERE (ID IN (SELECT MAX(l.ID) FROM log l INNER JOIN Mezzi m ON l.codacc = m.codacc WHERE m.CodiceCliente = " & Session("Username") & " AND len(l.latitudine) > 5 AND len(l.longitudine) > 5 GROUP BY m.codacc))ORDER BY Targa"
rsLog.Open strSQLLog, Conn, 3, 3
Latitudine = left(replace(ConvertiGradi_Mapp(rsLog("Latitudine")), ",", "."),9)
Longitudine = left(replace(ConvertiGradi_Mapp(rsLog("Longitudine")), ",", "."),10)
Targa = rsLog("Targa")
TestoFumetto = "<font face='Verdana, Arial, Helvetica, sans-serif' size='2'>" & "Targa: " & Targa & "</font>"
%>
<html xmlns="http://www.w3.org/1999/xhtml" lang="IT-it">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta meta http-equiv ="refresh" http-equiv = "refresh" content ="3000">
<title>Google Maps API - openInfoWindowHtml on load maps</title>
<style type="text/css">
body, a{
font-family:Georgia,"Nimbus Roman No9 L",serif;
color:#428181;
}
#content{
width:90%px;
margin:20px auto;
}
#map{
width:800px;
height:800px;
margin:auto;
border: 1px solid #828181;
border-left:1px solid #ccc;
border-top:1px solid #ccc;
}
#mappa{
width:500px;
height:auto;
margin:20px auto;
}
h1{
font-size:20px;
text-align:center;
}
.center{
text-align:center;
}
</style>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAeAgzzweEz9PyOg0NoAKQ_RRr09L-GZptZs_iIO3LQS78N3lqfhSLZu6QRSuTeOs326LjBsl3rigp_A" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var map = null;
var geocoder = null;
var icona = null;
function load() {
window.resizeTo(800, 600);
window.focus();
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
geocoder = new GClientGeocoder();
icona = new GIcon();
icona.image = "ico/veicolo.gif";
icona.iconSize = new GSize(45, 54);
icona.iconAnchor = new GPoint(12, 34);
icona.infoWindowAnchor = new GPoint(21, 1);
<%
do while not rsLog.eof
Latitudine = left(replace(ConvertiGradi_Mapp(rsLog("Latitudine")), ",", "."),9)
Longitudine = left(replace(ConvertiGradi_Mapp(rsLog("Longitudine")), ",", "."),10)
Targa = rsLog("Targa")
Data = right(rsLog("Data_Sys"),2) & "/" & mid(rsLog("Data_Sys"),3,2) & "/" & left(rsLog("Data_Sys"),2)
Ora = left(rsLog("Ora_Sys"),2) & ":" & mid(rsLog("Ora_Sys"),3,2) & ":" & right(rsLog("Ora_Sys"),2)
TestoFumetto = Targa
%>
geocoder.getLatLng('<% = Latitudine %>, <% = Longitudine %>', function(point){
var marker = new GMarker(point, icona);
map.addOverlay(marker);
//Qui faccio apparire la nuvola!
marker.openInfoWindow('<% = TestoFumetto %>');
map.setCenter(point, 6);
});
map.setUIToDefault();
<%
rsLog.movenext
loop
%>
}
}
// window.onload = initialize;
//]]>
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function resizeMe(){
window.resizeTo(800, 600);
window.focus();
}
</script>
</head>
<body onload="load()" onunload="GUnload()" leftmargin="0" topmargin="0">
<div id="map" style="width: 790px; height: 600px"></div>
</body>
</html>
<%
rsLog.close
set rsLog = nothing
%>