Pessoal é possível ajustar o mapa (google maps) ao tamanho que eu especifiquei. SIZE 285,170.
ex:
@ 418,08 ACTIVEX oActive PROGID "Shell.Explorer" OF oWnd SIZE 285,170
oActive:Do( "Navigate", CurDrive() + ":\" + CurDir() + "\temp.html" )
Falo isso, porque só tenho este espaço na tela, e o mapa é apresentado, mais fica deslocado... Tenho então que usar o mouse para ir até a posição que eu quero.
Google Maps - Ajustar Mapa é possível?
El problema está en gmap.html
En este archivo se define el espacio del mapa de forma fija
Tienes dos posibilidades:
1.- Cambiar esos valores para que se ajuste a tu ventana
2.- Cambiar gmap.html, para que él sólo ajuste el mapa al tamaño de la ventana
Para que el mapa se redimensione al 100% de la ventana hay que cambiar lo siguiente en el archivo gmap.html
1.- Dentro de la estructura <stule type="text/css"> incluir lo siguiente:
2.- Quitar de la definición de la división <div> el tamaño ya que lo acabamos de definir
En este archivo se define el espacio del mapa de forma fija
Code: Select all
<div id="map_canvas" style="width: 597px; height: 376px"></div>
1.- Cambiar esos valores para que se ajuste a tu ventana
2.- Cambiar gmap.html, para que él sólo ajuste el mapa al tamaño de la ventana
Para que el mapa se redimensione al 100% de la ventana hay que cambiar lo siguiente en el archivo gmap.html
1.- Dentro de la estructura <stule type="text/css"> incluir lo siguiente:
Code: Select all
<style type="text/css">
@import url("http://www.google.com/uds/css/gsearch.css");
@import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
#map_canvas {
position:absolute;
margin-top: 0%;
margin-right: 0%;
margin-bottom: 0%;
margin-left: 0%;
left:0%;
right:0%
top:0%;
Bottom:0%;
padding:0;
width:100%;
height:100%;
}
</style>
Code: Select all
<div id="map_canvas"></div>
Un saludo
Fernando González Diez
ALSIS GHE Sistemas Informáticos
Fernando González Diez
ALSIS GHE Sistemas Informáticos
Fernando,
1.- Dentro de la estructura <stule type="text/css"> incluir lo siguiente:
cHtml2 :=[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]+CRLF
cHtml2 +=[ <html xmlns="http://www.w3.org/1999/xhtml"> ]+CRLF
cHtml2 +=[ <head> ]+CRLF
cHtml2 +=[ <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> ]+CRLF
cHtml2 +=[ <title> </title> ]+CRLF
cHtml2 +=[ <script src="http://maps.google.com/maps?file=api&v= ... EomegYBo1w" type="text/javascript"></script> ]+CRLF
cHtml2 +=[ <script type="text/javascript"> ]+CRLF
cHtml2 +=" var map = null; "+CRLF
cHtml2 +=" var geocoder = null; "+CRLF
cHtml2 +=" var coords = null; "+CRLF+CRLF
cHtml2 +=" function initialize() { "+CRLF
cHtml2 +=" if (GBrowserIsCompatible()) { "+CRLF
cHtml2 +=[ map = new GMap2(document.getElementById("map_canvas")); ]+CRLF
cHtml2 +=" map.addControl(new GLargeMapControl()); "+CRLF
cHtml2 +=" map.addControl(new GMapTypeControl()); "+CRLF
cHtml2 +=" geocoder = new GClientGeocoder(); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress(address, cAddressName) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ showAddress2('<<CITY>>'); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" coords = marker.getPoint(); "+CRLF
cHtml2 +=[ var curl = cAddressName + "<p>" + coords.toUrlValue(6) + "</p>" ]+CRLF
cHtml2 +=[ var button = '<input type="button" value="Imprimir" onClick="window.print()"/>;' ]+CRLF
cHtml2 +=" curl = curl + button "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress2(address) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ alert(address + " not found"); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" marker.openInfoWindowHtml(address); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" </script> "+CRLF
cHtml2 +=" </head> "+CRLF+CRLF
cHtml2 +=[ <body onload="initialize(); showAddress('<<STREET>>, <<CITY>> <<COUNTRY>>', '<<STREET>>, <<CITY>> <<COUNTRY>>');" onunload="GUnload()" ]+CRLF
cHtml2 +=[ <div id="map_canvas" style="width: 285px; height: 170px"></div> ]+CRLF
cHtml2 +=" </body> "+CRLF
cHtml2 +="</html> "
Fernando o código gmap que tenho é esse, não encontrei parte que usted referiu, pode me ajudar?
Grato
1.- Dentro de la estructura <stule type="text/css"> incluir lo siguiente:
cHtml2 :=[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]+CRLF
cHtml2 +=[ <html xmlns="http://www.w3.org/1999/xhtml"> ]+CRLF
cHtml2 +=[ <head> ]+CRLF
cHtml2 +=[ <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> ]+CRLF
cHtml2 +=[ <title> </title> ]+CRLF
cHtml2 +=[ <script src="http://maps.google.com/maps?file=api&v= ... EomegYBo1w" type="text/javascript"></script> ]+CRLF
cHtml2 +=[ <script type="text/javascript"> ]+CRLF
cHtml2 +=" var map = null; "+CRLF
cHtml2 +=" var geocoder = null; "+CRLF
cHtml2 +=" var coords = null; "+CRLF+CRLF
cHtml2 +=" function initialize() { "+CRLF
cHtml2 +=" if (GBrowserIsCompatible()) { "+CRLF
cHtml2 +=[ map = new GMap2(document.getElementById("map_canvas")); ]+CRLF
cHtml2 +=" map.addControl(new GLargeMapControl()); "+CRLF
cHtml2 +=" map.addControl(new GMapTypeControl()); "+CRLF
cHtml2 +=" geocoder = new GClientGeocoder(); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress(address, cAddressName) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ showAddress2('<<CITY>>'); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" coords = marker.getPoint(); "+CRLF
cHtml2 +=[ var curl = cAddressName + "<p>" + coords.toUrlValue(6) + "</p>" ]+CRLF
cHtml2 +=[ var button = '<input type="button" value="Imprimir" onClick="window.print()"/>;' ]+CRLF
cHtml2 +=" curl = curl + button "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress2(address) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ alert(address + " not found"); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" marker.openInfoWindowHtml(address); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" </script> "+CRLF
cHtml2 +=" </head> "+CRLF+CRLF
cHtml2 +=[ <body onload="initialize(); showAddress('<<STREET>>, <<CITY>> <<COUNTRY>>', '<<STREET>>, <<CITY>> <<COUNTRY>>');" onunload="GUnload()" ]+CRLF
cHtml2 +=[ <div id="map_canvas" style="width: 285px; height: 170px"></div> ]+CRLF
cHtml2 +=" </body> "+CRLF
cHtml2 +="</html> "
Fernando o código gmap que tenho é esse, não encontrei parte que usted referiu, pode me ajudar?
Grato
Incluye/Cambia lo siguiente:
cHtml2 :=[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]+CRLF
cHtml2 +=[ <html xmlns="http://www.w3.org/1999/xhtml"> ]+CRLF
cHtml2 +=[ <head> ]+CRLF
cHtml2 +=[ <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> ]+CRLF
cHtml2 +=[ <title> </title> ]+CRLF
cHtml2 +=[ <style type="text/css"> ]+CRLF
cHtml2 +=[ @import url("http://www.google.com/uds/css/gsearch.css"); ]+CRLF
cHtml2 +=[ @import url("http://www.google.com/uds/solutions/loc ... search.css"); ]+CRLF
cHtml2 +=[ #map_canvas { ]+CRLF
cHtml2 +=[ position:absolute; ]+CRLF
cHtml2 +=[ margin-top: 0%; ]+CRLF
cHtml2 +=[ margin-right: 0%; ]+CRLF
cHtml2 +=[ margin-bottom: 0%; ]+CRLF
cHtml2 +=[ margin-left: 0%; ]+CRLF
cHtml2 +=[ left:0%; ]+CRLF
cHtml2 +=[ right:0% ]+CRLF
cHtml2 +=[ top:0%; ]+CRLF
cHtml2 +=[ Bottom:0%; ]+CRLF
cHtml2 +=[ padding:0; ]+CRLF
cHtml2 +=[ width:100%; ]+CRLF
cHtml2 +=[ height:100%; ]+CRLF
cHtml2 +=[ } ]+CRLF
cHtml2 +=[ </style> ]+CRLF
cHtml2 +=[ <script src="http://maps.google.com/maps?file=api&v= ... EomegYBo1w" type="text/javascript"></script> ]+CRLF
cHtml2 +=[ <script type="text/javascript"> ]+CRLF
cHtml2 +=" var map = null; "+CRLF
cHtml2 +=" var geocoder = null; "+CRLF
cHtml2 +=" var coords = null; "+CRLF+CRLF
cHtml2 +=" function initialize() { "+CRLF
cHtml2 +=" if (GBrowserIsCompatible()) { "+CRLF
cHtml2 +=[ map = new GMap2(document.getElementById("map_canvas")); ]+CRLF
cHtml2 +=" map.addControl(new GLargeMapControl()); "+CRLF
cHtml2 +=" map.addControl(new GMapTypeControl()); "+CRLF
cHtml2 +=" geocoder = new GClientGeocoder(); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress(address, cAddressName) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ showAddress2('<<CITY>>'); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" coords = marker.getPoint(); "+CRLF
cHtml2 +=[ var curl = cAddressName + "<p>" + coords.toUrlValue(6) + "</p>" ]+CRLF
cHtml2 +=[ var button = '<input type="button" value="Imprimir" onClick="window.print()"/>;' ]+CRLF
cHtml2 +=" curl = curl + button "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress2(address) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ alert(address + " not found"); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" marker.openInfoWindowHtml(address); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" </script> "+CRLF
cHtml2 +=" </head> "+CRLF+CRLF
cHtml2 +=[ <body onload="initialize(); showAddress('<<STREET>>, <<CITY>> <<COUNTRY>>', '<<STREET>>, <<CITY>> <<COUNTRY>>');" onunload="GUnload()" ]+CRLF
cHtml2 +=[ <div id="map_canvas"></div> ]+CRLF
cHtml2 +=" </body> "+CRLF
cHtml2 +="</html> "
cHtml2 :=[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]+CRLF
cHtml2 +=[ <html xmlns="http://www.w3.org/1999/xhtml"> ]+CRLF
cHtml2 +=[ <head> ]+CRLF
cHtml2 +=[ <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> ]+CRLF
cHtml2 +=[ <title> </title> ]+CRLF
cHtml2 +=[ <style type="text/css"> ]+CRLF
cHtml2 +=[ @import url("http://www.google.com/uds/css/gsearch.css"); ]+CRLF
cHtml2 +=[ @import url("http://www.google.com/uds/solutions/loc ... search.css"); ]+CRLF
cHtml2 +=[ #map_canvas { ]+CRLF
cHtml2 +=[ position:absolute; ]+CRLF
cHtml2 +=[ margin-top: 0%; ]+CRLF
cHtml2 +=[ margin-right: 0%; ]+CRLF
cHtml2 +=[ margin-bottom: 0%; ]+CRLF
cHtml2 +=[ margin-left: 0%; ]+CRLF
cHtml2 +=[ left:0%; ]+CRLF
cHtml2 +=[ right:0% ]+CRLF
cHtml2 +=[ top:0%; ]+CRLF
cHtml2 +=[ Bottom:0%; ]+CRLF
cHtml2 +=[ padding:0; ]+CRLF
cHtml2 +=[ width:100%; ]+CRLF
cHtml2 +=[ height:100%; ]+CRLF
cHtml2 +=[ } ]+CRLF
cHtml2 +=[ </style> ]+CRLF
cHtml2 +=[ <script src="http://maps.google.com/maps?file=api&v= ... EomegYBo1w" type="text/javascript"></script> ]+CRLF
cHtml2 +=[ <script type="text/javascript"> ]+CRLF
cHtml2 +=" var map = null; "+CRLF
cHtml2 +=" var geocoder = null; "+CRLF
cHtml2 +=" var coords = null; "+CRLF+CRLF
cHtml2 +=" function initialize() { "+CRLF
cHtml2 +=" if (GBrowserIsCompatible()) { "+CRLF
cHtml2 +=[ map = new GMap2(document.getElementById("map_canvas")); ]+CRLF
cHtml2 +=" map.addControl(new GLargeMapControl()); "+CRLF
cHtml2 +=" map.addControl(new GMapTypeControl()); "+CRLF
cHtml2 +=" geocoder = new GClientGeocoder(); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress(address, cAddressName) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ showAddress2('<<CITY>>'); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" coords = marker.getPoint(); "+CRLF
cHtml2 +=[ var curl = cAddressName + "<p>" + coords.toUrlValue(6) + "</p>" ]+CRLF
cHtml2 +=[ var button = '<input type="button" value="Imprimir" onClick="window.print()"/>;' ]+CRLF
cHtml2 +=" curl = curl + button "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF+CRLF
cHtml2 +=" function showAddress2(address) { "+CRLF
cHtml2 +=" if (geocoder) { "+CRLF
cHtml2 +=" geocoder.getLatLng( "+CRLF
cHtml2 +=" address, "+CRLF
cHtml2 +=" function(point) { "+CRLF
cHtml2 +=" if (!point) { "+CRLF
cHtml2 +=[ alert(address + " not found"); ]+CRLF
cHtml2 +=" } else { "+CRLF
cHtml2 +=" map.setCenter(point, 15); "+CRLF
cHtml2 +=" var marker = new GMarker(point); "+CRLF
cHtml2 +=" map.addOverlay(marker); "+CRLF
cHtml2 +=" marker.openInfoWindowHtml(address); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" ); "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" } "+CRLF
cHtml2 +=" </script> "+CRLF
cHtml2 +=" </head> "+CRLF+CRLF
cHtml2 +=[ <body onload="initialize(); showAddress('<<STREET>>, <<CITY>> <<COUNTRY>>', '<<STREET>>, <<CITY>> <<COUNTRY>>');" onunload="GUnload()" ]+CRLF
cHtml2 +=[ <div id="map_canvas"></div> ]+CRLF
cHtml2 +=" </body> "+CRLF
cHtml2 +="</html> "
Un saludo
Fernando González Diez
ALSIS GHE Sistemas Informáticos
Fernando González Diez
ALSIS GHE Sistemas Informáticos
No he probado si se puede hacer. Lo siento
Si he visto que en su tooltip aparece el texto
"Obtener indicaciones: Hasta aquí - Desde aquí"
Y con eso se puede calcular rutas de desde/hasta ese punto.
Lo que no sé es como mostrar su tooltip.
Si he visto que en su tooltip aparece el texto
"Obtener indicaciones: Hasta aquí - Desde aquí"
Y con eso se puede calcular rutas de desde/hasta ese punto.
Lo que no sé es como mostrar su tooltip.
Un saludo
Fernando González Diez
ALSIS GHE Sistemas Informáticos
Fernando González Diez
ALSIS GHE Sistemas Informáticos