Bing Maps unclear block issue

原文:http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/63a1e3c1-0da5-4030-b013-317fac93a55d

 

Thanks Hemanth, After a bit of effort I could find the fix.

Firstly my issue is similar to the one described on this http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/db34068c-5307-4ab7-be03-15b86c2604bb

The first version of IE 8 had this issue. Thats why this was not noticed in testing phase. People who never took updates of IE 8 only experience this issue. Hot fix is to take an IE update. But, that does not work with for all our clients. We needed some fix that works without IE 8 update.

1)We had to rewrite some code where we delay loading the map. [It was in document.Ready, we moved it to window.load]

2) We had to move Jquery plugins to the last line

Hope this explains. Thanks a lot.

 

在项目中用bingmaps ,因为采取了动态变高的设计,在高分辨率下 会出现不清楚的 blocks

开始一直怀疑是map对象操作问题,后来

又发现在 chrome下并没有此问题

又发现在有错误框弹出后一定时间后点击关闭也没有blocks的问题

就怀疑加载时机的问题

我们采取用jQuery $(function(){.....code}});

进行初始化,后修改为

window.load = function(){....}

但是这样会影响原来的load事件

因此修改成

addCustomLoadEvent(fun) {

 var oldonload = window.onload; 

if (typeof window.onload != 'function') {

        window.onload = fun;

    }else {

        window.onload = 

function () {

            oldonload();

            fun();

        }

    }

}

addCustomLoadEvent(funx);

 

然后测试,就ok了。

你可能感兴趣的:(clear)