by FWHISHOW » Fri Jan 11, 2008 10:08 am
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=2.x&key=ABQIAAAAtOjLpIVcO8im8KJFR8pcMhQjskl1-YgiA_BGX2yRrf7htVrbmBTWZt39_v1rJ4xxwZZCEomegYBo1w" 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