FeatureClass fc = new FeatureClass(this.mapServerDataAccess.getDataSource(mapName, layerId));
IRaster raster = this.mapServerDataAccess.getDataSource(mapName, layerId);
This function allows fine-grained object access to a FeatureLayer, a RasterLayer or a StandaloneTable by returning IFeatureClass, IRaster or ITable respectively.
But I was under the impression that you can't use the getLayer method from an SOE at all as of 10.1, because it's not supported on optimized map services
A Raster can be created in three ways:1. Get from a RasterLayer using IRasterLayer::Raster2. Create from a raster dataset using either :IRasterDataset::CreateDefaultRaster or IRasterDataset2::CreateFullRaster3. Cocreate a Raster and append raster bands using IRasterBandCollection interface.
RasterLayer rl = (RasterLayer) mapServer.getLayer("Layers", 0); System.out.println(rl.getSpatialReference().getName()); System.out.println(rl.getFilePath());
Get Data SourceThis function allows fine-grained object access to a FeatureLayer, a RasterLayer or a StandaloneTable by returning IFeatureClass, IRaster or ITable respectively. If the layer or standalone table has any joins, the returned object will not contain the joined portion. In addition any field visibility or field alias set to the layer in the source map document will be ignored as it returns the underlying data source.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.