FeatureLayer - Flex API - Definition Expression - Not drawing with large number of records

3112
6
Jump to solution
08-06-2014 12:35 PM
KeithWeber1
New Contributor III


Hello all,

I have a simple web application that I've built using ESRI's Flex API. I am using an Oracle database and ArcGIS for Server 10.0. My application contains a single polyline feature layer with about 35,000 records. When my application loads, I set the definition expression to something like "1=-1" in order to have nothing displayed at startup. My application provides some UI components that basically allow the user to set a definition expression. The problem that I am having is that if a user creates a definition expression that returns a large number of records, it takes a long time before the "updateEnd" event occurs. After the updateEnd event occurs, no features are displayed in the map. However, if the user creates a definition expression that returns a smaller number of records, everything displays as it should.

Is there some sort of timeout that is occuring when the map service is attempting to retrieve the records?Any suggestions are greatly appreciated!

-Keith

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Keith,

   Is there a reason you are using a FeatureLayer instead of a ArcGISDynamicMaServiceLayer? The issue id that a FeatureLayer has to get all the features geometry from the server and process then client side in the browsers flash player plugin and if you are talking some fairly complex polylines then you are talking thousands of map points divided by 35K...

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Keith,

   Does your map service allow for returning all 35K records?

0 Kudos
KeithWeber1
New Contributor III

Yes, in ArcGIS Manager, on the Parameters tab for th service, I have 'Maximum Number of Records Returned by Server' set to 100000. (probably not a good idea, but I'm just troubleshooting at this point)

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Keith,

   Is there a reason you are using a FeatureLayer instead of a ArcGISDynamicMaServiceLayer? The issue id that a FeatureLayer has to get all the features geometry from the server and process then client side in the browsers flash player plugin and if you are talking some fairly complex polylines then you are talking thousands of map points divided by 35K...

0 Kudos
KeithWeber1
New Contributor III

Robert,

I am not really sure. I am new to flex development all together, much less the ESRI Flex API. I inherited this project from another developer who is no longer available.

One of the reasons I think that a FeatureLayer is being used is because the application uses the <esri:infoWindowRenderer> to display metadata when the user selects a feature. Another reason may be that the application uses <esri:AttributeTable>. Is it possible to get the functionality of these two components with an ArcGISDynamicMapServiceLayer?

By the way, I really appreciate your feedback!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Keith,

  Actually, yes. You can setup popups for sublayers in a ArcGISDynamicMapServiceLayer this is done in the Viewer and the AttributeTable can use it as well as this is done in the AttributeTableWidget in the viewer. Now how do you add these to you app as a new Flex developer is another thing altogether. You could just build your app with the ArcGIS Viewer for Flex and have all this done for you.

0 Kudos
KeithWeber1
New Contributor III

Robert,

That's really great news! Also, as a quick test, I changed my FeatureLayer to an ArcGISDynamicMapServiceLayer and "VAULA!" I all features loaded. I really appreciate the help. You might see a couple questions from me soon Thanks!!!

0 Kudos