AnsweredAssumed Answered

Bug?  arcgisUtils.createMap fails to create web map

Question asked by mtfresh on May 11, 2015
Latest reply on Jun 17, 2015 by sumit.zarkar

In our own Portal for ArcGIS, I saved a map that contains multiple layers, including a map service layer with security restrictions.  I then shared the map to a group, but some of the people in that group do not have access to the restricted map service.


When the map is opened with the viewer in portal, it behaves as expected -- the map displays with all layers, except for the restricted map service layer.  However, when the map is loaded in our JavaScript API (v 3.13) app using arcgisUtils.createMap, the map displays with only the basemap layer.  Also, the then() function is never called, but no exceptions are thrown.  Looking at the web traffic in Fiddler, the web map json returned from the portal is correct, and it contains references to all the layers, including the restricted layer.  It looks like the individual layer services are then queried, and the restricted service returns a 403 status (as expected).


I tried to recreate the scenario using ArcGIS Online.  I uploaded a KMZ file, created a map, added the KMZ file to the map (along with other layers hosted on AGOL), and shared the map with everyone (but not the KMZ file).


It behaves the same way in the online viewer, but it successfully loads (minus the unshared KMZ file) in our JavaScript app as well.  I'm not sure why this example would work, other than it is a slightly different scenario -- a KMZ file hosted within AGOL, rather than an external map service. Anyway, the first scenario seems like a bug in the createMap API call.  Can anyone confirm this?


Thanks, Mike