Numéro d’ID de bogue |
BUG-000113100 |
Envoi | April 10, 2018 |
Dernière modification | June 5, 2024 |
S’applique à | ArcGIS Runtime SDK |
Version trouvée | 100.2.1 |
Système d’exploitation | Windows OS |
Version du système d’exploitation | 7.0 64 Bit |
Statut | Will Not Be Addressed
L’équipe de développement a examiné le problème ou la demande et a décidé qu’ils ne seraient pas traités. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
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);
}
});
Étapes pour reproduire
ID de bogue: BUG-000113100
Logiciel: