One possible method would be to grab the object you drew and pass it back to a server where the calculations can be done and then return the results back to the browser.<br clear="all">--<br>Nathan Gerber<br>
<br><br><div class="gmail_quote">On Thu, Sep 24, 2009 at 9:06 AM, Tim Balschmiter <span dir="ltr">&lt;<a href="mailto:tb.rostock@googlemail.com">tb.rostock@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for these answer, but that idea does not work.<div>this is my map options:</div><div><div>  function createMap() {</div><div>            map = new OpenLayers.Map(&quot;map&quot;,{geodesic: true,projection: &quot;EPSG:2398&quot;,controls:[],scales:[442943842.5,221471921.25,110735960.625,55367980.3125,27683990.15625,13841995.078125,6920997.5390625, 3460498.76953125, 1730249.384765625,865124.6923828125, 432562.34619140625, 216281.17309570312, 108140.58654785156,</div>

<div>                    54070.29327392578, 10000.0, 5000.0,1000.0],maxExtent: new OpenLayers.Bounds(4504884.5,5997999.5,4506172.5,5999757.5)});</div><div>            return map;</div><div>        }</div><div>        </div>

<div>and that my new measure options:</div><div><br></div><div><div class="im"><div>  var measureOptions = {</div><div><span style="white-space: pre;">                                        </span>  handlerOptions : {</div><div><span style="white-space: pre;">                                        </span>    style :&quot;default&quot;,</div>

<div><span style="white-space: pre;">                                                </span>  persist :true,</div></div><div><span style="white-space: pre;">                                                </span>  projection: &quot;EPSG:2398&quot;,</div><div><span style="white-space: pre;">                                                </span>  geodesic: true</div>

<div><span style="white-space: pre;">                                        </span>}</div><div><span style="white-space: pre;">                                </span>}</div></div><br><div class="gmail_quote">2009/9/24  <span dir="ltr">&lt;<a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank">Steve.Toutant@inspq.qc.ca</a>&gt;</span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><font face="sans-serif" size="2">Hi,<br>
Try to add geodesic: true as an option.</font>
<br><font face="sans-serif" size="2">Is </font><font size="3">EPSG:2398</font><font face="sans-serif" size="2">,
the projection defined in the option of the map object?</font>
<br><font size="3">Steve</font>
<br>
<p>
<br>
<br>
<br>
</p><p></p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>Tim Balschmiter &lt;<a href="mailto:tb.rostock@googlemail.com" target="_blank">tb.rostock@googlemail.com</a>&gt;@<a href="http://openlayers.org" target="_blank">openlayers.org</a></b>
</font>
<br><font face="sans-serif" size="1">Envoyé par : <a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a></font>
<p><font face="sans-serif" size="1">24/09/2009 02:17 AM</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">A</font></div>
</td><td><font face="sans-serif" size="1"><a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Objet</font></div>
</td><td><font face="sans-serif" size="1">[OpenLayers-Users] measure with 2398</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br>
<br>
<br>
<br>
<br><font size="3">Hello list, i am using the measure-option, but i get wrong
 distance, if i am using projection 2398.</font>
<br><font size="3">What can i do to get the right values?!</font>
<br><font size="3">thanks for helping me</font>
<br><font size="3">tim</font>
<br><font size="3">code:</font>
<br>
<br><font size="3">var measureOptions = {</font>
<br><font size="3"> handlerOptions : {</font>
<br><font size="3">   style :&quot;default&quot;,</font>
<br><font size="3"> persist :true,</font>
<br><font size="3"> projection: &quot;EPSG:2398&quot;</font>
<br><font size="3">}</font>
<br><font size="3">}</font>
<br><font size="3">var lineMeasure = new OpenLayers.Control.Measure(</font>
<br><font size="3">OpenLayers.Handler.Path, measureOptions);</font>
<br><font size="3">var polygonMeasure = new OpenLayers.Control.Measure(</font>
<br><font size="3">OpenLayers.Handler.Polygon, measureOptions);</font>
<br>
<br><font size="3">lineMeasure.events.on( {</font>
<br><font size="3">&quot;measure&quot; :handleDistanceMeasurements,</font>
<br><font size="3">&quot;measurepartial&quot; :handleDistanceMeasurements</font>
<br><font size="3">});</font>
<br><font size="3">polygonMeasure.events.on( {</font>
<br><font size="3">&quot;measure&quot; :handleAreaMeasurements,</font>
<br><font size="3">&quot;measurepartial&quot; :handleAreaMeasurements</font>
<br><font size="3">});</font>
<br>
<br><font size="3">function handleAreaMeasurements(event) {</font>
<br><font size="3">var units = event.units;</font>
<br><font size="3">var measure = event.measure;</font>
<br><font size="3">var element = document.getElementById(&#39;messung&#39;);</font>
<br><font size="3">var out = &quot;&quot;;</font>
<br><font size="3">out += &quot;Fläche: &quot; + measure.toFixed(3) + &quot;
&quot; + units</font>
<br><font size="3">+ &quot;&lt;sup&gt;2&lt;/sup&gt;&quot;;</font>
<br><font size="3">element.innerHTML = out;</font>
<br><font size="3">}</font>
<br><font size="3">function handleDistanceMeasurements(event) {</font>
<br><font size="3">          var units = event.units;</font>
<br><font size="3">var measure = event.measure;</font>
<br><font size="3">var element = document.getElementById(&#39;messung&#39;);</font>
<br><font size="3">var out = &quot;&quot;;</font>
<br><font size="3">out += &quot;Distanz: &quot; + measure.toFixed(3) + &quot;
&quot; + units;</font>
<br><font size="3">element.innerHTML = out;</font>
<br><font size="3">};</font><tt><font size="2">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</font></tt>
<br>
<br>
<br><p></p></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>