Re: [OpenMap Users] changing buffered shape layer properties

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 29 Jul 2005 18:15:45 -0400

Hi Chuck,

On Jul 29, 2005, at 9:21 AM, Vincent, Chuck wrote:

> I need the ability to change the Properties of a BufferedShapeLayer
> and have the MapBean redraw. Particularly, I need that ability to
> change the shapeFile property to reflect different user selected data.

The easiest thing to do is create a new SpatialIndex object with the
new shape file, and then set that on the layer. You'll want to call
setList(getWholeWorld()) on the BufferedShapeLayer, too after
resetting the SpatialIndex property.

You can also set the new file by creating a new set of properties and
calling setProperties on the layer.

> I have tried to create a new BufferedShapeLayer and adding it to
> the MapBean [mapBean.add(myBShapeLayer)] am I missing a command to
> redraw? Do I have to do something special before adding the new
> layer?

No, if it's configured correctly, it should render.

- Don

--
[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 Fri Jul 29 2005 - 18:19:25 EDT

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