Custom image for a widget ArcGis4.15

1459
3
06-13-2020 11:18 PM
NadirHussain
Occasional Contributor II

i place my layerlist widget insidea expand widget.i want to set my own custom image for layerlist widget when expand widget is close.how it is possible please help for arcgis 4.15 for scene view.

Thanks

0 Kudos
3 Replies
NadirHussain
Occasional Contributor II

any guru have no answer for this question.

please help.

0 Kudos
Noah-Sager
Esri Regular Contributor

There are two options for widget icons. One is to use the Esri Icon Font, and you can then pick what you want for the Expand widget.

Expand widget with Esri Icons:

https://codepen.io/noash/pen/pogENrb 

The other option is to use your own CSS class to style the icons and you can then pick what you want for the Expand widget.

Here is a Guide topic on how custom CSS styling works:

Styling | ArcGIS API for JavaScript 4.15 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nadir,

   So here is some css override rules for changing the basemap gallery icon that is inside an expand widget:

      .esri-collapse__icon.esri-icon-collapse:before,
      .esri-collapse__icon.esri-expand__icon--expanded.esri-icon-collapse{
        content" ";
        background-imageurl("images/forward.png");
        width25px;
        height25px;
      }
      .esri-collapse__icon.esri-icon-basemap,
      .esri-collapse__icon.esri-icon-basemap:before {
        content" ";
        background-imageurl("images/backward.png");
        width25px;
        height25px;
      }