Si alguna vez has querido utilizar esta herrmaienta de Google, te habrás podido preguntar, si hay alguna forma de que ocupe todo la pantalla, para una mejor visualización de los mapas.
La solución es más o menos fácil: Lo que tenemos que hacer, es guardar unn archivo HTML que contenga el Script que copiamos a continuación. Guardamos el archivo, y lo abrimos con el navegador.
El código JavaScript es el siguiente:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Google Maps JavaScript API Example – simple</title>
<script src=”http://maps.google.com/maps?file=api&v=1&key=ABQIAAAAy6MBiqsAuMYcRcIXE-SdkhQI513BVj7Itr7WPMGFabbrMAySrRTqrYgzCD2NDBq2Npe_EDAW–Is2A” type=”text/javascript”></script> <!– Make the document body take up the full screen –>
<style type=”text/css”>
v\:* {behavior:url(#default#VML);}
html, body {width: 100%; height: 100%}
body {margin-top: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 0px}
</style>
</head>
<body>
<div id=”map” style=”width: 100%; height: 100%;”></div>
<script type=”text/javascript”>
//<![CDATA[
var map;
if (GBrowserIsCompatible()) {
map = new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint(-122.141944, 37.441944), 4);
// Monitor the window resize event and let the map know when it occurs
if (window.attachEvent) {
window.attachEvent("onresize", function() {this.map.onResize()} );
} else {
window.addEventListener("resize", function() {this.map.onResize()} , false);
}
}
//]]>
</script>
</body></html>
FUENTE: LeapBeyond
1 Comentario
[...] See original here: Google Maps a pantalla completa | www.Limoneando.com [...]