Esri / arcgis-maps-sdk-swift

Swift Package Manager support for ArcGIS Maps SDK for Swift
https://developers.arcgis.com/swift
Other
18 stars 1 forks source link

Connect to own server #13

Closed nicop2000 closed 3 months ago

nicop2000 commented 5 months ago

Hi there, is it possible to connect to a own instance of an ArcGIS Server with this package and if so, how would one do this?

With own instance I am referring to a setup server with own collected map data. This ArcGIS Server already exists. I don't want to use the given data from Esri where you need these API Keys mentioned in the tutorial

Thanks in advance

njarecha commented 5 months ago

Yes, you can use the layers/services from your ArcGIS server. You should create a layer object based on type of service, create a Basemap with the layer and then a map with a basemap. Here is the example code which uses the ArcGISMapImageLayer which can be created with a Map Service URL.

let layer = ArcGISMapImageLayer(url: <map service url>)
let basemap = Basemap(baseLayer: layer)
let map = Map(basemap: basemap)

Display the map created above in a MapView.

MapView(map: map)
njarecha commented 3 months ago

@nicop2000 Hope above response helped you. Closing the issue. If you have any more questions, please post them on Swift Maps SDK Questions.