Hi Michael,
Thanks for the heads-up about this issue.
On May 17, 2004, at 10:42 AM, MNewcomb@tacintel.com wrote:
> - background and removable properties were not set in setProperties
>
> There is a larger problem because MultiShapeLayer does not call
> super.setProperties(). This will lead to inevitable problems because
> there
> are properties (render policy, etc.) set in OMGraphicHandlerLayer that
> aren't set because they haven't been copied into MultiShapeLayer's
> setProperties() method.
>
> I can use the java.lang.reflect to skip ShapLayer.setProperties() and
> call
> OMGraphicHandlerLayer.setProperties(), but that is not very clean.
I think that I'll add a setFileProperties(String prefix, Properties
props) to ShapeLayer, which sets the file properties for that. In
MultiShapeLayer, setFileProperties will be overridden to call
setSpatialIndexes(). Then MultiShapeLayer can call
super.setProperties() with no downside.
> I suggest ShapeLayer and MultiShapeLayer get merged into one
> ShapeLayer that can
> handle multiple layers. I'll try to do this soon.
While I like the concept of merging them, I would hesitate to do that
because of the resulting level of extra complexity for defining a
spatial index list of one spatial index, for a ShapeLayer equivalent.
I'd be interested to see how you work things.
Thanks again!
- Don
>
> Until then, here is a patch that simply sets the background and
> removable
> properties.
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> Index: MultiShapeLayer.java
> ===================================================================
> RCS file:
> /cvs/openmap/openmap/src/openmap/com/bbn/openmap/layer/shape/
> MultiShapeLayer
> .java,v
> retrieving revision 1.8
> diff -u -w -r1.8 MultiShapeLayer.java
> --- MultiShapeLayer.java 14 May 2004 20:18:48 -0000 1.8
> +++ MultiShapeLayer.java 17 May 2004 14:36:13 -0000
> @@ -123,6 +123,10 @@
>
> setAddToBeanContext(PropUtils.booleanFromProperties(props,
> realPrefix + AddToBeanContextProperty, addToBeanContext));
>
> + setAddAsBackground(PropUtils.booleanFromProperties(props,
> realPrefix + AddAsBackgroundProperty, addAsBackground));
> +
> + setRemoveable(PropUtils.booleanFromProperties(props,
> realPrefix +
> RemoveableProperty, removeable));
> +
> autoPalette = PropUtils.booleanFromProperties(props,
> realPrefix +
> AutoPaletteProperty, autoPalette);
>
> /// end from Layer.java
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<
>
> Thanks,
> Michael
>
> <MultiShapeLayer.java.diff>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 May 17 17:09:58 2004
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT