How do I work with individual layers from an ArcGIS MapServer (with multiple layers)?

I'm accessing an ArcGIS mapserver in cesium using ArcGisMapServerImageryProvider.

The server has multiple layers that I would believe would normally be accessed using the esri api with setVisibleLayers. The layers can be viewed fine in an arcgis.com map.

If I access the root of the server (with cesium) at something like <//arcgis/rest/services/MapServer>, I can load all of the layers provided in one go, but I am unable to work with individual layers. I have tried accessing the layer URL directly, as well as the direct url to the json. (e.g. <arcgis/rest/services/MapServer/0> or <arcgis/rest/services/MapServer/0?f=pjson>).

In all cases trying to use an individual layer, I get a bad request error.

Any thoughts? Sorry if this is obvious. I'm pretty new to GIS stuff in general.

Hi,

I just added support for individual MapServer layers to ArcGisMapServerImageryProvider in the “nm” branch on GitHub:

https://github.com/AnalyticalGraphicsInc/cesium/compare/nm#diff-0aee433aff2911bddecaa6f3d1515d8d

It has support for MapServer feature picking, too.

I’ll open a pull request to bring this into Cesium at some point.

Kevin

Hi,

I just wanted to let you know that the ability to use individual layers of an ArcGIS MapServer was added to Cesium 1.8, released last month.

Kevin