1

I have this service:

http://*************/ArcGIS/rest/services/mod_streets/MapServer

Layers:

Numbers (0)
StreetsGraph (1)
Streets (2)

And I'm trying to use only Numbers (note /0)

    map = (MapView) findViewById(R.id.map);
    ArcGISDynamicMapServiceLayer layerStreets = new ArcGISDynamicMapServiceLayer("http://*************/ArcGIS/rest/services/mod_streets/MapServer/0");
    map.addLayer(layerStreets);

This is not working.

But this works (removing /0 but all layers are displayed into the map)

    map = (MapView) findViewById(R.id.map);
    ArcGISDynamicMapServiceLayer layerStreets = new ArcGISDynamicMapServiceLayer("http://*************/ArcGIS/rest/services/mod_streets/MapServer");
    map.addLayer(layerStreets);

I want to see only Numbers in my Android map...Any ideas?

1
  • Did my code work ?
    – salihy
    Commented Feb 16, 2015 at 12:37

1 Answer 1

1

I think you can not use ArcGISDynamicMapServiceLayer for this issue. You should use ArcGISFeatureLayer instead. Sample code below.

String URL = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/0";
ArcGISFeatureLayer fLayer = new ArcGISFeatureLayer(URL, MODE.ONDEMAND);
map.addLayer(layerStreets);
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.