[OpenMap Users] Preventing a layer from being displayed in the LayersMenu

From: Graham, John <j.graham_at_ngc.com>
Date: Tue, 4 Dec 2007 13:34:17 -0600

LayersMenu displays a list of layers on the map with checkbuttons to
add/remove the named layer to/from the map.
Assuming a layer is already known by the LayerHandler, LayersMenu
essentially calls LayerHandler.turnLayerOn to toggle the map layer
display.

I have a situation where I want to be able to toggle a layer on/off from
one of my own menus (with specialized properties based on a
JRadioButtonMenuItem selection), and I don't want the layer to be listed
in the layers menu. If I add the layer to the MapHandler using
MapHandler.add, this ends up adding the layer to the LayersMenu.

In other words, I want to be able to turn a layer on and off but I don't
want the user to be able to do this from the LayersMenu. Is there an
easy way to prevent a layer from being displayed in the LayersMenu?

Thanks,
John


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Dec 04 2007 - 14:35:31 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT