Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Failed to Load Layer - v4.2 #103

Closed marissaAnn closed 7 years ago

marissaAnn commented 7 years ago

After downloading the 4.2 version, I am experiencing a "failed to load layer" error with certain layers. This is after changing only the config settings for my portal and webmap.

boilerplate-error

This is the map service I'm trying to use that is publicly available: https://gis.optum.com/arcgis/rest/services/MetricsGeneralized/MapServer

I did happen to have a 4.0 version saved locally and am not seeing this error when using the same web map.

driskull commented 7 years ago

Hey @marissaAnn thanks for reporting. can you share the webmap so I can see if it might be another layer in there?

marissaAnn commented 7 years ago

Unfortunately I cannot share the web map I'm using as our portal is only available internally.

I did attempt to recreate the webmap in our ArcGIS Online account so that it could be shared, but am unable to reproduce the error there.

driskull commented 7 years ago

can you share the webmap response JSON from the network tab in chrome? I'm thinking it might be a layer type that is not supported yet.

marissaAnn commented 7 years ago

Which URL should I be looking for to get the webmap response JSON?

driskull commented 7 years ago

It should look like this:

https://`www.arcgis.com`/sharing/rest/content/items/`1970c1995b8f44749f4b9b6e81b5ba45`/data?f=json`

but using your portal and webmap id.

marissaAnn commented 7 years ago

Ah thanks. Does this help?

{"operationalLayers":[{"id":"MetricsGeneralized_8946","layerType":"ArcGISMapServiceLayer","url":"https://gis.optum.com/arcgis/rest/services/MetricsGeneralized/MapServer","visibility":true,"visibleLayers":[3],"opacity":1,"title":"Metrics Generalized","itemId":"185fc3af3e0d463ea462f7659c467c42"}],"baseMap":{"baseMapLayers":[{"id":"defaultBasemap","layerType":"ArcGISTiledMapServiceLayer","opacity":1,"visibility":true,"url":"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"}],"title":"Topographic"},"spatialReference":{"wkid":102100,"latestWkid":3857},"authoringApp":"WebMapViewer","authoringAppVersion":"10.4","version":"2.3"}

driskull commented 7 years ago

Yep. that helps. thanks.

Can you verify your portal has this item 185fc3af3e0d463ea462f7659c467c42?

Should be a layer with that itemId in the portal. Just want to check for sure. If so, can you send me the response from that item?

Should look like this:

https://`www.arcgis.com`/sharing/rest/content/items/185fc3af3e0d463ea462f7659c467c42?f=json

marissaAnn commented 7 years ago

{"id":"185fc3af3e0d463ea462f7659c467c42","owner":"mwalter","created":1478809280276,"modified":1478809280548,"guid":null,"name":null,"title":"Metrics Generalized","type":"Map Service","typeKeywords":["ArcGIS Server","Data","Dynamic","Map Service","Multilayer","Service"],"description":"HealthState Metrics Service with Generalized Geographies for: States, Counties, Zipcodes, Hospital Referral Regions, Hospital Service Areas","tags":["Metrics","HealthState"],"snippet":"HealthState Metrics Service with Generalized Geographies.","thumbnail":"thumbnail/ago_downloaded.png","documentation":null,"extent":[[-179.1743,18.9117],[179.7739,71.4478]],"spatialReference":"102100","accessInformation":"Optum","licenseInfo":null,"culture":"en-us","properties":null,"url":"https://gis.optum.com/arcgis/rest/services/MetricsGeneralized/MapServer","access":"private","size":71,"appCategories":[],"industries":[],"languages":[],"largeThumbnail":null,"banner":null,"screenshots":[],"listed":false,"ownerFolder":null,"protected":false,"commentsEnabled":false,"numComments":0,"numRatings":0,"avgRating":0,"numViews":69,"itemControl":"admin"}

driskull commented 7 years ago

Hmm everything looks ok and seems to work for me. I can't seem to reproduce that error.

marissaAnn commented 7 years ago

Unfortunately I cannot reproduce the error outside of our portal either. I've noticed that it is occurring for any layer that is not on the same domain as our portal. So the service mentioned above (located @ gis.optum.com) will not load, but layers matching the portal url are loading fine.

It seems like it could be a portal issue on my end, however the 4.0 version is not showing these errors with the same web map. Thanks!

driskull commented 7 years ago

Yeah. sorry. Maybe contacting support might be of more assistance. I tried with that combination of responses and it seemed to work fine.