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 :)
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 €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);
}
});
精彩评论