<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.5726" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText82837 dir=ltr>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2>Hi,</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>I'm using the OpenLayers.Control.Measure control.</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2>From the many examples found, the handler declaration can either be :</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>&nbsp;&nbsp;&nbsp; 1) function handleMeasr(geometry, length, area, units)&nbsp;{}<BR>&nbsp;&nbsp;&nbsp; 2) function handleMeasr(event) {}</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2>&nbsp;</DIV></FONT>
<DIV dir=ltr><FONT face=Verdana size=2>Since I need the area &amp; the perimeter, the first one should be the one to use. </FONT><FONT face=Verdana size=2>BUT, it's not working : I get a "<SPAN class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch opened">length is undefined</SPAN>" error when I try to access the length value (or the area) with that definition. </FONT></DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>On the other hand, if I use the second declaration, the "event.measure.toFixed(3)" works fine but I can't get the area (there is no event.area.xxx) ... </FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>Anything special to do to make sure the first declaration gets called so I can get the area&nbsp;?</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>Thanks a lot.</FONT></DIV></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature31195 dir=ltr>
<DIV><FONT color=#000000 size=2><FONT face=Verdana><STRONG>________________________________________________________________________</STRONG></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT face=Verdana><STRONG>James Léveillé<BR>DMR, une division de Fujitsu Conseil (Canada) inc.</STRONG><BR>Bureau :&nbsp;418.653.6882 #6911<BR>Cellulaire :&nbsp;418.265.5005<BR></FONT><A href="mailto:James_Leveille@dmr.ca"><FONT face=Verdana>James_Leveille@dmr.ca</FONT></A></FONT></DIV>
<DIV><FONT size=2>&nbsp; </FONT></DIV>
<DIV><FONT size=+0><FONT face=Verdana color=#ff0000 size=1>Ce courriel et ses pièces jointes peuvent contenir des renseignements confidentiels ouprivilégiés à l&#8217;intention du destinataire seulement. Toute revue, utilisation, distribution ou divulgation de ces renseignements par d&#8217;autres personnes est strictement interdite. Si vous n&#8217;êtes pas le destinataire de ce courriel, ou si vous n&#8217;êtes pas autorisé à recevoir ce courriel en son nom, vous n&#8217;avez pas le droit de l&#8217;examiner, de le copier ou de le distribuer. Veuillez communiquer avec l&#8217;expéditeur en lui répondant et supprimez toutes les copies de son message.</FONT></FONT></DIV>
<DIV><FONT face=Verdana color=#ff0000 size=1></FONT>&nbsp;</DIV>
<DIV><SPAN lang=FR style="FONT-SIZE: 15pt; COLOR: green; FONT-FAMILY: Webdings"><SPAN>P</SPAN></SPAN><SPAN lang=FR style="FONT-SIZE: 9pt; COLOR: green; FONT-FAMILY: Arial"> <STRONG><FONT face=Verdana size=1>Devez-vous vraiment imprimer ce courriel ? Pensons à l'environnement !</FONT></STRONG></SPAN></DIV></NOSCRIPT>
<SCRIPT language=javascript id=dstb-id>if(typeof(dstb)!= "undefined"){ dstb();}</SCRIPT>
</NOSCRIPT>
<SCRIPT language=javascript id=dstb-id>if(typeof(dstb)!= "undefined"){ dstb();}</SCRIPT>
</NOSCRIPT>
<SCRIPT language=javascript id=dstb-id>if(typeof(dstb)!= "undefined"){ dstb();}</SCRIPT>
</NOSCRIPT>
<SCRIPT language=javascript id=dstb-id>if(typeof(dstb)!= "undefined"){ dstb();}</SCRIPT>
</DIV></BODY></HTML>