I recently took over maintenance of a live app that has been supporting an old and highly modified version of the Route-Me SDK. We are trying to integrate the ArcGIS SDK to allow ESRi supplied maps (primarily raster based tiles for both online and offline usage). Essentially I need to be able to request raster tiles by URL to get an iOS UIImage, bypassing the ArcGIS rendering. This would allow us to get up and running the quickest with the ESRi imagery while we sort out longer term updates that potentially replace the Route-Me SDK with ArcGIS. I have reviewed the documentation and sample apps but am a little overwhelmed by the number and breath of the services and API's and none of them really seems to show bypassing the SDK for rendering. The closest I saw was the Image Service API's but it appears that is for running your own server. I am sure I am missing something.
Any pointers that anyone can share are very much appreciated.
Solved! Go to Solution.
Hi.
We don't provide an API in the Runtime SDK to obtain individual tiles and expose them as Cocoa classes. You would have to request the tile yourself. The format is something like this:
https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}
Each request returns a PNG. But note that you must display attribution for the map's data, which is obtained from a static URL per service and is specific to zoom level and extent. You can get the URLs for many services here. And you can see how Esri Leaflet determines the required attribution here.
Once you adopt the Runtime, it will do all this for you
Hope this helps.
Nick.
Hi.
We don't provide an API in the Runtime SDK to obtain individual tiles and expose them as Cocoa classes. You would have to request the tile yourself. The format is something like this:
https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}
Each request returns a PNG. But note that you must display attribution for the map's data, which is obtained from a static URL per service and is specific to zoom level and extent. You can get the URLs for many services here. And you can see how Esri Leaflet determines the required attribution here.
Once you adopt the Runtime, it will do all this for you
Hope this helps.
Nick.
Also please note that it's against our terms of use for the basemaps to scrape/harvest tiles (e.g. for offline use): License your app—ArcGIS Runtime SDK for iOS | ArcGIS for Developers
Thank you for the reply Nicholas. The REST request is indeed what I was looking for. The runtime certainly has a ton of functionality and features and we will be considering how to leverage it in the future.
We have subscribed to a builder package and created a few map types with a basemap and border/label layer. For example, World Imagery and World Borders and Labels. Is there a way to request a single image with these two layers or do we need to request both separately and overlay them ourselves?
Also understand about the scrape/harvest licensing. Those discussions are currently underway.
Thanks again for your assistance. Very much appreciated.
Hi Damian. Thanks for the extra info.
Unfortunately you would need to use both layers. We split them up so that you can sandwich your operational layers between the base imagery and the reference labels and boundaries. Since the two components are separate services, there isn't a way to just merge them.
Nick