var identifyParams = new IdentifyParameters(); identifyParams.tolerance = this.identifyTolerance; identifyParams.returnGeometry = true; identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE; identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = this.map.extent; identifyParams.spatialReference = this.map.spatialReference; identifyParams.width = this.map.width; identifyParams.height = this.map.height;
Solved! Go to Solution.
Indirectly, this is a Bug in the JSAPI as AJ Morris said. The problem is, that since ArcGIS for Server 10.2(.2) there is no spatial reference in the returning geometry of identify result. In ArcGIS for Server 10.1 the spatial reference still exists in identify result. So perhaps the JSAPI takes a default spatial reference for returning geometry which is 4326 (WGS84) and not the requested one.
So I thing there is a bug in ArcGIS for Server 10.2. But the solution described above works for me too and is a good workaround. So thanks !
Same thing happened to one of my webmaps after we have updated our servers to 10.2.2 . That piece of code worked like a charm!
Unfortunately used identifyTask and spent the past several days to figure out what's wrong with this wkid:4326.
Thanks for reporting this.
Seems like the workaround mentioned "fixes" this. We will also look at fixing it properly in the Javascript 3.12 version.
result.feature.geometry.spatialReference = this.map.spatialReference;