[OpenLayers-Users] Modify feature Before insert from DrawFeature Control

Bart van den Eijnden bartvde at opengeo.org
Wed Sep 19 05:54:31 PDT 2012


Then try the sketchcomplete event on the layer instead.

Best regards,
Bart

-- 
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.



On Sep 19, 2012, at 2:51 PM, Mark Paxton <mark at innaxys.com> wrote:

> Hi, thanks for getting back to me so quickly!
> 
> On 19/09/2012 13:40, Bart van den Eijnden wrote:
>> How about using the beforefeatureadded event of OpenLayers.Layer.Vector?
> The problem is this is fired when I load data from my HTTP protocol as well as through DrawFeature.  My workaround-in-progress is to check if the desired properties are already set or not, but there should be a nicer way I'm sure!
> 
> Mark
> 
>> Best regards,
>> Bart
>> 
>> -- 
>> Bart van den Eijnden
>> OpenGeo - http://opengeo.org
>> Expert service straight from the developers.
>> 
>> 
>> 
>> On Sep 19, 2012, at 2:37 PM, Mark Paxton <mark at innaxys.com> wrote:
>> 
>>> Hello,
>>> 
>>> Please may I ask some advice on the following:
>>> 
>>> I would like to set properties on a feature when inserted from a
>>> DrawFeature control. At the moment I use the 'featureAdded' event on
>>> Control.DrawFeature, however the 'beforeFeatureAdded' event should be
>>> what I need as I am setting properties for the style, etc.  How can I
>>> achieve this without havingt o create a new layer?
>>> 
>>> Thanks
>>> Mark
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120919/ef947f33/attachment.html>


More information about the Users mailing list