IMPRIMIR MAPA DO GOOGLE ?

PASCOAL 25/06/2011 10:20:54
#377725
Carrego um mapa com a rota do google e quero imprimir como faço ?
Uso o WebBrowser.

Obrigado
PASCOAL 25/06/2011 10:33:21
#377727
Eu só quero imprimir a rota,por enquanto é para teste.

Obrigado
PASCOAL 26/06/2011 08:22:18
#377758
NInguem??
JWCELYO 26/06/2011 11:02:58
#377761
Resposta escolhida

Citação:

:
NInguem??



Bom dia Pascoal,

você poderia posta seu código que atualmente carrega o mapa do Google?
PASCOAL 26/06/2011 11:20:10
#377762
ai esta :

Dim HTML1 As String
Dim HTML2 As String
Dim HTML3 As String
Dim HTML4 As String
Dim HTML5 As String
Dim HTML6 As String
Dim HTML7 As String
Dim HTML8 As String
Dim HTML9 As String
Dim HTML10 As String
Dim HTML11 As String
Dim HTML12 As String
Dim HTML13 As String
Dim HTML14 As String
Dim HTML15 As String
Dim HTML16 As String
Dim HTML17 As String
Dim HTML18 As String
Dim HTML19 As String
Dim HTML20 As String
Dim HTML21 As String
Dim HTML22 As String
Dim HTML23 As String
Dim HTML24 As String
Dim HTML25 As String
Dim HTML26 As String

TextBoxAte.Text = MyCep_Destino
TextBoxDaqui.Text = MyCep_Origen
HTML1 = [Ô]<!DOCTYPE html PUBLIC [Ô][Ô]-//W3C//DTD XHTML 1.0 Strict//EN[Ô][Ô][Ô] + vbNewLine
HTML2 = [Ô]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[Ô][Ô]>[Ô] + vbNewLine
HTML3 = [Ô]<html xmlns=[Ô][Ô]http://www.w3.org/1999/xhtml[Ô][Ô] xmlns:v=[Ô][Ô]urn:schemas-microsoft-com:vml[Ô][Ô]>[Ô] + vbNewLine
HTML4 = [Ô]<head>[Ô] + vbNewLine
HTML5 = [Ô]<title>Google Maps</title>[Ô] + vbNewLine
HTML6 = [Ô]<meta http-equiv=[Ô][Ô]content-type[Ô][Ô] content=[Ô][Ô]text/html; charset=UTF-8[Ô][Ô]/>[Ô] + vbNewLine
HTML7 = [Ô]<script src=[Ô][Ô]http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAAqEiwOrYZ0Lx-d0jtb46NVBSFvCKpyhD1OJRHiGgu5YNzbovqLxSMljIMZwxUTo1W2PGwkDpSMZ1BSw[Ô][Ô][Ô] + vbNewLine
HTML8 = [Ô]type=[Ô][Ô]text/javascript[Ô][Ô]></script>[Ô] + vbNewLine
HTML9 = [Ô]<script type=[Ô][Ô]text/javascript[Ô][Ô]>[Ô] + 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 = [Ô]</script>[Ô] + vbNewLine
HTML21 = [Ô]</head>[Ô] + vbNewLine
HTML22 = [Ô]<body onload=[Ô][Ô]initialize()[Ô][Ô]>[Ô] + vbNewLine
HTML23 = [Ô]<div id=[Ô][Ô]map_canvas[Ô][Ô] style=[Ô][Ô]width: 70%; height: 1000px; float:left; border: 1px solid black;[Ô][Ô]></div>[Ô] + vbNewLine
HTML24 = [Ô]<div id=[Ô][Ô]route[Ô][Ô] style=[Ô][Ô]width: 25%; height:480px; float:left; border; 0px solid black;[Ô][Ô]></div>[Ô] + vbNewLine
HTML25 = [Ô]<br/>[Ô] + vbNewLine
HTML26 = [Ô]</body>[Ô] + vbNewLine
HTML26 = [Ô]</html>[Ô]

Dim fso As New FileSystemObject
If fso.FileExists(Caminho + [Ô]Telas_FS\gmap.html[Ô]) Then
fso.DeleteFile (Caminho + [Ô]Telas_FS\gmap.html[Ô])
End If
Dim tx As TextStream
fso.CreateTextFile (Caminho + [Ô]Telas_FS\gmap.html[Ô])
fso.OpenTextFile Caminho + [Ô]Telas_FS\gmap.html[Ô], ForWriting, True
Set tx = fso.OpenTextFile(Caminho + [Ô]Telas_FS\gmap.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 (Caminho + [Ô]Telas_FS\gmap.html[Ô])
ALFTERRA 26/06/2011 19:28:44
#377777
PASCOAL, copiei o código e fiz algumas referencias e coloquei o caminho como: APP.PATH + [Ô]\Telas_FS\gmap.html[Ô] E dois ceps,
de onde e pra onde, abriu o roteiro certinho como se eu fosse de carro, mais o mapa em si, só abriu u lugar do GOOGLE mais sem o mapa, o q pode ser?

ALFTERRA
PASCOAL 26/06/2011 19:39:59
#377778
COLOQUE ISSO NO DIRFETORIO PARA ELE CHAMAR
MAS TEM COMO IMPRIMIR?
PASCOAL 26/06/2011 21:00:16
#377786
Não imprimi nao só sai a rota que aparece do lado isso eu já tinha testado por isso coloquei aqui no forum.

O que pode ser?
JWCELYO 26/06/2011 21:34:37
#377789
WebBrowser1.Navigate ([Ô]javascript:window.print();[Ô]) 
Página 1 de 2 [14 registro(s)]
Tópico encerrado , respostas não são mais permitidas