Why does not FeatureLayer support sub layers?

305
2
11-29-2017 03:46 AM
LarsFagerbakke
New Contributor III

From what I can gather FeatureLayer does not support sub layers. Why not?

The workaround is implementing the layer as a MapImage layer, I can still add a popup on it. But now I lost search! The search widget only supports FeatureLayer and this Locator thingy.

Its a bigger workaround implementing this as a MapImageLayer, for making it hold a lot of data as if were a FeatureLayer to be able to set up the search source.

Tags (1)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Lars,

   It has always been this was in the JS API. A feature layer returns actual geometry from the server that is rendered client side (which can be very costly on client side resourses). Where a MapImageLayer (what use to be an ArcGISDynamicMapServiceLayer) is rendered on the server and a image is returned. Having a FeatureLayer allow sublayers would be detrimental to the client browser resources most likely.

0 Kudos
ReneRubalcava
Frequent Contributor

Like Robert said, FeatureLayers reference a single resource. If you want to do something similar to MapImageLayer with FeatureLayer, you might want to look at GroupLayer.

I made a video about this not too long ago.

GroupLayers in your ArcGIS JSAPI apps - YouTube 

It let's you group the Layers into a single layer that can be passed around and managed.