LocalLayer Widget - In Panel?

673
5
02-25-2018 02:15 PM
TimHayes
Occasional Contributor III

I am using WAB DE 2.6 and LocalLayer Widget 2.5 (the most recent one).

I have misplaced my notes on what I did to get the LocalLayer Widget to appear in the InPanel Widgets, not in the OnScreen Widgets. What line of JSON do I need to insert and where?

Here is where I want to put the LocalLayer Widget, in the red circle:

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Tim,

  Actually it is called widgetOnScreen in the main config.json.

If you want it to be part of all your apps then make this change to the

[install dir]\client\stemapp\predefined-apps\default\config.json

  "widgetOnScreen": {
    "widgets": [{
      "uri": "widgets/LocalLayer/Widget",
      "name": "LocalLayer",
      "position": {
        "relativeTo": "map"
      }
    }, {
....‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
TimHayes
Occasional Contributor III

Hello Robert. Sorry for the confusion. What I need to do is move the position of the LocalLayer Widget (from the red arrow to the red circle) in the OnScreen Widget Container (I think that is what it's called). Refer to this graphic for what I am trying to do:

I did this for WAB DE 2.4 and copied what I did in 2.4 to WAB DE 2.6. But there is no change in the widget position. Here is a code snippet from the 2.6 config.json file (\\server\apps\app#\). This code matches what is shown in the above graphic. 

"widgetOnScreen": {
"widgets": [
{
"uri": "themes/FoldableTheme/widgets/HeaderController/Widget",
"position": {
"left": 0,
"top": 0,
"right": 0,
"height": 40,
"relativeTo": "browser"
},
"version": "2.6",
"id": "themes_FoldableTheme_widgets_HeaderController_Widget_1",
"name": "HeaderController"
},
{
"uri": "widgets/Scalebar/Widget",
"position": {
"left": 7,
"bottom": 25,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_Scalebar_Widget_3",
"name": "Scalebar"
},
{
"uri": "widgets/Search/Widget",
"position": {
"left": 55,
"top": 5,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_Search_Widget_4",
"name": "Search"
},
{
"uri": "widgets/Coordinate/Widget",
"position": {
"left": 7,
"bottom": 5,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_Coordinate_Widget_5",
"name": "Coordinate"
},
{
"position": {
"left": 55,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 1,
"id": "_6",
"version": "2.5",
"closeable": true,
"uri": "widgets/LocalLayer/Widget",
"name": "LocalLayer",
"config": "configs/LocalLayer/config_LocalLayer.json"
},
{
"position": {
"left": 105,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 1,
"id": "_7"
},

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

  It should not have a placeholderindex ,closable, etc. You should follow my instruction above and you will be OK.

0 Kudos
TimHayes
Occasional Contributor III

Yup, know that too. Here is what I did to get what I need in the WAB 2.4 app config.json. This is from the app's config.json in 2.6. Logically, it should work in 2.6. Not sure what is happening. Can you please take a gander and let me know your thoughts?

"widgetOnScreen": {
"widgets": [
{
"uri": "themes/FoldableTheme/widgets/HeaderController/Widget",
"position": {
"left": 0,
"top": 0,
"right": 0,
"height": 40,
"relativeTo": "browser"
},
"version": "2.6",
"id": "themes_FoldableTheme_widgets_HeaderController_Widget_1",
"name": "HeaderController"
},
{
"uri": "widgets/LocalLayer/Widget",
"position": {
"relativeTo": "map"
},
"version": "2.5",
"id": "widgets_LocalLayer_Widget_2",
"name": "LocalLayer"
},
{
"uri": "widgets/Scalebar/Widget",
"position": {
"left": 7,
"bottom": 25,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_Scalebar_Widget_3",
"name": "Scalebar"
},
{
"uri": "widgets/Search/Widget",
"position": {
"left": 55,
"top": 5,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_Search_Widget_4",
"name": "Search"
},
{
"uri": "widgets/Coordinate/Widget",
"position": {
"left": 7,
"bottom": 5,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_Coordinate_Widget_5",
"name": "Coordinate"
},
{
"position": {
"left": 55,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 1,
"id": "_6",
"version": "2.5",
"closeable": true,
"uri": ""
},
{
"position": {
"left": 105,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 2,
"id": "_7"
},
{
"position": {
"left": 155,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 3,
"id": "_8"
},
{
"position": {
"left": 205,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 4,
"id": "_9"
},
{
"position": {
"left": 255,
"top": 45,
"relativeTo": "map"
},
"placeholderIndex": 5,
"id": "_10"
},
{
"uri": "widgets/OverviewMap/Widget",
"position": {
"bottom": 0,
"right": 0,
"zIndex": 1,
"relativeTo": "map"
},
"version": "2.6",
"id": "widgets_OverviewMap_Widget_11",
"name": "OverviewMap"
},
{

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

  Here is what I have in my [install dir]\client\stemapp\predefined-apps\default\config.json (note this is not my specific apps json file).

    {
      "uri": "widgets/LocalLayer/Widget",
      "visible": false
    },

For one of my specific apps it looks like this:

  "widgetOnScreen": {
    "widgets": [{
      "uri": "widgets/LocalLayer/Widget",
      "id": "widgets_LocalLayer_Widget_19",
      "icon": "widgets/LocalLayer/images/icon.png?wab_dv=2.7",
      "name": "LocalLayer",
      "position": {
        "relativeTo": "map"
      },
      "config": "configs/LocalLayer/config_widgets_LocalLayer_Widget_19.json",
      "version": "2.5"
    }, {‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos