justb4 / geoext-viewer

Automatically exported from code.google.com/p/geoext-viewer
GNU General Public License v3.0
0 stars 0 forks source link

Measure tools give incorrect values for geodesic projections #90

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a heron config with measure tools in EPSG:90013 (Google projection)
2. use the measure tool e.g. on a well knwon distance 
3. observe that the value is incorrect

This is a well-knwon issue and described in this blog:
http://geographika.co.uk/watch-out-for-openlayer-distances

The solution is to make the toolbar measure items configurable for the option 
"geodesic: true". Although some toolbar items are configurable already, this is 
not the case for the tools measurelength and measurearea. We should be able to 
configure something like:

    Heron.options.map.toolbar = [
    {type: "featureinfo", options: {max_features: 20}},
    {type: "-"} ,
    {type: "pan"},
    {type: "zoomin"},
    {type: "zoomout"},
    {type: "zoomvisible"},
    {type: "-"} ,
    {type: "zoomprevious"},
    {type: "zoomnext"},
    {type: "-"},
    {type: "measurelength", options: {geodesic: true},
    {type: "measurearea"}, options: {geodesic: true}
    ];

Original issue reported on code.google.com by jus...@gmail.com on 11 Jun 2012 at 4:20

GoogleCodeExporter commented 9 years ago
Created after email from Aris Dimopoulos:

"Hi to all,

First of all I'm new to the Heron and very impressed by the simplicity
and functionality, thanks for the good work. My problem is that the
both tools area and distance give false outputs. my file is:

https://dl.dropbox.com/u/1039317/heron/heron-0.67/examples/default/index_1.html
and
https://dl.dropbox.com/u/1039317/heron/heron-0.67/lib/2012-01_enteka_options.js

and I'm pretty sure it is connected to the maxExtent values that are
used in order to have the service "ktimatologio"
http://gis.ktimanet.gr/wms/wmsopen/WmsServer.aspx
displayed properly.

Thanks
Aris"

Original comment by jus...@gmail.com on 11 Jun 2012 at 4:21

GoogleCodeExporter commented 9 years ago
Fixed: geodesic: true|false is now a config option for the measure tools
See also the Google Maps example.

Original comment by jus...@gmail.com on 12 Jun 2012 at 2:00