I have an aerial image and made a tiled map service and an Image service. I use the two layers to let user zoom in really tight with the Image Service and when zoomed out, I use the tiled map service. This works for all my java script and other apps.
When I went to add the functionality to a Runtime app, I can't get the Image Service to show. The Tiled Map Service has always worked fine in the Runtime app.
//add the city's latest aerial
var latestAerialUri = new Uri("https:///intgis3/rest/services/Aerials/LatestAerials/MapServer");
latestAerialLayer = new ArcGISTiledLayer(latestAerialUri);
myMapCreate.Basemap.BaseLayers.Clear();
myMapCreate.Basemap.ReferenceLayers.Clear();
myMapCreate.Basemap.BaseLayers.Add(latestAerialLayer);
//add the image service layer
var aerialImageUri = new Uri("https://intgis3/rest/services/Aerials/LatestAerialsImg/ImageServer");
aerialImageLayer = new ArcGISMapImageLayer(aerialImageUri);
myMapCreate.Basemap.BaseLayers.Add(aerialImageLayer);
the Runtime Version being used is 100.2.1.0.
Solved! Go to Solution.
Hi,
To create a layer from an `ImageServer` endpoint, you should use the RasterLayer and ImageServiceRaster classes.
Resources:
- https://developers.arcgis.com/net/wpf/api-reference/html/T_Esri_ArcGISRuntime_Mapping_RasterLayer.ht...
- https://developers.arcgis.com/net/wpf/sample-code/raster-layer-service/
Thanks
Hi,
To create a layer from an `ImageServer` endpoint, you should use the RasterLayer and ImageServiceRaster classes.
Resources:
- https://developers.arcgis.com/net/wpf/api-reference/html/T_Esri_ArcGISRuntime_Mapping_RasterLayer.ht...
- https://developers.arcgis.com/net/wpf/sample-code/raster-layer-service/
Thanks
Thanks! This worked.
var aerialImageUri = new Uri("https:/*****/intgis3/rest/services/Aerials/LatestAerialsImg/ImageServer");
ImageServiceRaster misr = new ImageServiceRaster(aerialImageUri);
RasterLayer rl = new RasterLayer(misr);
myMapCreate.OperationalLayers.Add(rl);