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;
}
})
-Brandon
Solved! Go to Solution.
Brandon,
I guess that does not help then as there is no basemap toggle in the public version. So basically you need to get the toggle dom node using it's id and then use dojo/dom-style to set the display to none.
Brandon,
So what exactly is your question? Are you asking what code to put in the switch cases to remove the basemap toggle? Have you thought about using jQuery or Dojo to query the toggle button element and using style to set the dom elements display to none?
Yes I would like to know what code to use in the switch case to remove the basemap toggle since I already have a switch case in the app for the tooltips. I have not thought about jquery or dojo to query the toggle and using the style to set the dom elements display to none. Is that easy to do? Is that a simple css change?
Brandon,
I don't deal with Story maps at all so I am not sure the exact code as I don't have an app to reference.
Hi Robert,
No problem.
-Brandon
Is your storymap public?
Hi Robert,
The customized version is not. The arcgis online version is at this link: https://caltrans.maps.arcgis.com/apps/MapSeries/index.html?appid=9c9b080c67af4d2db74b663efba971bd
I believe it has something to do with putting .setAttribute ("disabled", "") on the BaseMap Toggle. The tab with the Resources is the tab I would like to the BaseMap Toggle removed.
-Brandon
Brandon,
I guess that does not help then as there is no basemap toggle in the public version. So basically you need to get the toggle dom node using it's id and then use dojo/dom-style to set the display to none.