Access hosted arcgis online featureLayer via html

1511
13
Jump to solution
06-27-2017 03:02 AM
Henryobaseki
Occasional Contributor

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.

0 Kudos
13 Replies
Henryobaseki
Occasional Contributor

problem resolved thank you

0 Kudos
KenBuja
MVP Esteemed Contributor

What was the resolution of the problem? Was it the case of the user name or something else?

0 Kudos
Henryobaseki
Occasional Contributor

user name was the issue

0 Kudos
KenBuja
MVP Esteemed Contributor

You should mark Jake's post as the correct answer then.

0 Kudos