Select to view content in your preferred language

FeatureLayer not being displayed

767
1
05-04-2011 03:53 PM
DavidElies
Deactivated User
Aloha,

I've created a sample map service out of US state and county boundaries.

http://166.122.241.243/ArcGIS/rest/services/National/MapServer

I'm trying to display it on a flex map using either GraphicLayer or FeatureLayer.  I can't get the FeatureLayer to show up at all, and if I use a GraphicLayer, I can query a single state, sometimes, but usually, the query times out.  I thought this might have to do with the spatial reference of my map or base layer (an ArcGISTiledMapServerLayer) not matching, but I've since changed my map service to match the tiled layer, and I don't see any difference.  I have another FeatureLayer from an ArcGIS server, and it works fine--and it uses a different spatial reference from either.  Can someone here point me in the right direction?  Any hints will be helpful!

Edit: I've since discovered that the FeatureLayer does "load" and the LayerDetails are populated, but no graphics are returned.  I'm still stumped.

Mahalo!
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
David,

   There is a problem with your map service. Starting with the fact that it appears that you are publishing a shapefile which is not a good idea ad all. If it is not a shapefile then you need to show the objectid field. Also for performance reasons you should generalize highly detail state and county data at large scales. I was able to get geometry to draw using a featurelayer if I used a layerdefenition of "FID < 40", but it took FOREVER to draw.
0 Kudos