0

我遇到了 excanvas 无法在 IE8 中呈现的问题。这是我初始化画布的地方。

var canvas = document.getElementById("map");
if (typeof (G_vmlCanvasManager) != 'undefined') {
    canvas = G_vmlCanvasManager.initElement(canvas);
}
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#656600"; // sets colors of counties
ctx.strokeStyle = "#ff0000";
ctx.flobalAlpha = 0.33; // set transparency

<img name="texasmapofcounties" src=../texas-map-of-counties.jpg"style="position: absolute; height: 719px; width: 800px; left: 0px; top: 0;" alt="map of texas counties" />
<canvas id="map" width="800" height="719" style="position: absolute; left: 0px; top: 0; opacity: 1;"></canvas>
<div id="map_blind"  style="position: absolute; height: 719px; width: 800px; left: 0px; top: 0;"></div>
<img name="texasmapofcounties" src="../texas-map-of-counties.jpg" width="800" height="719" border="0" id="texasmapofcounties" usemap="#m_texasmapofcounties" alt="" style="position: absolute; height: 719px; width: 800px; left: 0px; top: 0; -moz-user-select: none; opacity: 0;" />    

该网站的目的是,如果德克萨斯州的一个县在其中有一棵“著名的树”,则该县被涂成绿色。然后用户可以选择县并单击它以弹出树木列表。该功能适用​​于 IE7 IE9、FF、Chrome 等......它只是 IE8 和 Excanvas 无法正常工作。

任何帮助将不胜感激!

4

0 回答 0