AnsweredAssumed Answered

Access hosted arcgis online featureLayer via html

Question asked by Henseki on Jun 27, 2017
Latest reply on Jun 28, 2017 by kenbuja

Hi All,

See below for part of html using 3.2 javascript libraries, sample code from https://developers.arcgis.com/javascript/3/jssamples/search_suggestiontemplate.html

 

 

My featurelayer is from my ArcGIS online

var search = new Search({ sources: [{ featureLayer: new FeatureLayer("https://services1.arcgis.com/BZNs0xaSHDSi4V6G/arcgis/rest/services/postcodes/FeatureServer/0",

 

 

When I run the code, it ask to enter arcgisonline username and password. when I do this, it says incorrect username and password.

This is the same username and password, I would have used to login in directly in my ArcGIS account.

Outcomes