Feature services not showing up in Android Map View

2329
1
01-27-2014 08:10 PM
KrishnaPragada
New Contributor II
I have Several Feature Service Layers inside Feature services and when I add Feature services to Map view using following method

ArcGISFeatureLayer secureFeatureLayer = new ArcGISFeatureLayer(Feature_Service_url, MODE.ONDEMAND);

its Layers does not show up in Map view.

But when  I add individual Feature Service Layer  it does show the layer details correctly.


So My question is to add Feature services do I have to add its Layers one by one or is there any other ways to add Feature Service directly to Map view?
0 Kudos
1 Reply
RobertBurke
Esri Contributor
Hi Krishna,
The idea behind an ArcGISFeatureLayer is to work with a single layer at a time. 

When defining the Feature_Service_url you have a /1 or /0 at the end. Where that number defines the index position of the desired layer from the FeatureServer.

If you would like to work with all the layers from a service at one time, instead FeatureService, use a MapService.  Also with a map service you wouldn't place the /1 or layer index at the end of the URL.  For this option have a look at ArcGISDynamicMapServiceLayer.

Here is a brief help page describing the variety of layers.

https://developers.arcgis.com/android/guide/map-layer-types.htm

I hope this is helpful.
0 Kudos