[OpenLayers-Trac] [OpenLayers] #1148: ModifyFeature should set an attribute on the points it inserts
OpenLayers
trac at openlayers.org
Wed Dec 5 04:03:54 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 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.
--
Ticket URL: <http://trac.openlayers.org/ticket/1148#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list