arcGisLocalDynamicMapServiceLayer = new ArcGISLocalDynamicMapServiceLayer(localMapService)
private List<ArcGISDynamicMapServiceLayer> createLocalDynamicLayers(LocalMapService localMapService, WorkspaceInfoSet dynamicWorkspaces) { List<ArcGISDynamicMapServiceLayer> localLayerList = new ArrayList<>(dynamicWorkspaces.size()); for (final WorkspaceInfo dynamicWorkspace : dynamicWorkspaces) { ArcGISDynamicMapServiceLayer mapServiceLayer = new ArcGISDynamicMapServiceLayer(localMapService.getUrlMapService()); mapServiceLayer.addLayerInitializeCompleteListener(new LayerInitializeCompleteListener() { @Override public void layerInitializeComplete(LayerInitializeCompleteEvent e) { logger.info(bundle.getString("LocalDataLoader.info.localDynamicLayerInitialized")); ArcGISDynamicMapServiceLayer localDynamicLayer = (ArcGISDynamicMapServiceLayer) e.getLayer(); LayerStatus status = localDynamicLayer.getStatus(); if (LayerStatus.INITIALIZED != status) { logger.severe(String.format(bundle.getString("LocalDataLoader.error.localDynamicLayerUninitialized"), localDynamicLayer.getUrl())); String initializationError = localDynamicLayer.getInitializationError(); logger.warning(initializationError); return; }
private List<ArcGISDynamicMapServiceLayer> createLocalDynamicLayers(LocalMapService localMapService, WorkspaceInfoSet dynamicWorkspaces) { List<ArcGISDynamicMapServiceLayer> localLayerList = new ArrayList<>(dynamicWorkspaces.size()); for (final WorkspaceInfo dynamicWorkspace : dynamicWorkspaces) { ArcGISDynamicMapServiceLayer mapServiceLayer = new ArcGISLocalDynamicMapServiceLayer(localMapService.getUrlMapService()); mapServiceLayer.addLayerInitializeCompleteListener(new LayerInitializeCompleteListener() { @Override public void layerInitializeComplete(LayerInitializeCompleteEvent e) { logger.info(bundle.getString("LocalDataLoader.info.localDynamicLayerInitialized")); ArcGISDynamicMapServiceLayer localDynamicLayer = (ArcGISDynamicMapServiceLayer) e.getLayer(); LayerStatus status = localDynamicLayer.getStatus(); if (LayerStatus.INITIALIZED != status) { logger.severe(String.format(bundle.getString("LocalDataLoader.error.localDynamicLayerUninitialized"), localDynamicLayer.getUrl())); String initializationError = localDynamicLayer.getInitializationError(); logger.warning(initializationError); return; }
Solved! Go to Solution.