Select to view content in your preferred language

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

04-01-2017 08:28 AM
New Contributor

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.

0 Kudos
0 Replies