Prevent IdentifyTask from rounding values?

695
2
02-23-2011 10:08 AM
JenniferStrahan
New Contributor
Hi,

I'm running an IdentifyTask on the following layer:
http://207.114.175.57/ArcGIS/rest/services/Lake_Region_Greenprint_Map/MapServer/2

When I get the results back from the identify, I find that all of the fields that are esriFieldTypeSingle return rounded values.  For example, if a value is .4023 in the attribute table, the IdentifyTask returns 0.   If I run a QueryTask on the same layer, the values are not rounded.  The fields that are type esriFieldTypeDouble are not rounded in the IdentifyTask results, so it seems the issue is with the field type.

I've asked the people who generated the parcel layer to make sure that all fields are set to type esriFieldTypeDouble.  They've responded that the table is generated from a number of different sources (including several joins to dbf tables) and that ArcGIS seems to be choosing type single for them when they do the joins.

Can anyone suggest how to resolve this?  Is there a way to prevent the IdentifyTask from rounding the values?

Thanks,
Jennifer
2 Replies
HemingZhu
Occasional Contributor III
Hi,

I'm running an IdentifyTask on the following layer:
http://207.114.175.57/ArcGIS/rest/services/Lake_Region_Greenprint_Map/MapServer/2

When I get the results back from the identify, I find that all of the fields that are esriFieldTypeSingle return rounded values.  For example, if a value is .4023 in the attribute table, the IdentifyTask returns 0.   If I run a QueryTask on the same layer, the values are not rounded.  The fields that are type esriFieldTypeDouble are not rounded in the IdentifyTask results, so it seems the issue is with the field type.

I've asked the people who generated the parcel layer to make sure that all fields are set to type esriFieldTypeDouble.  They've responded that the table is generated from a number of different sources (including several joins to dbf tables) and that ArcGIS seems to be choosing type single for them when they do the joins.

Can anyone suggest how to resolve this?  Is there a way to prevent the IdentifyTask from rounding the values?

Thanks,
Jennifer


I think this is a very good question. You might be able to format the returned field value, but i don't think you have control on field value itself. It might be an system bug. I will be very interested to know the answer.
0 Kudos
MiriamBrockmann
Occasional Contributor

I wonder if anyone has found a solution for this. By now i'm facing the same issue - i get back East and Northcoordinates which have regular 1 to 3 Decimal places and are round up after the identifyTask but i need the original Value.

Although i have searched the web i couldn't find any answer for this Problem.

We are using Esri Javascript API 3.21

Regards, Miriam

0 Kudos