【问题标题】:How to solve IE display google map incorrectly using iframe如何使用 iframe 解决 IE 显示谷歌地图不正确的问题
【发布时间】:2016-10-13 08:46:46
【问题描述】:

试图解决谷歌地图在谷歌浏览器中呈现不正确的 IE 问题,而 Firefox 很好,下图是它在 IE 中的显示方式:

如果你能帮我解决这个问题,我会很高兴。

【问题讨论】:

  • 你能给我们你的代码吗?

标签: c# jquery model-view-controller


【解决方案1】:

这是我的代码

    $(document).ready(function () {
    jQuery('#PropertySearchMap').css({
        "position": "absolute !important",
        "left": "-10000px !important"
    });
    if ($('#PropertySearchMap').is(':visible')) {
        setTimeout(function () {
            Initialize()
        }, 500);
        jQuery('#PropertySearchMap').show();
        jQuery('#PropertySearchMap').css({
            "position": "static !important"
        });
    }
});

function Initialize() {
    $("#butSearch").click(function (e) {
        ls.mapping.search();
        e.preventDefault();
    });
    $("#butReset").click(function (e) {
        var loc = document.location.href.toString().split("#");
        document.location = loc[0];
    });
    $("#butAdd").click(function (e) {
        parent.$("@Model.Source.GetTag()").trigger("property:selected", {
            propertyId: 0
        });
    });
    $("footer").hide();
    $('#select_all').click(function () {
        var c = this.checked;
        $(':checkbox').prop('checked', c);
    });
    $(".body-content").css("height", "100%");
    $(".body-content").css("width", "100%");
    ls.rootUrl = "@System.Configuration.ConfigurationManager.AppSettings["
    PropertyServiceUrl "]";
    ls.mapping.initiAutoComplete();@
    if (Model.DisableMap) {@: ls.mapping.disableClickSearch = true;
    }@
    if (Model.HideSearchControls && Model.DisableMap) {@: ls.mapping.initializeMap(true);
    } else {@: ls.mapping.initializeMap(false);
    }@ if (Model.Source == MapSourceEnum.CompSales) {
        //@:window.setTimeout(ls.mapping.plotCompsales, 1000); Stephan - verify this is required
        @: ls.mapping.plotCompsales();
    }@ {@: ls.mapping.propertySelectedEventTarget = "@Model.Source.GetTag()";
    }
    ls.tools.initToolFuncs();
}

【讨论】:

  • 嗨,Marcel,谢谢你,但我在它不起作用之前尝试过,但无论如何谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-02-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多