Ver Mensaje Individual
  #6 (permalink)  
Antiguo 06/07/2008, 16:31
Avatar de derkenuke
derkenuke
Colaborador
 
Fecha de Ingreso: octubre-2003
Ubicación: self.location.href
Mensajes: 2.665
Antigüedad: 21 años, 3 meses
Puntos: 45
Respuesta: google map en la web

Hola de nuevo:

Creo que te sobra como el 90% de código que has puesto ahí (parece el mismo código, pero con distintas configuraciones repetido 20 veces).

Así me ha funcionado a mi:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<
head>
<
meta http-equiv="Content-type" content="text/html;charset=iso-8859-1" />
<
meta name="Author" content="derkeNuke" />
<
title>P&#225;gina nueva</title>
<style type="text/css">

</
style>
<
script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9acvgBR5Yb886HXTRNuW oRSDmDhWwrawVEvvR5oIeQp-m2M47hSOkl59yXInzRhxWrcx1A5pcpMl4w" type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAA9acvgBR5Yb886HXT RNuWoRSDmDhWwrawVEvvR5oIeQp-m2M47hSOkl59yXInzRhxWrcx1A5pcpMl4w" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" type="text/javascript"></script>

<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 {
    border : 1px solid #979797;
    width : 100%;
    height : 600px;
}
</style>

<script type="text/javascript">
//<![CDATA[
function load() {
    if (GBrowserIsCompatible()) {
        // Create and Center a Map
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(40.338511, -3.713933), 15);
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());

        var options = {
            linkTarget : GSearch.LINK_TARGET_BLANK,
            searchFormHint : "madrid",
            //onIdleCallback : function() { alert("search control is idle");},
            //onSearchCompleteCallback : function() { alert("search is complete");},
            suppressInitialResultSelection : true
        };

        var searchcontrol = new google.maps.LocalSearch(options);
        
        // bind a search control to the map, suppress result list
        map.addControl(searchcontrol);
    }
}
GSearch.setOnLoadCallback(load);

</script>

</head>

<body>

    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td width="98%">
                <table width="83%" border="0" cellpadding="0" cellspacing="0" bgcolor="#336633">
                    <tr>
                        <td align="left" valign="top" class="Estilo11">Formas de Pago </td>
                    </tr>
                </table>
                </td>
        </tr>
        <tr>
            <td>
                <div id="map" style="width: 500px; height: 300px"></div>
            </td>
        </tr>
    </table>

</body>
</html> 
No sé si es lo que buscabas.


Saludos.
__________________
- Haz preguntas inteligentes, y obtendrás más y mejores respuestas.
- Antes de postearlo Inténtalo y Búscalo.
- Escribe correctamente tus mensajes.