Select to view content in your preferred language

Is there any replacement for ImageryTileLayer?

745
4
08-26-2022 07:42 AM
AndriyFedin
New Contributor II

My fellow web developers use ImageryTileLayer from ArcGIS API for JavaScript. I was unable to find anything similar in iOS SDK. How do we replace ImageryTileLayer? 

0 Kudos
4 Replies
MichaelBranscomb
Esri Frequent Contributor

The equivalent in ArcGIS Runtime is the AGSImageServiceRaster class, which you display via the AGSRasterLayer class: 

Add raster data | ArcGIS Runtime API for iOS | ArcGIS Developers 

ArcGIS Runtime SDK for iOS: AGSImageServiceRaster Class Reference

ArcGIS Runtime SDK for iOS: AGSRasterLayer Class Reference 

 

AndriyFedin
New Contributor II

Hi, Michael! 
Thank you for your reply!

I tried to use the AGSRasterLayer & AGSImageServiceRaster, but it doesn't work for me. When I use image service URL from the AGSRasterLayer example on github, it works fine, but when I try the URL my teammates use on the web with ImageryTileLayer, the layer is not displayed. 
I also noticed, that the ImageServer info structure and attributes differ between these URLs.

example URL: 
https://gis.ngdc.noaa.gov/arcgis/rest/services/bag_hillshades_subsets/ImageServer

URL we use: https://tiledimageservices.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/GEBCO_2021_Bathymetry/Im...


So it brings us back to the original question: maybe I should use other layer class?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

I just gave this a try with another Runtime SDK - .NET - and it worked fine. But I noted:

  • I did have to wait some time for the service to initially display.
  • It was necessary to zoom in beyond the layer full extent before the layer was noticeably visible, although you may know what you're looking for.
  • I'm currently using a Developer license (i.e. no license is set) - are you running in developer mode or have to set a license?

 

Map = new Map(BasemapStyle.ArcGISDarkGray);
ImageServiceRaster imageServiceRaster = new ImageServiceRaster(new Uri("https://gis.ngdc.noaa.gov/arcgis/rest/services/bag_hillshades_subsets/ImageServer"));
RasterLayer rasterLayer = new RasterLayer(imageServiceRaster);
await rasterLayer.LoadAsync();
Map.InitialViewpoint = new Viewpoint(rasterLayer.FullExtent);
Map.OperationalLayers.Add(rasterLayer);

 

Thanks

0 Kudos
AndriyFedin
New Contributor II

Hi, @MichaelBranscomb!

The URL in your code sample works for me too, but this one doesn't.

According to Nicholas-Furness in this answer, the issue is related to LERC format, which is not supported for visualization by the runtime.

0 Kudos