DynamicLayer.setOpacity seems to have a little issue in Internet Explorer 8.0

Discussion created by seierwi on Jul 12, 2011
Latest reply on Jun 20, 2013 by VBAHole
I'm found a minor issue with changing of the opacity of a dynamic layer in our website. We have a button called "Plandekking" which rotates through a preset number of opacity setting and sets them on the IMRO2008 layer. The settings are 0%, 25%, 50%, 75% and 100%, the default setting is 50%.

This all works fine in Firefox 3.6 and 4.0, Opera 10.x, Safari 5.x, but not in Internet Explorer 8.0. When the opacity is adjusted nothing changes on the screen. Only after you pan the map the IMRO2008 layer refreshes with the correct opacity.

I tested out two cases:

  1. Set the default opacity to 100% or 1.0

  2. Set the default opacity to 0% or 0.0

Case number 1, made everything work fine it rotated through all settings.
Case number 2, as expected caused every step to fail and require a pan of the map.

Is this a known issue with the Javascript API 1.6, Internet Explorer or is my code faulty?

function doPlanToggle(){
 var current_o = service_IMRO2008.opacity; // load current setting
 var new_o;
 switch (current_o) {
  case 0.00: new_o = 0.25; break;
  case 0.25: new_o = 0.50; break;
  case 0.50: new_o = 0.75; break;
  case 0.75: new_o = 1.00; break;  
  case 1.00: new_o = 0.00; break;
  default: new_o = 0.50;
 setStatusbar("Dekkingspercentage plan aangepast in: " + parseInt(100 * new_o) + "%"); // interface feedback
} // WvI 2010-08-02

Example available at: