[Users] LayerOpacitySlider doesn't work inside MapPanel

Dirk Tanneberger dirk.tanneberger at unibas.ch
Tue May 25 15:37:16 CEST 2010


Am 21.05.2010 13:30, schrieb Eric Lemoine:
> On Wed, May 19, 2010 at 10:42 AM, Dirk Tanneberger
> <dirk.tanneberger at unibas.ch>  wrote:
>    
>> 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?
>>      
> It works in<http://dev.geoext.org/trunk/geoext/examples/layeropacityslider.html>.
> Could you provide a full example showing the problem? (an html file I
> could just drop in my GeoExt examples dir would be great). Thanks,
>
>
>
>
>    

Found the problem myself. It was just an unvisible container, which 
overlayed the slider.
merci again for the help.

greets dirk.



More information about the Users mailing list