[OpenMap Users] turning on layers that are not added?

From: Ben Podoll <benjamin.podoll@und.edu>
Date: Mon Aug 02 2004 - 22:04:38 EDT

When my button is clicked it runs this code:

myMethod(String layerName){
  status = !status;
  Layer tempLayer = (Layer)basicMapPanel.getMapComponent(layerName);
  System.out.println(tempLayer);
  tempLayer.setVisible(status);
}

This works great for the layers that are on by default (i.e. setup in my
openmap.properties file to be on when the application loads)

I can turn layers on and off with the above code.

BUT, when I try it with layers that are not on it doesn't do anything. But I
see it is getting the correct layer object via my verbosity...

So how do I add the layer to the basicMapPanel?

How do I get a hold of the layerHandler?

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Aug 2 22:05:19 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:39 EDT