[OpenLayers-Users] RE measure with 2398

Nathan Gerber ngerber999 at gmail.com
Thu Sep 24 09:39:41 EDT 2009


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.
--
Nathan Gerber


On Thu, Sep 24, 2009 at 9:06 AM, Tim Balschmiter
<tb.rostock at googlemail.com>wrote:

> Thanks for these answer, but that idea does not work.this is my map
> options:
>   function createMap() {
>             map = new OpenLayers.Map("map",{geodesic: true,projection:
> "EPSG:2398",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,
>                     54070.29327392578, 10000.0, 5000.0,1000.0],maxExtent:
> new OpenLayers.Bounds(4504884.5,5997999.5,4506172.5,5999757.5)});
>             return map;
>         }
>
> and that my new measure options:
>
>   var measureOptions = {
>   handlerOptions : {
>     style :"default",
>   persist :true,
>   projection: "EPSG:2398",
>   geodesic: true
>  }
> }
>
> 2009/9/24 <Steve.Toutant at inspq.qc.ca>
>
>
>> Hi,
>> Try to add geodesic: true as an option.
>> Is EPSG:2398, the projection defined in the option of the map object?
>> Steve
>>
>>
>>
>>
>>  *Tim Balschmiter <tb.rostock at googlemail.com>@openlayers.org*
>> Envoyé par : users-bounces at openlayers.org
>>
>> 24/09/2009 02:17 AM
>>   A
>> Users at openlayers.org  cc
>>   Objet
>> [OpenLayers-Users] measure with 2398
>>
>>
>>
>>
>>
>>
>> Hello list, i am using the measure-option, but i get wrong  distance, if i
>> am using projection 2398.
>> What can i do to get the right values?!
>> thanks for helping me
>> tim
>> code:
>>
>> var measureOptions = {
>>  handlerOptions : {
>>    style :"default",
>>  persist :true,
>>  projection: "EPSG:2398"
>> }
>> }
>> var lineMeasure = new OpenLayers.Control.Measure(
>> OpenLayers.Handler.Path, measureOptions);
>> var polygonMeasure = new OpenLayers.Control.Measure(
>> OpenLayers.Handler.Polygon, measureOptions);
>>
>> lineMeasure.events.on( {
>> "measure" :handleDistanceMeasurements,
>> "measurepartial" :handleDistanceMeasurements
>> });
>> polygonMeasure.events.on( {
>> "measure" :handleAreaMeasurements,
>> "measurepartial" :handleAreaMeasurements
>> });
>>
>> function handleAreaMeasurements(event) {
>> var units = event.units;
>> var measure = event.measure;
>> var element = document.getElementById('messung');
>> var out = "";
>> out += "Fläche: " + measure.toFixed(3) + " " + units
>> + "<sup>2</sup>";
>> element.innerHTML = out;
>> }
>> function handleDistanceMeasurements(event) {
>>           var units = event.units;
>> var measure = event.measure;
>> var element = document.getElementById('messung');
>> var out = "";
>> out += "Distanz: " + measure.toFixed(3) + " " + units;
>> element.innerHTML = out;
>> };_______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090924/8ab4f34a/attachment.html


More information about the Users mailing list