Esri / storymap-shortlist

The Shortlist story map application template by Esri
http://storymaps.arcgis.com/en/app-list/shortlist/
Apache License 2.0
43 stars 61 forks source link

Layers Load on Desktop but not on Mobile #72

Closed pmacMaps closed 6 years ago

pmacMaps commented 7 years ago

I am experiencing a strange bug with the self-hosted version 1.4.9. I have a deployment where the tab layers load on desktop,, but on mobile they do not. I have another deployment where this issue does not occur. It seems to me it may be a feature service issue. Any help is greatly appreciated.

If I test the app using Chrome's emulator, and switch between mobile and desktop, I get the following error:

Uncaught TypeError: Cannot read property 'graphics' of undefined at main.js:1612 for the test app. It's on line 1628 of live app:

$.each(_layerCurrent.graphics,function(index,value)

Issue app: https://gis.ccpa.net/storymaps/bridges/ Clone of issue app without custom JS code: http://gis.ccpa.net/labs/storymaps/bridges/ Webmap ID for issue app: 62aaf81e79ec4bf49e5414ac7f53928d

Working app: http://map.cumberlandbusiness.com/ Webmap ID for working app: 10db13f1199246e68d1f82ff81bed063

pmacMaps commented 6 years ago

@cooney, I stumbled across the culprit. I had a scale dependency set on the service used as the thematic layer. When the app loads on mobile devices, the map scale is at a level that causes the thematic layer to not display.

After overwriting the service and removing the scale dependency, the app loaded on mobile. Not sure if this was a weird bug, or if I didn't follow the recommendations about publishing the service.