smas1 / geoext-viewer

Automatically exported from code.google.com/p/geoext-viewer
GNU General Public License v3.0
0 stars 0 forks source link

default opacity changed on 0.70 #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use Heron 0.70
2. configure a layer like:
 new OpenLayers.Layer.TMS(
                        'Brtachtergrond',
                        Heron.urls.PDOK_TMS,
                        {layername: 'brtachtergrondkaart', type: 'png',
                                isBaseLayer: false,  buffer: 0, visibility: true, zoomOffset: 2,  tileOrigin: Heron.options.map.settings.TILE_ORIGIN_PDOK}

What is the expected output? What do you see instead?
In the previous version the default opacity was set to 1, so the layer is 
visible and slider is set to max. In the latest version the opacity is set to 0 
and the slider is set to min.

A workaround is adding opacity: 1.0 to the above config. However when using the 
featselsearchpanel the layer added by the search has an opacity of 0 and is not 
visible unles the user uses the slider.

What version of the product are you using? 
Heron 0.70
OL 2.11
ext 3.4.0
geoext 1.1

Original issue reported on code.google.com by rvob...@gmail.com on 6 Nov 2012 at 8:56

GoogleCodeExporter commented 9 years ago
The opacity is taken from the actual settings of the layer - no opacity is set 
by default - this means: 
1.) if a layer has the WMS opacity 0.5 gotten from WMS server and there is no 
layer configuration for opacity => the first init will be 0.5
2.) if a layer has the opacity 0.8 (set per WMS layer configuration ... 
opacity=0.8; ..) => the first init will be 0.8
3.) if a layer has no configuration => the first init will be like 1.)

See example 'ActiveLayers': 
like 1.) => run demo and check 'Natura 2000' entry  => opacity = 100%
like 2.) change 'Natura 2000' entry in 'DefaultOptionsNL.js' - add 'opacity: 
0.5':

    /** Natura 2000 (PDOK) */
    natura2000tms: new OpenLayers.Layer.TMS("Natura 2000 (TMS)",
            Heron.PDOK.urls.PDOKTMS,
            {layername: 'natura2000', opacity: 0.5, type:'png', isBaseLayer: false, transparent: true, bgcolor: "0xffffff", visibility: false, singleTile: false, transitionEffect: 'resize'}),

=> run demo and check 'Natura 2000' entry  => opacity = 50%

This was tested with OL 2.12 !!! Please check your OL version - is it 2.11!?

Original comment by wolfram.winter on 6 Nov 2012 at 12:46

GoogleCodeExporter commented 9 years ago
Until recently we didn't had any problems with the opacity slider. After the 
upgrade to 0.70 we also added the 'WFS feature serch and select' function. With 
that we consistently (reproducable) see the opacity set to 0 to the newly added 
layer. The above problem seems to be intermittent, so we have to sort out some 
things.

We will try again agains 0.70 without the 'WFS feature search and select' and 
if thats the culprit. It has some other issue's as well but I will create a new 
issue for this.

When using OL 2.12 nothing works anymore with an error about the WFS search 
option. 2.11 works ok.

Original comment by rvob...@gmail.com on 6 Nov 2012 at 7:22

GoogleCodeExporter commented 9 years ago
@rvobict checked your Heron config and upgraded all external libs (ExtJS, 
GeoExt, OpenLayers, Heron) to their latest versions. There was another issue in 
the config related to WFS (some WFS options are deprecated in OL 2.12) which 
was a silent error in OL 2.11 and an explicit error in 2.12. I fixed this as 
well (as nothing indeed worked otherwise in OL 2.12). This is unrelated to the 
opacity issue.

Now the opacity defaults OK to 1 (with OL 2.12+Heron 0.70 or latest SVN). If I 
lower OpenLayers to 2.11  then opacities jump to zero again. So Wolfram is 
right: when using Heron 0.70 with ActiveLayers then OpenLayers 2.12 should be 
used. I am setting this issue to fixed.

Original comment by jus...@gmail.com on 20 Nov 2012 at 12:21