Select to view content in your preferred language

XY Event layer won't work

869
1
05-16-2011 11:31 AM
MichaelAnderson
Emerging Contributor
Hello,

I'm converting a WebADF application to the REST API. It uses an XY event layer and that layer is messing up the REST service. My mxd has three layers in addition to the XY layer, so without the XY layer the ids are 0, 1, and 2 and they all work fine.

When I add the XY layer as the first layer in the mxd, refresh the service, and go to the ServiceName/MapServer page, the XY layer doesn't show up. The other layers are now ids 1, 2, and 3 - no layer 0. If I try MapServer/0 it says there is no layer 0. /1 and /2 work, but /3 doesn't. /3 gives me the display field, type, and geometry type. Under description it says "Index was outside the bounds of the array."

I found posts about problems querying and using the find task on XY layers, which implies they at least got the layer to load and display. Does anyone know what could be wrong?

I am using ArcGIS Server 9.3.1 and my XY data is in SQL Server 2008. I ran the Make Query Table tool on the XY table as suggested in a post, but it didn't help.

Thanks.

Mike
0 Kudos
1 Reply
TerryGiles
Frequent Contributor
Hi Mike,

A couple of quick things to check - I just went through this a few weeks ago but did get my MapService w/ an XY event layer to publish correctly.

Did you stop/restart the service after adding the layer to the mxd?

Was the service running from a .msd previously?  If so you need to delete it and reset the service's source to the mxd since XY event layer are not supported in an optimized service.  (Technicially you do not need to delete the msd, just good house keeping in my mind)

Is the .odc connection file somewhere accesssible to the ArcGIS SOC account?  Usually if you put it in the same folder as the mxd you're good.  Make sure relative paths are set in the map.

Did you reset the REST cache?  Can you alter a service but the changes may not show up unless you reset the cache - http://<your server>/ArcGIS/rest/admin

TG
0 Kudos