Gracias por la ayuda.
Pongo el código que uso:
Código HTML:
function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.addControl(new GOverviewMapControl()); map.addMapType(G_PHYSICAL_MAP); map.enableDoubleClickZoom(); map.setCenter(new GLatLng(-1.842502, -78.286328), 7); GDownloadUrl("php/mapa/phpsqlajax_genxml.php", function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var cod = markers[i].getAttribute("cod"); var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var marker = createMarker(point, name, address, type, cod); map.addOverlay(marker); } }); } } function createMarker(point, name, address, type, cod) { var marker = new GMarker(point, customIcons[type]); var html = "<b>" + name + "</b> <br/>" + address; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); window.open(pagina.php? }); GEvent.addListener(marker,"mouseover", function() { marker.openInfoWindowHtml(html); }); return marker; }