Developer WAB - More than three custom widgets per app?

3183
4
Jump to solution
12-09-2015 01:24 PM
deleted-user-dbQhBq-o3nyM
Occasional Contributor

Is it possible to add more than three custom widgets to an app at a time? With flex we have the legend, search, layer list, draw, bookmarks, and print. I don't see an option to add more than three widgets at a time.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jordan,

   Depending on the version of WAB you are running and the theme you have chosen there are 3 to 5 onScreen widget placeholders and then themes like the foldable theme have more spots for widgets in the Header Controller widget.

example.jpg

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Jordan,

   Depending on the version of WAB you are running and the theme you have chosen there are 3 to 5 onScreen widget placeholders and then themes like the foldable theme have more spots for widgets in the Header Controller widget.

example.jpg

deleted-user-dbQhBq-o3nyM
Occasional Contributor

Thank you. I didn't even see the option to put them in the header. That makes a huge difference. Thanks again!

0 Kudos
MichaelRobb
Occasional Contributor III

Actually, you can add as many onScreen Widgets as you want to the map itself (not just 3 or 5 as stated)... just modify the Server\\apps\##\config.json...

There is a widgetOnScreen portion... here you can simply keep adding more on screen widgets (does not have to be in the controller.

Add the new widget to the widget pool, if it is not already there...

add the widget to mobileLayout if desired.

"widgetOnScreen": {

    "widgets": [

      {

{

"position": {

          "left": 55,

          "top": 45,

          "relativeTo": "map"

},

"placeholderIndex": 1,

"id": "_38",

"name": "Share",

"label": "Share",

"version": "1.1.2",

"uri": "widgets/Share/Widget",

"config": "configs/Share/config_Share.json"

}

Just give it a position a new ID and name, point to the URI and config of the widget... you can add as many as you want!

See next posting for example

MichaelRobb
Occasional Contributor III

6.png