Select to view content in your preferred language

1500 API - Problems deserializing XML Polygon representation

1379
0
09-02-2010 05:12 AM
BabbageOcelot
Deactivated User
Hi all,

experiencing some trouble with xml representations. I've taken Mike's Map Service Query example and modified it to accept a tracked polygon, via the SOAP API. Unfortunately this seems to work for the first identify function - but not the second.

The procedure is:
ESRI.ArcGISExplorer.Geometry.Geometry geo = null;
if (!serviceIdentifyParams.IsPolygon)
{
   geo = ESRI.ArcGISExplorer.Geometry.Point.CreateFromXmlString(serviceIdentifyParams.PointXMLRepresentation);
}else{                    
   ESRI.ArcGISExplorer.Geometry.Polygon pp = ESRI.ArcGISExplorer.Geometry.Polygon.CreateFromXmlString(serviceIdentifyParams.PolyXMLRepresentation);
   geo = (ESRI.ArcGISExplorer.Geometry.Geometry)pp;
}

Fairly straightforward, and allows me to keep the code simple by using the Geometry class.

For Point identify operations, this works every time.

For Polygon identify operations, this works perfectly for the first click, returning a list of all features within the area. It always fails on the second run. I've placed markers in the code such that I know the failure is happening at Polygon.CreateFromXmlString... The cast operation was just to see if the failure was with creating the polygon, or placing the polygon inside geo.

The polygon is nothing special, and outputting the xml shows that from one request to the next the XML is not malformed.

The error message which comes up isn't the standard "I screwed up my Add-in" one, with the option to send an email to support. This one looks like the attachment.

Any known bugs with this? It's a problem because the point idenfity doesn't return line features unless you're right on top, and I want to add some sort of configurable tolerance.

Any ideas?

- Ben.
0 Kudos
0 Replies