Closed agileorange closed 8 years ago
@agileorange, which version of JSAPI and which version of angular-esri-map are you using?
As far as I know //npmcdn.com/angular-esri-map@2 //js.arcgis.com/4.0/ AngularJS v1.5.8
Thanks for the info. I think I am also seeing the error you are describing, but can you please provide a working code sample, like on jsfiddle, plnkr, etc. to re-create this in the way that you are experiencing it?
Hi here is a plnkr sample https://plnkr.co/edit/aYyQNhlCx5EGIcp6yQRC?p=preview
The feature layer does include data that is shown clearly on the non-angular version (adapted - https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=layers-featurelayer)
Hi @jwasilgeo - any further thoughts on this? I'm on a bit of deadline :-( and I was wondering if you will get a chance to look at this in the next day or two? Cheers!
Hey @agileorange yes I'll take a few shots at debugging this over the next day or two.
@agileorange can you switch your app to use the latest version of the new JSAPI? Try out 4.1 instead of 4.0 for your css and js. It just worked for me in your plnkr.
If this will work for you as well, then I'll hazard a guess that there may be subtle core differences between 4.0 and the latest 4.1 release when specifying a portalItem
property in a FeatureLayer
constructor. The main portalItem
sample uses a slightly different style with Layer.fromPortalItem
that appears to work with both 4.0 and 4.1 in the sandbox.
@jwasilgeo - many thanks I've switched to 4.1 and all works a treat - thank you!
Intro
The portal item is correctly set up as it works as expected in the ArcGIS sandbox (https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=layers-portal)
Expected behaviour
Layer created and displayed correctly
Actual behaviour
Console Error:
Steps to reproduce the behaviour
Create a new layer using PortalItem Id.