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

From: Ben Podoll <benjamin.podoll_at_und.edu>
Date: Mon, 2 Aug 2004 21:04:38 -0500

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_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Aug 02 2004 - 22:05:19 EDT

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