In Story Map Shortlist, is there a way to display a supporting layer only on a certain tab?

3322
6
10-06-2015 01:51 PM
ChayaBalsiger
Occasional Contributor

I created a shortlist story map and I have a few supporting layers, but I don't want them to be displayed on every tab. 

0 Kudos
6 Replies
MarkCooney
Occasional Contributor III

Hi Chaya,

Take a look at this customized Shortlist that has the behavior you described:

Shortlist

They added some code to the function called activateLayer in the main.js file.  Basically they are manually setting the visibility of the layers to true or false with Esri's JS API (ArcGIS API for JavaScript ) depending on which tab has been selected.  You can view the customized main.js file here:

http://www.visitlancastercity.com/artwalkingtours/app/main.js

-Mark

0 Kudos
ChayaBalsiger
Occasional Contributor

Thanks for the suggestion, but it didn't work for me.  It appears they may be using a different version of the map.

0 Kudos
NataliyaLys
Occasional Contributor II

Mark,

I was trying to customize my main.js to set layer visibility based on tabs, but no luck. I am getting errors below. I also included my main.js.  http://www.dogis.org/lm/app/js/main.js

Thank you,

Nataliya

0 Kudos
NataliyaLys
Occasional Contributor II

Mark,

I actually got it to work!

MarkCooney
Occasional Contributor III

Cool!  Nicely done.

0 Kudos
NataliyaLys
Occasional Contributor II

Hi Mark,

I am back to the square one. I am trying to accomplish the same thing (add a specific support layer to each tab)  but with the new Shortlist (Beta) template. Have you seem any one doing anything like that. 

Thanks,

Nataliya

0 Kudos