<div dir="ltr">Hi List,<div>i´ve generated a code to add wmc-layer as an Overlay to the map. My code use a file chooser for take a wmc-document. After loading the layers, i can see them on the map and i can see them in the switcher. But the transparency is inaktiv at the beginning, after zooming or dragging the map, the transparency works. How, can I change that is still working with loading the layers?</div>
<div><br></div><div>Here is my examplecode:</div><div>[code]</div><div><div>$('.btn.addWMC').click(function(e) </div><div>    {</div><div>        var fileSelector = $('<input type="file" />').bind('change', function(e)</div>
<div><span class="" style="white-space:pre">            </span>{</div><div><span class="" style="white-space:pre">                  </span>var file = this.files[0];</div><div><span class="" style="white-space:pre">                  </span>var reader = new FileReader();</div>
<div><span class="" style="white-space:pre">                    </span>reader.readAsBinaryString(file);</div><div><span class="" style="white-space:pre">                   </span>reader.onloadend = function() </div><div><span class="" style="white-space:pre">                     </span>{</div>
<div>                extrawmc = reader.result; </div><div><span class="" style="white-space:pre">                           </span>extracontext = format.read(extrawmc,{map:map});</div><div><span class="" style="white-space:pre">                            </span>for (var i=0; i<extracontext.layers.length;i++) </div>
<div><span class="" style="white-space:pre">                            </span>{ </div><div><span class="" style="white-space:pre">                                 </span>var layer = extracontext.layers[i]; </div><div><span class="" style="white-space:pre">                                       </span>layer.params.TRANSPARENT = 'TRUE'; </div>
<div><span class="" style="white-space:pre">                            </span>}</div><div><span class="" style="white-space:pre">                          </span>map.addLayers(extracontext.layers);</div><div>            }</div><div>        });</div><div>        var wmc = fileSelector.click();</div>
<div>        return false;</div><div>    });  </div><div>[/code]</div><div>Thanks for helping me </div><div>Tim</div><div><br></div><br>
</div></div>