{ System.out.println("load status:" + wmsService.getLoadStatus().toString()); // get the layer infos List layerInfos = wmsService.getServiceInfo().getLayerInfos(); for(WmsLayerInfo layerInfo : layerInfos) { System.out.println("layer info title : " + layerInfo.getTitle()); // for each layer info, get the sub layer infos List wmsSubLayerInfos = layerInfo.getSublayerInfos(); // list the layers for information only for(WmsLayerInfo subLayerInfo : wmsSubLayerInfos) { System.out.println("sub layer " + subLayerInfo.getTitle()); } // add the layer from the sub layers WmsLayer wmsLayer = new WmsLayer(wmsSubLayerInfos); wmsLayer.loadAsync(); wmsLayer.addDoneLoadingListener(() -> { System.out.println("layer load status : " + wmsLayer.getLoadStatus()); System.out.println("layer uri : " + wmsLayer.getUri()); }); map.getOperationalLayers().add(wmsLayer); } });"/>
laptop and a wrench

Bug

The Web Map Service (WMS) layer is not visible when instantiating the layer from a collection of WMSLayerInfos.

Last Published: April 20, 2018 ArcGIS Runtime SDK
Bug ID Number BUG-000113100
SubmittedApril 10, 2018
Last ModifiedJune 5, 2024
Applies toArcGIS Runtime SDK
Version found100.2.1
Operating SystemWindows OS
Operating System Version7.0 64 Bit
StatusWill Not Be Addressed

Additional Information

The code snippet below shows how to add the WMS service to an ArcGIS Runtime SDK application using the WMSLayerInfos. Please reach out to Esri Technical Support if the issue persists. // wms service //WmsService wmsService = new WmsService("URLtoWMSService?request=GetCapabilities&service=WMS"); // load the service wmsService.loadAsync(); wmsService.addDoneLoadingListener(() -> { System.out.println("load status:" + wmsService.getLoadStatus().toString()); // get the layer infos List layerInfos = wmsService.getServiceInfo().getLayerInfos(); for(WmsLayerInfo layerInfo : layerInfos) { System.out.println("layer info title : " + layerInfo.getTitle()); // for each layer info, get the sub layer infos List wmsSubLayerInfos = layerInfo.getSublayerInfos(); // list the layers for information only for(WmsLayerInfo subLayerInfo : wmsSubLayerInfos) { System.out.println("sub layer " + subLayerInfo.getTitle()); } // add the layer from the sub layers WmsLayer wmsLayer = new WmsLayer(wmsSubLayerInfos); wmsLayer.loadAsync(); wmsLayer.addDoneLoadingListener(() -> { System.out.println("layer load status : " + wmsLayer.getLoadStatus()); System.out.println("layer uri : " + wmsLayer.getUri()); }); map.getOperationalLayers().add(wmsLayer); } });

Steps to Reproduce

Bug ID: BUG-000113100

Software:

  • ArcGIS Runtime SDK

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options