AnsweredAssumed Answered

Adding multiple feature layers from the same feature service

Question asked by mark.gumban on May 4, 2018
Latest reply on May 7, 2018 by KKramer-esristaff

In my addin, I can successfully add a feature layer from a feature server to the current map using the LayerFactory, for example, adding layer 0:


LayerFactory.Instance.CreateFeatureLayer(new Uri("http://localhost:port/.../FeatureServer/0"), map);


If I try to add a different layer (from the same server), say layer 1, such as:


LayerFactory.Instance.CreateFeatureLayer(new Uri("http://localhost:port/.../FeatureServer/1"), map);


The function returns null.  Using a tool like Fiddler shows that ArcGIS does not even attempt to contact the server given the URL.


Is there a particular process one should follow when adding feature layers from the same feature server?