I have an issue when displaying features on a map in ArcGIS Javascript API V. 2.8. I want to know if this behavior is seen before, and what could cause it.
In Internet Explorer 8 the map looks like this:
Internet Explorer 8 issue
In Internet Explorer 9 and Chrome and any other browser I have tested, the map looks like this:
Chrome screenshot
The red color we see is the color of the outline of the polygons.
Below is a part of the code for drawing the polygons. As the application is quite complex, as will avoid posting the whole application here. Unfortunately I am not able to provide a direct link to the page, as it is not released yet.
var symbol = new esri.symbol.SimpleFillSymbol(
esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT,
new dojo.Color([100, 0, 0, 0.5]), new dojo.Color([100, 100, 100]))
)
...
dojo.forEach(features, function (feature) {
var graphic = new esri.Graphic(feature.geometry, symbol);
graphic.attributes = feature.attributes;
map.graphics.add(graphic);
});
The flow in the program is basicly this:
- Page is loaded
- Map is initialized
- Polygons are loaded with query task
- Polygons are drawn on map
- Event handlers are attached ...
-
1Unfortunately facing similar problem using graphics layer : (Sunil– Sunil2013年03月07日 10:22:19 +00:00Commented Mar 7, 2013 at 10:22
1 Answer 1
I have not solved the issue, but I have found a workaround:
If I detect Internet Explorer 8, I will just hide the outline.
var symbol = new esri.symbol.SimpleFillSymbol(
esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT,
new dojo.Color([100, 0, 0, (dojo.isIE === 8 ? 0 : 0.5)]), new dojo.Color([100, 100, 100]))
);
Explore related questions
See similar questions with these tags.