ESRI.ArcGIS.VE.IdentifyTask() & onComplete adding shapes in projection 102113

456
2
06-09-2011 02:45 AM
GertConradie
Occasional Contributor
Hi

I inherited an application that use a custom ArcGIS layer on top of BING maps. It do an IdentifyTask and the features found are added to a VEShapeLayer with custom icons.

Somehow the icons is not shown any more and I was asked to investigate it.

As far as I can see is that the projection of the features found & returned is different than of the map. (I can get the center coordinates of the map and add a feature/icon using that) The difference in values that I can see is exactly the same as demonstrated by this little app if I pan to the same area that I work with:
http://spatialreference.org/ref/sr-org/45/
(The features found is in the "Output Coordinates" projection and the clicked location is in the "Input Coordinates")

What I found stange is that this article states that the SpatialReference of the input and output geometries of IdentifyTask should be the same: (I can use the "InputGeometry" included with the features found without reprojection.)
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi_start.htm#jsapi/id...

Note that when I check the spatial reference of the map it is null.
I reference these Javascript API's:
http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2
http://serverapi.arcgisonline.com/jsapi/ve/?v=1.6

So the question is - should I somehow reproject the features/shapes found before adding them to the VEShapeLayer? - none of the examples I had seen seems to do.

Thanks in advance.
0 Kudos
2 Replies
GertConradie
Occasional Contributor
OK, more detail on the problem but no solution yet.

The problem is in the "identify" querystring format (parameter order) that is send to the ArcGIS REST service from the Javascript API.

In the url below, if the sr=4326 is included AFTER the "layers" attribute. (This is how the Javascript API submit the request.)
....&layers=top:0&sr=4326&.....

In the url below, if the sr=4326 is included BEFORE the "layers" attribute. (This is how the ArcGIS HTML REST interface submit the request when you play with the identify functionality.)
....&sr=4326&layers=top:0&.....

I played with the Javascript API but it seems I dont have control over how the identify GET request are build.

So the questions are:
Is this a bug in the ArcGIS 10 REST identify functionality, or is the VE API V1.6 incompatible with ArcGIS 10?

Any feedback will be much appreciated.

Regards, Gert
0 Kudos
GertConradie
Occasional Contributor
Just an update - ESRI acknowledged the issue and is looking at it.

The problem occure when in the ESRI.ArcGIS.VE.IdentifyTask() supply parameter 'layers' in format 'top:0' to the REST API. ('Layers=all' dont replicate it)
0 Kudos