AnsweredAssumed Answered

Unable to show feature layer through IOS arcgis runtime sdk

Question asked by dasnobel on Mar 17, 2017
Latest reply on Mar 20, 2017 by Yue_Wu-esristaff

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/FeatureServer")!)

 

        //create a feature layer

        let featureLayer = AGSFeatureLayer(featureTable: featureTable)

        

        //add the feature layer to the operational layers

        map.operationalLayers.addObject(featureLayer)

 

 

Thanks

Outcomes