Hello,

we have built a widget that replaces some of the functionality provided by the LayersView. It's basically a combo box with the current layers, and which sets the visibility for all layers to be false, except the one chosen by the combo. Furthermore, on selecting, the map should zoom to the layer's bbox. Like this (in pseudo):

1) User selects layer on combo?
2) for each layer
  if layer is not selected layer -> setVisible( false )
  else setVisible( true )

map refreshes here!

3) map.setBbox( selectedLayer.getBbox() )

map refreshes again!

This all works fine. However, there are two events (or more) being triggered: layer visibility (implies a map refresh), jump to bbox (another map refresh).

Is there a way to temporarily disable map refresh? As in

1) map.setFiringEvents( false );
2) Turn layers' visibility on/off
3) map.setBbox( selectedLayer.getBbox() )
4) map.setFiringEvents( true );
5) map.refresh()

Thanks in advance,

Ugo

--
Ugo Taddei

Fraunhofer Institut Intelligente Analyse- und Informationssysteme (FhG IAIS)
http://www.iais.fraunhofer.de
Department Knowledge Discovery - IAIS.KD -
Working Group Spatial Decision Support
http://www.iais.fraunhofer.de/kd.html
phone  (+49)2241-14-2184    fax    (+49)2241-14-2072
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to