Web AppBuilder

3224
10
09-24-2015 06:33 AM
CenterlineMapping
New Contributor III

Is it possible to change the icons for WebApp Builder off-panel out-of-the-box widgets, such as the 'Home Button' widget? 

0 Kudos
10 Replies
TimWitt2
MVP Alum

You mean the "Home Button" icon that will be on your map?

0 Kudos
RickeyFight
MVP Regular Contributor

In developer navigate to arcgis-web-appbuilder-1.2\client\stemapp\widgets\HomeButton\images

Then replace the icon.png with your own

You can do this with any widget

0 Kudos
TimWitt2
MVP Alum

If you want to change the icon of the actual home button, go to:

arcgis-web-appbuilder-1.2\client\stemapp\jimu.js\css and open the jimu.css with a text editor.

add the following

.HomeButton .home {
    background-image: url("../dijit/images/home.png"); //// Change this part to point to the image you would like
}
CenterlineMapping
New Contributor III

Thanks for your help!

0 Kudos
CenterlineMapping
New Contributor III

I have another simple question.  How is it possible to change the point symbol from the default Purple circle to something smaller?  This functionality is being added to another widget where we do not want to provide all the marker symbols, but create a default.

Thanks,

0 Kudos
TimWitt2
MVP Alum

What widget uses this purple marker?

0 Kudos
CenterlineMapping
New Contributor III

Tim, thanks for asking.  If you open the Draw widget and click on the Point, it is the default purple circle.  I would like to change the size and color of the default point symbol and add this function to another widget.  A user will open a custom widget and be able to add a point to the map, something other than the large purple default symbol.

0 Kudos
TimWitt2
MVP Alum

The default symbol can be changed in the following js file:

arcgis-web-appbuilder-1.2\client\stemapp\jimu.js\dijit\SymbolChooser.js

If you have already created an app, go here:

arcgis-web-appbuilder-1.2\server\apps\[Your app number]\jimu.js\dijit

Within this file the default point symbol is defined between line 338 & 348:

  var args = {
          "style": "esriSMSCircle",
          "color": [0, 0, 128, 128],
          "name": "Circle",
          "outline": {
            "color": [0, 0, 128, 255],
            "width": 1
          },
          "type": "esriSMS",
          "size": 18
        };

Just as an fyi in your new widget you would have to use the SymbolChooser to take advantage of those changes.

Hope this helps!

Tim

CenterlineMapping
New Contributor III

Tim, thanks for your quick solution!  I was able to modify based on your suggestion.

-Tyler

0 Kudos