[OpenLayers-Trac] Re: [OpenLayers] #2834: Panel control: Allow to use "autoActivate" in the panel's controls.

OpenLayers trac-20090302 at openlayers.org
Thu Sep 23 14:52:21 EDT 2010


#2834: Panel control: Allow to use "autoActivate" in the panel's controls.
---------------------------+------------------------------------------------
 Reporter:  jorix          |       Owner:                 
     Type:  feature        |      Status:  new            
 Priority:  minor          |   Milestone:  2.11 Release   
Component:  Control.Panel  |     Version:  2.10           
 Keywords:                 |       State:  Needs More Work
---------------------------+------------------------------------------------

Comment(by jorix):

 An example of behavior that should have panel:
 {{{
 var measurePanel = new OpenLayers.Control.Panel({useAutoActivate:true});
 measurePanel.addControls([
     new
 OpenLayers.Control.Measure(OpenLayers.Handler.Path,{eventListeners:
 {...}}),
     new OpenLayers.Control.Graticule({type:
 OpenLayers.Control.TYPE_TOGGLE}) // to help measure
 ]);
 var nav = new OpenLayers.Control.Navigation;

 var panel = new OpenLayers.Control.Panel({defaultControl: nav});
 panel.addControls([nav, measurePanel]);

 map.addControl(panel);
 }}}
 in this case "Graticule" should only be displayed when the user has
 activated the "measurePanel" (default value of "autoActivate" for
 "Graticule" is true),[[BR]]
 and this will happen after "measurePanel" has been added to the map by
 "map.addControl(panel);"

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2834#comment:10>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list