TextSymbol graphic doesn't draw in IE8

940
4
09-09-2010 08:18 AM
PauPérez_Puigcerver
New Contributor II
Hi,

I made a viewer with JavaScript API 2.0, and I draw Points, Lines, Polylines, etc... with texts.
The problem is that TextSymbol Graphic doesn't draw using IE8, instead in Firefox and Chrome it draws. The code is like this, attached to a button:

var simboloPuntoPrueba = new esri.symbol.TextSymbol("HOLA_MUNDO");
var puntoPrueba = new esri.geometry.Point([726000, 4370000], new esri.SpatialReference({
wkid: 23030
}));
graficoPuntoPrueba = new esri.Graphic(puntoPrueba, simboloPuntoPrueba);
map.graphics.add(graficoPuntoPrueba);

What's the problem?

Pau
0 Kudos
4 Replies
PauPérez_Puigcerver
New Contributor II
Hi,

I made some tests. The error occurs when the page have the compatibility with IE8, with the tag in head:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

When I change to:

<meta http-equiv="X-UA-Compatible" content="IE=7" />

or I comment the line, the TextSymbol draws, but other elements in my Viewer don't draw correctly, with other issues, the accordionPane.

Anyone have the same problem?

Thanks.

Pau
0 Kudos
SasaI_
by
New Contributor
Its a dojo bug with a fairly simple workaround.  Check out http://bugs.dojotoolkit.org/ticket/10491 for more information.
0 Kudos
DavidHollema
New Contributor III
I have the same issue where TextSymbol does not display in IE8.  I cannot use the IE7 workaround as we are targeting IE8, IE9, Chrome, FF and have other code that IE7 will not support.  I also prefer to use the esri-hosted jsapi, version 2.8 and therefore cannot apply the patch presented in the bug tracker.  What are my options?  This is still an issue in jsapi 2.8 which is based on dojo 1.6.1.

Its a dojo bug with a fairly simple workaround.  Check out http://bugs.dojotoolkit.org/ticket/10491 for more information.
0 Kudos
DavidHollema
New Contributor III
There was a bug in how the font size was defined.  "em" units was the problem.  I switched to "px" units and all is well.

I have the same issue where TextSymbol does not display in IE8.  I cannot use the IE7 workaround as we are targeting IE8, IE9, Chrome, FF and have other code that IE7 will not support.  I also prefer to use the esri-hosted jsapi, version 2.8 and therefore cannot apply the patch presented in the bug tracker.  What are my options?  This is still an issue in jsapi 2.8 which is based on dojo 1.6.1.
0 Kudos