情況描述:
1.MAPXTREME 2005/2008 在IE8下出現“參數錯誤”問題 (command.js 出錯),而火狐正常
只需要在頁面中加入如下HTTP meta-tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
只要IE8一讀到這個標籤,它就會自動啓動IE7兼容模式,保證頁面完整展示.
還有一種方法是針對整個網站的,在IIS中加入如下描述符就可以有相同的效果,當然這麼做範圍更廣.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=EmulateIE7">
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
或者你還可以使用IIS admin tool來定義,更爲簡單.
2.Interaction.js 在IE中出現錯誤,而火狐卻運行正常
DragInteraction.prototype.OnUp=function (e)
{
if (this.drag)
{
this.element.style.position='relative';
this.element.style.left = 0;
this.element.style.top = 0;
this.element.style.clip = 'rect(' + 0 + ' ' + this.element.width + ' ' + this.element.height + ' ' + 0 +')';
this.PointsData.AddPoint(e.clientX+GetScrollLeft(this.element), e.clientY+GetScrollTop(this.element));
if (this.onComplete) this.onComplete();
this.PointsData.Clear();
this.drag = false;
} else {
this.PointsData.Clear(); //沒拖動要清除選中的點,這條語句必須加否則單擊地圖但是沒有拖動時,下次再單擊但沒有拖動出現地圖自動拖動的現象
}