Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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:

  1. Page is loaded
  2. Map is initialized
  3. Polygons are loaded with query task
  4. Polygons are drawn on map
  5. Event handlers are attached ...
share|improve this question
1  
Unfortunately facing similar problem using graphics layer : ( –  Sunil Mar 7 '13 at 10:22
add comment

1 Answer

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]))
);
share|improve this answer
1  
Thanks for sharing : ) –  Sunil Mar 7 '13 at 12:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.