AnsweredAssumed Answered

How to load a web map from URL into ArcGIS SDK fro MacOS in Swift

Question asked by henryshunt on Apr 1, 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 this code but it does not work:

let tiledLayer = AGSArcGISTiledLayer(url: URL(string: "")!)

let basemap = AGSBasemap(baseLayer: tiledLayer) = basemap

I am completely out of ideas and have no idea what to do. All I want to do is display the OpenStreetMap from the URL in my map, how can I do it? Thanks.