Hi Tony,
This is problem with many of the resources. I've updated the code
and am releasing and SDK with fixes for the Bounding box issue... So
I think it isn't well tested at this point let me know how it goes.
Jesse
On Apr 16, 2007, at 7:27 AM, [EMAIL PROTECTED] wrote:
Hi list,
I create a resource (with "createTemporaryResource(featureType)")
and add some features to it. Then the layer is created and
everything is fine. Later I want to reuse this resource (and the
layer) and remove all features of this resource. Then I add new
Features to the (empty) resource but the resource's envelope isn't
updated. This means that the new features are added (I see this
when debuging) but the envelope of the resource still has the value
of the moment the resource was bound to a layer to a map and their
envelope. This means that the resource contains the new features
but they aren't showed on the map.
The resource is a MemoryGeoResource object which has a
ScratchResourceInfo object which contains a FeatureListener. This
Featurelistener calculates in void changed(...) (implemented method
of interface FeatureListener()) the new bounding box but this
method is never called when adding new features to the resource.
Which object do I have to add to which 'eventmanager' that this
method will be called?
I really hope that someone can help me. If I can't reuse my
resource due to this problem, I have to generate a new resource of
the same feature type which means to copy the feature type or write
my own memory memorydatastore (since the name of the feature type
is used for distinguish the resources).
Another problem with the envelope of a temporary layer:
The first time the resource (geometry: Point) is created, the Style
for this resource is set in such a way that an external graphic
(17x17 pixel) is shown. In my application the user can activate via
an action that an attribute of this feature is shown as a text
string next to the point in the map. If the user wants that, a
method changes the Style of this layer (confusing SLD stuff :-) and
the text is shown *but* this text is also clipped at a bounding
box /envelope containg the features of the resources. Therefore the
text of feature which lays at the right (eastern) edge of the
envelope of this resource is not shown since it would be outside
the envelope. Even if the user zooms out (that there would be
enough space on the map, which as another (larger) envelope).
I tested this behaviour with udig standalone (1.1RC9) and there is
the same problem: When you create a new temporary layer and add a
attribute which you can show in the map via changing the style of
the layer, then this text is not shown if the feature is the
topmost or near the right (eastern) edge.
tony roth
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel