php - 任何人都知道可能导致此 map 问题的原因是什么?

标签 php javascript css google-maps

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

在上面,单击 Accordion 中的 map 标题。有谁知道可能导致只有 map 右上角显示的奇怪问题的原因是什么?当您加载 Firebug 或 Chromes 检查元素功能时,它会自行修复。

欢迎所有建议:)

最佳答案

尝试在点击时加载 map

$("#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);

        }
});

关于php - 任何人都知道可能导致此 map 问题的原因是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6711570/

相关文章:

javascript - Semantic-UI 中的动态主题更改

javascript - JS/jQuery : Hiding elements which doesnt have a spesific attribute value

html - 如何在悬停时以百分比缩放 div

html - 在悬停时旋转横幅会导致它痉挛

PHPMD 表示对于具有 bool 默认值的参数违反了单一责任原则

PHP:根据不同表的值在15分钟后删除记录

php - CakePHP:在不同的 Controller 中使用模型

javascript - javascript中的下一个奇数

javascript - 是什么阻止 querySelectorAll 在此代码中处理具有相同类的所有元素?

PHP 将日期时间发送到 mysql