API JS 4.x - Widget development - Icon and config file

805
1
09-02-2020 12:18 PM
LuisRodríguez_González
New Contributor III

Hi,

I have done this tutorial Create a custom widget | ArcGIS API for JavaScript 4.16. Now I have these questions:

* How can I create and load a configuration file for the widget?

* How can I create a icon for the widget, that it be showed on map, so that an user can click on it to open the widget?


Regards

1 Reply
LuisRodríguez_González
New Contributor III

Hi,

I have just found out how to create the icon widget. I have included these lines in the tsx file:

const CSS = {

base: "generador-stops-tool",
textoJsonStops: "texto-json-stops",
icons: {
widgetIcon: "esri-icon-map-pin",
copy: "esri-share__copy-icon"

}

};

. . .

@property()
iconClass = CSS.icons.widgetIcon;

Regards