Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-25 Thread Lehtonen, Mika
Yep, I can confirm that there's probably a bug. I had a style with 'strokeWidth = 0', so I didn't see what happened. If I add some strokeWidth, I have same problem. And if you test, those points disappear after you have drawn a real polygon. - mika - Sture Dingsøyr kirjoitti: Hi Mika and

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-25 Thread Lehtonen, Mika
In addition, there's no problem if the strokeWidth is set to zero; triggering works. But after I add some, triggering stops working unless dragging has also taken place. - mika - Lehtonen, Mika kirjoitti: Yep, I can confirm that there's probably a bug. I had a style with 'strokeWidth = 0',

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-25 Thread Eric Lemoine
On Tue, Nov 25, 2008 at 8:49 AM, Sture Dingsøyr [EMAIL PROTECTED] wrote: Hi Mika and Eric...thanx for quick response :-) Have published an example on http://www.avinet.no/bugopenlayers/openlayers-2.7/examples/modify-feature.html Have added a control button to draw the regular polygon.

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-25 Thread Sture Dingsøyr
Hi Eric The patch worked just fine :-) Thanx alot... Will this patch be commited to the OpenLayers source, so that in e.g. version 2.8 this patch will be a part of the source code? Sture On Tue, Nov 25, 2008 at 8:49 AM, Sture Dingsøyr [EMAIL PROTECTED] wrote: Hi Mika and Eric...thanx for

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-25 Thread Sture Dingsøyr
Wery good :-) Just wanted to say thanxyou guys do an excelent job!!! Cheers Sture On Tue, Nov 25, 2008 at 11:24 AM, Sture Dingsøyr [EMAIL PROTECTED] wrote: Hi Eric The patch worked just fine :-) Thanx alot... Will this patch be commited to the OpenLayers source, so that in e.g.

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-25 Thread Eric Lemoine
On Tue, Nov 25, 2008 at 11:24 AM, Sture Dingsøyr [EMAIL PROTECTED] wrote: Hi Eric The patch worked just fine :-) Thanx alot... Will this patch be commited to the OpenLayers source, so that in e.g. version 2.8 this patch will be a part of the source code? Yes, this patch or another patch

[OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-24 Thread Sture Dingsøyr
Hi all Have made a control in OL that allows the user to draw a regular polygon. Have also added an event that uses the featureadded event. But...when the user only click in the map..a small polygon is drawed, but the event trigger is not fired.. If the user draws a larger polygon the trigger

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-24 Thread Lehtonen, Mika
Hej Sture, I have a little bit similar application and I am using the following event handler. It seems to be working just fine. vlayer.events.on({featureadded: offBuffer, featureunselected: offBuffer}); vlayer is the vector layer, offBuffer function for added feature event (+ for unselected

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-24 Thread Eric Lemoine
Hi. So I guess when the user just does clicks (without mousemove between down and up) the feature isn't added to the layer either, is that correct? Anyway it sounds to me that you've found a bug. Could you open a ticket for this, with an example or a link to reproduce the problem? Eric

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-24 Thread Eric Lemoine
Mika, Sture registers a listener on the draw feature control's featureadded event, not on the layer's. The former is triggered only when a feature is added as a result of feature drawn by the user through the draw feature control. The latter is triggered every time a feature is added to the

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-24 Thread Lehtonen, Mika
Ok, that's right. Sorry for mixing things up. Anyway the possible bug doesn't seem to be occuring in that latter method. - mika - Eric Lemoine kirjoitti: Mika, Sture registers a listener on the draw feature control's featureadded event, not on the layer's. The former is triggered only when

Re: [OpenLayers-Users] DrawFeature and FeatureAdded event

2008-11-24 Thread Sture Dingsøyr
Hi Mika and Eric...thanx for quick response :-) Have published an example on http://www.avinet.no/bugopenlayers/openlayers-2.7/examples/modify-feature.html Have added a control button to draw the regular polygon. ...if the user just clicks (no mouse movement between up and down) the feature