Select to view content in your preferred language

Elevation Services (SOEs)

816
3
11-02-2011 05:13 AM
CHRISTOSCHARMATZIS
Deactivated User
Hi,
I am a geologist and I trying to develop an application with silverlight. I want to use the elevation examples from SOEs but I can't work out the code.
1) why the Data Contract from SOEs (http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SOEElevationLatLonDataContract) doesn't work and every point has elevation 0 meters.
2) I want to use the "GetElevations" from SOEs , but every geometry I use, I get "400 error". Could please someone write an example that works?
Thank you !
Christos Charmatzis
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
1) why the Data Contract from SOEs (http://help.arcgis.com/en/webapi/sil...onDataContract) doesn't work and every point has elevation 0 meters.
2) I want to use the "GetElevations" from SOEs , but every geometry I use, I get "400 error".


There is a known issue in the sample when the decimal separator is not '.' (dot).
What is your decimal separator?

Could please someone write an example that works?


To fix the decimal separator issue, add the InvariantCulture option when generating the Url:

e.g. :
SOEurl += string.Format(System.Globalization.CultureInfo.InvariantCulture, "?lon={0}&lat={1}&f=json", geographicPoint.X, geographicPoint.Y);
0 Kudos
CHRISTOSCHARMATZIS
Deactivated User
Thank you for the reply,
But now there is one other problem, I used the code you attached and now every map_click gives "-4237 meters" result, hahahahaha!!!!!!

About the "the decimal separator" I believe I use the "." (dot), however why the "GetElevations" from SOEs ,gives "400 error"?
Could you write one example that works?

THANK YOU AGAIN.
CHRISTOS CHARMATZIS
0 Kudos
DominiqueBroux
Esri Frequent Contributor
If you use the dot as decimal separator, I don't understand what happens.
The code I provided should not change anything.

I suggest you use fiddler to look at the requests sent to the server. This may give a clue.

Concerning 'GetElevations' sample, it's the same kind of fix (if it's a decimal separator issue), i.e. :

SOEurl += string.Format(System.Globalization.CultureInfo.InvariantCulture, ........
0 Kudos