Hi,
I am using below code to show feature layer but it is not showing in ios app. I have created this feature layer through arcgis online.
//initialize map with basemap
let map = AGSMap(basemap: AGSBasemap.streetsBasemap())
//assign map to the map view
self.mapView.map = map
//initialize service feature table using url
let featureTable = AGSServiceFeatureTable(URL: NSURL(string: "https://services7.arcgis.com/JRY73mi2cJ1KeR7T/arcgis/rest/services/NewYorkHospitalLayer/FeatureServe...")!)
//create a feature layer
let featureLayer = AGSFeatureLayer(featureTable: featureTable)
//add the feature layer to the operational layers
map.operationalLayers.addObject(featureLayer)
Thanks
Hi!
You need to specify specific layer inside featureService
let featureTable = AGSServiceFeatureTable(url: URL(string: "https://services7.arcgis.com/JRY73mi2cJ1KeR7T/arcgis/rest/services/NewYorkHospitalLayer/FeatureServe...")!)
regards,
David
Thanks, David. Now I am able to see layer.
Is it possible to show above layer and basemap as an offline mode?
Hi Das,
You can load basemap offline mode by creating a tpk file. For more information please check this:
ArcGIS Local Tiled layer—ArcGIS Runtime SDK for iOS | ArcGIS for Developers
For the featureLayer in offline mode, you need to prepare the data for offline mode, basically enable the sync functions and then you can either choose view-only or editable offline data based on your requirement.
For more information about featureLayer offline, please check: Create an offline map—ArcGIS Runtime SDK for iOS | ArcGIS for Developers
Hope this can help.
Nathan