Bugs: Pecualir Client-Side Measuments with GeodesicUtils

1256
8
02-05-2014 12:38 PM
DerivenC
New Contributor II
Sample here: http://jsfiddle.net/wZjXz/7/  , a modified version of this sample.

Three bugs I believe exist here:

1) Areas and lengths between GeodesicUtils and GeometryService are off in general.  Areas seem to be off by 2x between client GeodesicUtils and server GeometryService.

2) On Windows 8 Chrome (latest commercial build), area does not work at all.

3?) Looking at the javascript from the API and using JSLint against it, there are several areas without semi-colons.  Also there is a global "b" variable that might be causing issues?

edit .. 4 bugs .. Windows 8 Chrome calls GeometryService twice?

See attached images for test results.

1st image: windows 7 chrome browser
2nd image: windows 7 firefox browser
3rd image: windows 8 chrome browser
0 Kudos
8 Replies
by Anonymous User
Not applicable
Original User: Jian

This is not a bug.
The service calculates the planar area/length while client side computes the geodesic ones. The geometry service in this sample is an old one. Newer version supports geodesic calculation. I will suggest to remove this misleading sample.
In general, geodesic results are correct.
Please take a look at this thread:
http://forums.arcgis.com/threads/101574-Buffer-distance-not-correct
0 Kudos
DerivenC
New Contributor II
edit: removed .. I was being rude
0 Kudos
by Anonymous User
Not applicable
Original User: Jian

I read the whole thing. Just want to answer the separate issue in a different post.
The two geometry service calls are different. One is to simplify the geometry, another one is the calculation.
I need to test with windows8 to see why the browser shows the result twice.
0 Kudos
DerivenC
New Contributor II
Right on. Yeah only in the sample did I see big differences between client-side and server-side values.  My commercial code gives correct acreage.

Thanks for checking into it.  If we didn't have clients using Windows 8, I really would not care.  But you know how that goes.

I ran more tests on Windows 8...

* Firefox (latest version) does not return NaN for area.
* Internet Explorer 11 does not return NaN for area.

Getting the area using client-side GeodesicUtils in Windows 7 works on all browsers.
0 Kudos
by Anonymous User
Not applicable
Original User: Jian

When I say this is not a bug. I mean geomdesicUtils gives the correct result. At the same time, the result generated by geometry service is also correct since it's using planar. They have different meanings so the results are different. The real 'bug' is the sample doesn't make it clear.
0 Kudos
DerivenC
New Contributor II
Fair enough.  Next time I won't put "Bug" in the title.  Should've stuck with "Peculiar".

The more I think about it, the more I believe this is a Google Chrome issue...  Works on all other browsers that I've tested.
0 Kudos
DerivenC
New Contributor II
The more I think about it, the more I believe this is a Google Chrome issue...  Works on all other browsers that I've tested.
0 Kudos
DerivenC
New Contributor II
Tested in Chrome and it works now.  Jian, did you make any changes to 3.8 to fix this?  I still believe this was a Chrome issue.  Because I also see floating point errors from other libraries that work fine in Firefox.  Mainly webGL stuff.  Just curious if you needed to do anything on your end.
0 Kudos