A map of the United States, when a state-level user logs in, it is only allowed to view the maps and properties of the counties within the state, ask the teacher to provide some solutions?
So when you say login you mean they are logging into AGOL to access some secured map service?
Thank you for your help. I have given an example of this! The URL is:
After logging into the system with a national account, only the maps within the country are allowed to be browsed and identify。
That is just a link to another question of yours on GeoNet. What you need to understand is that the JS API does not have a user authentication mechanism built into it. So when you are asking about controlling something based on the logged in user there is no way to do that unless you have a secured map service that requires the user to login to AGOL to gain access to that layer. Now you can have user layer access to map services and layerviews in AGOL that will only show certain features of a map service based on the logged in user, but all of this is based on named user in AGOL and will require enough named users accounts to handle your userbase.
Thank Robert Scheitlin offers ideas!
Retrieving data ...