How to create a Widget alongside Scalebar one's ?

01-04-2021 04:45 AM
Labels (1)
New Contributor II

I'm trying to make a widget which will perform some background task.

The user should have no interaction with it, so I would like this widget was started on webapplication startup, and was not visible.

I read in the doc that a preload wirdget will fit my needs, and I just need to set the manifest's property inPanel to false :

  "properties": {
And for the moment my Widget.js only do a : console.log("Hello world")
Then I upload my widget on my server and add it following this procedure:
But when I start a WAB I don't see my custom widget near to Scalebar widget or other preloaded widget (see attached screenshot).
What I missed in my widget configuration ?
0 Kudos
3 Replies
Esri Contributor


I suggest you start with the basics of creating a new widget and adding it into WAB before modifying and customizing advanced/different default settings.

Have you ever managed to create a custom widget and add it to a WAB application before? if not, start with that through the tutorials or ready examples you can use -

Once you managed to create a custom widget and add it successfully to a WAB app, you can configure it to launch automatically when the app starts either through the WAB interface or through the JSON file, but this should be your last concern, it's an easy fix and it sounds like your widget isn't created properly.



0 Kudos
Esri Contributor

Hi @Raphiki , you have 2 options, one is to create one from scratch. Creating a onscreen widget is the same as creating all the other widget. The only difference is how you specify the manifest.json file.

example below

  "name": "ScaleNElevation",
  "platform": "HTML",
  "2D": true,
  "3D": false,
  "version": "2.16",
  "wabVersion": "2.16",
  "author": "Victor Tey",
  "description": "View current scale and set scale",
  "copyright": "",
  "license": "",
  "properties": {		
    "inPanel": false,
    "hasUIFile": true,
    "supportMultiInstance": false,
    "closeable": false,
    "hasSettingPage": false,
    "hasSettingUIFile" : false,
    "hasConfig" : true,
    "position": {
        "left": 10,
        "bottom": 60

 Note the inPanel: false, closable false and position to place the widget. Above is a working copy of my manifest.json. Hope that helps


0 Kudos
New Contributor II

I succeed in making widget starting at application loading with openAtStart. Thanks a lot !

But now how to hide the plugin's icon ? The user has no interaction with the plugin so the icon is useless and confusing...

0 Kudos