Original User: jwnielsenI was trying to get a mapservice to show the Area of a polygon in my map thru the REST url. In my Arcmap document i have the following setup to calculate the polygon area to Acres and to then calculate it to Sq Miles.formatnumber( [SHAPE.STArea()] /43560,2,-1,-1,-1) & " acres" & vbNewLine & formatnumber( [SHAPE.STArea()] /27878400,2,-1,-1,-1) & " square miles"
In arcmap it displays correctly. Please see the attached image.[ATTACH=CONFIG]16429[/ATTACH]When i go to my map in flexviewer and zoom to the feature the labeling doesn't show up and sometimes the polygon themselves will disappear from the map. I know if i remove the above labeling from the polygons, they return but i really would like to have a label displaying on the screen. As these polygons can change quickly i can't constantly calculate geometries in another field. My other idea was to not label the polygons on the map but just calculate the Acres and Sq miles in the Popup for this mapservice. I can put in the {SHAPE.STArea()} in the popup and i can get that value to display in the popup but i want to perform some calculations to the number before it is displayed.[ATTACH=CONFIG]16430[/ATTACH]Is it possible to perform a calculation on a value in XML before it is displayed in the Popup window for that feature? Or any other workarounds that might give me the results i'm looking for.Thanks.