Torna al Thread
Me.ToolStripStatusLabel1.Text = "Caricamento in corso ..."
Application.DoEvents()
Me.btnLOAD.Enabled = False
Dim txtLO As String = txtLON.Text
Dim txtLA As String = txtLAT.Text
txtLO = txtLO.Replace("°", "")
txtLA = txtLA.Replace("°", "")
txtLO = txtLO.Replace("'", "")
txtLA = txtLA.Replace("'", "")
txtLO = txtLO.Replace("""", "")
txtLA = txtLA.Replace("""", "")
Dim txtN() As String = txtLO.Split(" ")
Dim txtE() As String = txtLA.Split(" ")
Dim dec_lat As String = txtN(0) + txtN(1) / 60 + txtN(2) / 3600
Dim dec_lon As String = txtE(0) + txtE(1) / 60 + txtE(2) / 3600
Me.Label6.Text = dec_lat
Me.Label7.Text = dec_lon
Dim target As New Bitmap(Application.StartupPath & "\html\target3.png")
Me.PictureBox1.Image = target
Me.WebBrowser1.DocumentText = _
"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN " & "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""> " & vbCrLf & _
"<html xmlns=""http://www.w3.org/1999/xhtml"">" & vbCrLf & _
"<head>" & vbCrLf & _
"<title></title>" & vbCrLf & _
"<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""/>" & vbCrLf & _
"<script type=""text/javascript"" src=""http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2""></script>" & vbCrLf & _
"<script type=""text/javascript"">" & vbCrLf & _
"var map = null;" & vbCrLf & _
"var pinid = 0;" & vbCrLf & _
"var icon = ""<p><img src=" & Application.StartupPath & "\html\target3.png" & " width=40 height=40 /></p>"";" & vbCrLf & _
"var infobox = ""<div style='width:300px;' class=style1><p>qui posso inserire un testo</p></div>"";" & vbCrLf & _
"function GetMap(){" & vbCrLf & _
"map = new VEMap('myMap');" & vbCrLf & _
"map.LoadMap(new VELatLong(" & dec_lat.Replace(",", ".") & "," & dec_lon.Replace(",", ".") & "), 15 ,'h' ,false);} " & vbCrLf & _
"function AddPushpin(){" & vbCrLf & _
"var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());" & vbCrLf & _
"shape.SetCustomIcon(icon);" & vbCrLf & _
"map.ClearInfoBoxStyles();" & vbCrLf & _
"shape.SetTitle(""<h2>" & Me.txtCELL.Text & "</h2>"");" & vbCrLf & _
"shape.SetDescription(infobox);" & vbCrLf & _
"map.AddShape(shape);" & vbCrLf & _
"pinid++;}" & vbCrLf & _
"</script>" & vbCrLf & _
"<style type=""text/css"">" & vbCrLf & _
".style1 { font-size: small; font-family: Arial, Helvetica, sans-serif;}" & vbCrLf & _
"</style>" & vbCrLf & _
"</head>" & vbCrLf & _
"<body onload=""GetMap();AddPushpin();"">" & vbCrLf & _
"<div id='myMap' style=""position:relative; width:100%; height:700px;""></div>" & vbCrLf & _
"</body>" & vbCrLf & _
"</html>"