Opacity causes Flashing

717
0
01-22-2013 05:10 PM
SimonJackson
Occasional Contributor III
I have a map sitting on top of a dark gray background.

I have the canvas basemap set to initially load as semi-transparent:

 var canvas = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer", {
         "opacity":0.28,
         "id": "canvas"});


When I zoom in/out, the tiles seem to flash in.
Easier to see what I mean by watching this short screencast.

I am guessing it might be to do with the fact that the layer has some kind of fade in transistion for new tiles?
If you agree that this is the likely cause, is there any way to turn this effect off?

For info, elsewhere in my application I have a transparency slider for this layer, but this has the same value as the initial transparency of the basemap.  The reason I mention this, is that if there is a way the tiles can have their transparency altered perhaps by CSS, this will not be a workaround for me, as the tiles can have their opacity changed by the slider.


 $('#slider').slider({
    min: 0,
    max: 100,
    value: 28,
    range: "min",
    slide: function(event, ui) {
              map.getLayer("canvas").setOpacity(ui.value/100);
          } 
   });
0 Kudos
0 Replies