Stess

Find Task on XY Event

Discussion created by Stess on Apr 28, 2011
Latest reply on Nov 18, 2011 by amarsden
I have XY data in SQL that I have added as an event layer to a map document.  That .mxd was then used to create a map service.  I can sucessfully use the Find Task in the REST services directory to find a specific record, but when I try to execute the find task using the Javascript API, it fails. 

I exported my data to a personal geodatabase and created a map service off of the new feature class.  The Find Task worked perfectly.  It works if the source data of the map service is a feature class, but fails if it is an XY event layer.  Can the Find Task be used on XY events or that a limitation of the task?  Perhaps it is just a syntax error when defining my find parameters?
     findParams = new esri.arcgis.gmaps.FindParameters();
     findParams.returnGeometry = true;
     findParams.layerIds = [0];
     findParams.searchFields = ["REQUESTID"];

     findParams.searchText = requestID;
     findParams.contains = true;
     findTask.execute(findParams, zoomToRecord);



Any help would be much appreciated.
Thanks!
~Stephanie

Outcomes