AnsweredAssumed Answered

Map from URL not loading despite working with URL of same format from the examples (ArcGIS macOS SDK)

Question asked by henryshunt on Feb 23, 2017

I'm trying to load OpenStreetMap into a program I'm writing in Swift, using the ArcGIS SDK for macOS. I have the loading of built in maps ( = AGSMap(basemap: AGSBasemap.imagery())) working but I cannot seem to load OpenStreetMap from its URL.


This is the URL I am using:

I am using the following code to load the URL, taken from the ArcGIS Examples:


let openStreetMap = ""

let tiles = AGSArcGISVectorTiledLayer(url: URL(string: openStreetMap)!) = AGSMap(basemap: AGSBasemap(baseLayer: tiles))


The map does not load and all I end up with is a grey gridded background. Surprisingly, if I swap the URL with one I found in the ArcGIS examples (, that map loads with no problems. The two URLs are in exactly the same format but only one works. Why is this and how can I get it to load the OpenStreetMap URL? Thanks.