3

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 ...
1
  • 1
    Unfortunately facing similar problem using graphics layer : (
    – Sunil
    Commented Mar 7, 2013 at 10:22

1 Answer 1

4

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]))
);
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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