AnsweredAssumed Answered

Using javascript switch method

Question asked by brandon.price on Nov 27, 2017
Latest reply on Nov 28, 2017 by rscheitlin

Hello,

 

I am customizing a story map running on arcgis api 3.22. I am trying to use the switch javascript method to remove the basemap toggle on some of the tabs. This is what I have:

 

let tabs = $('.entries > .nav > .entry > .entryLbl ');
tabs.each(function (idx, liItem) {
switch (liItem.text) {
case 'Electric':
//liItem.on('click', function () {
// console.log('got a click on electric');
//});
liItem.setAttribute('title', 'To download a Los Angeles Substructure Plan: \n 1. Zoom to a substructure quad\n 2. Click the area inside the quad \n 3. Click "More info"');
break;
case 'Gas/Oil':
liItem.setAttribute('title', 'This tab contains non-hazardous gas/oil utilities. Visit our confidential \n gas/oil application at: http://sv07gis6/undergroundconfidential');
break;
case 'Sanitation':
liItem.setAttribute('title', 'Download LA City SanGIS Data in its entirety at:\n http://geohub.lacity.org/datasets?q=sewer \nDownload LACSD GIS Data in its entirety at:\n http://data-lacsdgis.opendata.arcgis.com');
break;
case 'Stormwater':
liItem.setAttribute('title', 'Download LA County Stormwater GIS Data in its entirety at: \n http://dpw.lacounty.gov/fcd/stormdrain/disclaimer.cfm \n and click "File Geodatabase Download"');
break;
case 'Download':
liItem.setAttribute('title', 'Use this tab to download snippets of all utility types within\n up to a 500-foot range in .shp or .dgn formats');
break;
case 'Resources':
liItem.setAttribute('title', 'Please contact D7GIS to help with our resources list');
break;
}
})

 

Story Maps

-Brandon 

Outcomes