Forum ViSiBLe

Bem Vindo
Se registrares neste fórum, podes fazer parte da nossa comunidade.Prezamos aqui pela participação ACTIVA de cada membro.


Atençao: Nao precisa Confirma a sua conta no hotmail (Basta Registrar e Começar a participar do forum.)

WWW.FORUMVISIBLE.COM

Temos vagas na STAFF !! Clique Aqui!

Ícone Trabalhando com GoogleMaps

Compartilhe
avatar
MrViSiBLe
Administrador
Administrador

Número de Mensagens : 3778
Idade : 24
Localização : Cuiaba
Agradecimentos Agradecimentos : 864
Data de inscrição : 10/12/2008

Ícone Trabalhando com GoogleMaps

Mensagem por MrViSiBLe em 10/6/2010, 01:04

Que tal trabalharmos com GoogleMap ? :B

Ferramentas:

QuoteMS Internet Controls (CTRL + T - Componentes)
2 TextBox - (1 Partida, 2 Chegada)
1 Botão

Duas Referências; (Menu Project> References)
MS Scripting Runtime
MS Internet Controls



No Botão:

QuoteDim HTML1 As String, HTML2 As String
Dim HTML3 As String, HTML4 As String
Dim HTML5 As String, HTML6 As String
Dim HTML7 As String, HTML8 As String
Dim HTML9 As String, HTML10 As String
Dim HTML11 As String, HTML12 As String
Dim HTML13 As String, HTML14 As String
Dim HTML15 As String, HTML16 As String
Dim HTML17 As String, HTML18 As String
Dim HTML19 As String, HTML20 As String
Dim HTML21 As String, HTML22 As String
Dim HTML23 As String, HTML24 As String
Dim HTML25 As String, HTML26 As String
HTML1 = " HTML2 = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">" + vbNewLine
HTML3 = "" + vbNewLine
HTML4 = "" + vbNewLine
HTML5 = "Google Maps" + vbNewLine
HTML6 = "" + vbNewLine
HTML7 = " HTML8 = "type=""text/javascript"">" + vbNewLine
HTML9 = "" + vbNewLine
HTML10 = "var map;" + vbNewLine
HTML11 = "var directions;" + vbNewLine
HTML12 = "var directionsPanel;" + vbNewLine
HTML13 = "function initialize() {" + vbNewLine
HTML14 = "map = new GMap2(document.getElementById(""map_canvas""));" + vbNewLine
HTML15 = "map.addControl(new GSmallMapControl());" + vbNewLine
HTML16 = "map.addControl(new GMapTypeControl());" + vbNewLine
HTML17 = "directionsPanel = document.getElementById(""route"");" + vbNewLine
HTML18 = "directions = new GDirections(map, directionsPanel);" + vbNewLine
HTML19 = "directions.load(""from: " + TextBoxDaqui.Text + " to: " + TextBoxAte.Text + """);}" + vbNewLine
HTML20 = "
" + vbNewLine
HTML21 = "" + vbNewLine
HTML22 = "" + vbNewLine
HTML23 = "
" + vbNewLine
HTML24 = "
" + vbNewLine
HTML25 = "
" + vbNewLine
HTML26 = "" + vbNewLine
HTML26 = ""

Dim fso As New FileSystemObject
If fso.FileExists(App.Path + "\professionalcode.html") Then
fso.DeleteFile (App.Path + "\professionalcode.html")
End If
Dim tx As TextStream
fso.CreateTextFile (App.Path + "\professionalcode.html")
fso.OpenTextFile App.Path + "\professionalcode.html", ForWriting, True
Set tx = fso.OpenTextFile(App.Path + "\professionalcode.html", ForWriting, True)
tx.WriteLine HTML1 + HTML2 + HTML3 + HTML4 + HTML5 + HTML6 + HTML7 + HTML8 + HTML9 + HTML10 + HTML11 + HTML12 + HTML13 + HTML14 + HTML15 + HTML16 + HTML17 + HTML18 + HTML19 + HTML20 + HTML21 + HTML22 + HTML23 + HTML24 + HTML25 + HTML26
tx.Close
WebBrowser1.Navigate (App.Path + "\professionalcode.html")



Uma bela gambiarra funcional [Você precisa estar registrado e conectado para ver esta imagem.]

]Créditos]
yyuri
~ posuit

    Data/hora atual: 9/20/2017, 21:37