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:
In Internet Explorer 9 and Chrome and any other browser I have tested, the map looks like this:
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 ...