Ferdia O'Brien
Ferdia O'Brien

Reputation: 869

Anyone know what might be causing this maps problem?

http://robbieduggan.com/bridgedale-homes/ppc1/

In the above, click the Maps heading in the Accordion. Does anyone know what might be causing the odd problem where only the top right of the maps shows? It fixes itself when you load up Firebug or Chromes Inspect Element feature.

All suggestions welcome :)

Upvotes: 1

Views: 80

Answers (1)

Steve Robbins
Steve Robbins

Reputation: 13812

Try loading your map on click

$("#mapAccordionTrigger").click(function() {
        if (GBrowserIsCompatible()) {
            var lat = 53.559991;
            var lng = -6.799526;

            var map = new GMap2(document.getElementById("map"));
            map.addControl(new GSmallMapControl());
            map.addControl(new GMapTypeControl());
            map.setCenter(new GLatLng(lat, lng), 15);

            var infoTabs = [
                new GInfoWindowTab("Address", "4 Bed Detached Houses<br />From &euro;249,000"),
                ];

            // Place a marker in the center of the map and open the info window
            var marker = new GMarker(map.getCenter());
            GEvent.addListener(marker, "click", function() {
                marker.openInfoWindowTabsHtml(infoTabs);
            });
            map.addOverlay(marker);
            marker.openInfoWindowTabsHtml(infoTabs);

            var point = new GLatLng(lat, lng);
            panoramaOptions = {
                latlng: point
            };
            pano = new GStreetviewPanorama(document.getElementById("streetview"), panoramaOptions);
            GEvent.addListener(pano);

        }
});

Upvotes: 1

Related Questions