Solved! Go to Solution.
When configuring the Elevation Profile widget for ArcGIS Viewer for Flex 3.x to use feet (rather than meters), the graph's y-axis still shows numbers that are obviously meters even though they are labled as feet. Does anyone have a solution for this problem?
I have also noticed the distance measurement (x-axis) looks correct but is off slightly, but I am chalking that one up to Web Mercatur.
Thanks,
-Dan
When configuring the Elevation Profile widget for ArcGIS Viewer for Flex 3.x to use feet (rather than meters), the graph's y-axis still shows numbers that are obviously meters even though they are labled as feet.
Do you have access to the source code or are you working with the compiled version?
What configuration changes did you do? Just the label or also the multiplyByToConvertFromMeters tag?
<multiplyByToConvertFromMeters>3.2808399</multiplyByToConvertFromMeters>
<unitsAndLabeling> <elevation> <label> <chart>feet</chart> <dataTip>ft</dataTip> </label> <multiplyByToConvertFromMeters>3.2808399</multiplyByToConvertFromMeters> </elevation> <distanceAlongPath> <label> <chart>miles</chart> <dataTip>mi</dataTip> </label> <multiplyByToConvertFromMeters>0.000621371192</multiplyByToConvertFromMeters> </distanceAlongPath> </unitsAndLabeling>
A problem occurred while parsing and charting the returned elevation data:
Error #1010: A term is undefined and has no properties.
/**
* Given the result set of geometries with z-values, produce a new single-dimensional array
* of elevation values. These will eventually be mixed into the location and distance
* array for display in the chart.
* @param oResult: The result object returned from the call to the elevation SOE.
* @param nFromMeters: Factor to multiply by meters to get desired elevation units
* @return A single-dimensional array of elevation values (order unchanged from the
* original 2-d array)
**/
function elevations( oResult:Object, nFromMeters:Number ):Array {
var aryElevations:Array = new Array();
// for ( var iElevationSet:int = 0; iElevationSet < oResult.elevations.length; iElevationSet++ ) {
// var aryElevationSet:Array = oResult.elevations[ iElevationSet ];
// for ( var iElevation:int = 0; iElevation < aryElevationSet.length; iElevation++ )
// aryElevations.push( aryElevationSet[ iElevation ] * nFromMeters );
// }
// For each geometry returned...
for ( var iGeom:int = 0; iGeom < oResult.geometries.length; iGeom++ ) {
var oGeom:Object = oResult.geometries[ iGeom ];
// For each path in each geometry...
for ( var iPath:int = 0; iPath < oGeom.paths.length; iPath++ ) {
var aryPath:Array = oGeom.paths[ iPath ];
// For each point in each path...
for ( var iPt:int = 0; iPt < aryPath.length; iPt++ ) {
var ptCurrent:Array = aryPath[ iPt ];
aryElevations.push( ptCurrent[ 2 ] );
}
}
}
return aryElevations;
}