[OpenLayers-Trac] [OpenLayers] #1148: ModifyFeature should set an attribute on the points it inserts
OpenLayers
trac at openlayers.org
Wed Dec 5 04:25:51 EST 2007
#1148: ModifyFeature should set an attribute on the points it inserts
-------------------------+--------------------------------------------------
Reporter: openlayers | Owner:
Type: feature | Status: new
Priority: minor | Milestone:
Component: general | Version: 2.5
Resolution: | Keywords:
-------------------------+--------------------------------------------------
Comment (by fredj):
Replying to [comment:2 tschaub]:
> Hmm, that's anoying. The idea with point, path, poly handlers is that
they were "sketch" handlers - they wrapped up what happened when creating
new features. It does sort of make sense to give the modify feature
control a sketch handler or something similar. We'll still run in to
issues if we start getting fancy with layer events (like I think we
should). Say someone is listening for "featureerased" on a vector layer.
Then when modification starts, if we use a temp sketch layer (controlled
by a sketch handler or something), then we'd want to erase the feature on
the real layer and draw it on the temp layer. Whomever is listening might
get confused by that "featureerased" event. So, we'll want to add a
"silent" or "noEvent" option to things like eraseFeatures. All that makes
me think we should add the same sort of option to addFeatures.
>
> That is certainly the easiest course. What do you think about this
signature for the vector layer addFeatures:
>
> layer.addFeatures(/* Array */ features, /* Object */ options)
>
> Called with options.silent set to true, addFeatures would not trigger
the insert notification stuff.
Does the modified geometry really needs to be removed from the original
layer ?
If we only copy it to the tmp layer, the original geometry will be visible
in the background and it could improve the tool usability.
But I certainly miss other issues that ca be resolved by your proposal.
A other possibility is to copy the maps.google modify feature behavior:
create a tmp layer to display a linestring representing the current
modification.
--
Ticket URL: <http://trac.openlayers.org/ticket/1148#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list