[Users] LayerOpacitySlider doesn't work inside MapPanel

Dirk Tanneberger dirk.tanneberger at unibas.ch
Wed May 19 11:42:10 CEST 2010


Hi together,

I'm trying to use a LayerOpacitySlider directly as an item of a 
MapPanel. The problem is, it doesn't work. The Slider renders on to the 
map, but I can't move the button of the slider.

The code looks like that:

         mapPanel: new GeoExt.MapPanel({
                 id: 'mapPanel',
                 x: 20,
                 y: 120,
                 anchor: '100% -20',
                 //border: false,
                 map: map,
                 layers: layers,
                 center: [844774, 6033921],
                 zoom: 15,
                 items: [{
                     xtype: "gx_zoomslider",
                     aggressive: true,
                     vertical: true,
                     height: 200,
                     x: 10,
                     y: 20,
                     plugins: new GeoExt.ZoomSliderTip({
                         template: "Scale: 1 : {scale}",
                         offsets: [60, 40]
                     })
                 },{
                     xtype: 'gx_opacityslider',
                     aggressive: true,
                     width: 150,
                     x: 500,
                     y: 10,
                     layer: googleTLayer
                 }]
         })


The ZoomSlider works just fine, even though it's implemented in the same 
way. When I put the OpacitySlider outsight of the MapPanel it also 
works, but not inside.
Anybody an idea?

thanks very much.
Greets, Dirk.



More information about the Users mailing list