This is my first time using the ArcGIS API for JavaScript. I'm running into a fairly elementary error. I cannot get a layer I have hosted on ArcGIS Online to appear on the map. Here is my code:
This script produces the following error in my browser:
[esri.Map] #add() The item being added is not a Layer or a Promise that resolves to a Layer.
My layer can be found here: https://services.arcgis.com/HRPe58bUyBqyyiCt/ArcGIS/rest/services/1_year_high_lake_level/FeatureServ...
I can't figure out why it won't appear.
Thanks in advance.
Solved! Go to Solution.
In your require and function, the MapView and FeatureLayer order are swapped. When using amd, the order matters.
In your require and function, the MapView and FeatureLayer order are swapped. When using amd, the order matters.