[OpenMap Users] RE: remove a layer (via MapBean)

From: Ben Podoll <benjamin.podoll_at_und.edu>
Date: Mon, 2 Aug 2004 20:50:06 -0500

This seems to work:

Layer countiesLayer =(Layer)basicMapPanel.getMapComponent("usCounties");
countiesLayer.setVisible(false);

> -----Original Message-----
> From: OpenMap Support [mailto:openmap_at_bbn.com]
> Sent: Monday, August 02, 2004 8:22 PM
> To: Ben Podoll
> Cc: openmap-users_at_bbn.com
> Subject: Re: remove a layer (via MapBean)
>
> Tell the LayerHandler, not the MapBean.
>
> - Don
>
> On Aug 2, 2004, at 7:45 PM, Ben Podoll wrote:
>
> > I have a BasicMapPanel and I have my openmap.properties file display
> > states,
> > counties and river.
> >
> > Now that the application is up and running I want to use a custom
> > button to
> > turn on/off layers.
> >
> > The MapBean javadocs make it sound like I can turn on/off a layer via
> > it's
> > methods. They say to use the remove() and add() methods...
> >
> > But I don't see how I can get at the layers?
> > basicMapPanel.getMapBean().remove(0);
> >
> > I was hoping there was a method like:
> > basicMapPanel.getMapBean().removeLayer("us_counties");
> >
> > Or better yet:
> > basicMapPanel.getMapBean().getLayer("us_counties").setVisible(false);
> >
> > Is there something like this at my finger tips since I can get at the
> > MapBean?
> >
> > ~Ben
> >
> >
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, dietrick_at_bbn.com
> BBN Technologies, Cambridge, MA
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[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 - 21:51:13 EDT

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