Select to view content in your preferred language

Add a custom button on the map based on classname

3805
2
Jump to solution
02-20-2020 09:01 AM
PHerk
by
Emerging Contributor

Like to add custom buttons on the map with similar styling as the zoom buttons.

Found this example:

var element = document.createElement('div');
element.className = "esri-icon-collection esri-widget--button esri-widget esri-interactive home";
view.ui.add(element, "top-right");

View is a map view.

This works and adds a button on the right top side of the Webmap.

The classname used is: esri-icon-collection esri-widget--button esri-widget esri-interactive home

How can I construct a similar classname for an other icon?

I am looking for all possible classnames, so I can choose what buttons I want to use like a close button.

I can't find the article explaining or listing all options.

0 Kudos
1 Solution

Accepted Solutions
2 Replies
RobertScheitlin__GISP
MVP Emeritus
PHerk
by
Emerging Contributor

Thanks!

0 Kudos