[OpenLayers-Users] editingtoolbar - adding a new control...

John Cole john.cole at uai.com
Fri Jun 1 08:27:17 EDT 2007


Thanks for the quick response Christopher,
  I've already tried adding the 'featureAdded' control (similar to the WFS-T
example). But that didn't ever fire; that confused me a great deal, as I
expected it to work.

  We also tried creating a new control using the handler, but again I'm not
familiar enough with the object model yet to get the events piped up
correctly.  I know enough to see that this should be very simple, but I'm
missing the secret incantation to get it working :-)

  If you or Tim could show me how to drop a simple hello world alert when
the path tool finishes drawing, that would be a great help.  I'm pretty sure
we can take it from there.

Thanks!

John

-----Original Message-----
From: Christopher Schmidt [mailto:crschmidt at metacarta.com] 
Sent: Thursday, May 31, 2007 4:26 PM
To: John Cole
Cc: openlayers
Subject: Re: [OpenLayers-Users] editingtoolbar - adding a new control...

On Thu, May 31, 2007 at 03:44:31PM -0500, John Cole wrote:
> Ok, I've been tracing the objects and I'm a little confused :-)
> 
> I'd like to take the editingtoolbar control, add another tool like the
path
> tool, and capture the event so I can calculate the length of the geometry
> (eg a measure tool).
> 
> What I'm having a problem with is how to hook up a function to capture the
> 'done' event raised by the DrawFeature class.

You actually probably want to be doing one of two things:
 * Using the 'featureAdded' method on the DrawFeature Control
 * Creating a different control using the Path/Point/Poly handler. 

Tim Schaub might be able to offer more insight.

Regards,
-- 
Christopher Schmidt
MetaCarta

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.4/825 - Release Date: 5/30/2007
3:03 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.6/827 - Release Date: 6/1/2007 9:54
AM
 
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the Users mailing list