position widget panels

4241
8
Jump to solution
09-29-2015 10:03 AM
ChrisBradberry
Occasional Contributor

I am using the launch pad template, and when I open the widgets, they line up on top of the navigation buttons on the left side.  The widgets all line up beside one another, and I can't seem to find where to adjust the behavior.  I would like them to start just right of the navigation buttons. 

Does anybody know how to do this?

Thanks, Chris

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Chris,

   Please refer to this thread where I have answered this question

Layer List auto start location change

View solution in original post

8 Replies
DanielStoelb
Occasional Contributor III

This should be found in the config.json file.  Their position is indicated using the position tag:

"position" : {

  "left" : 25,

  "bottom" : 25,

  "relativeTo" : "map"

0 Kudos
ChrisBradberry
Occasional Contributor

Daniel,

That did not change anything.  I think that it must be somewhere else because none of the widgets have a position tag, and they line up adjacent to where the previous one was placed.

0 Kudos
DanielStoelb
Occasional Contributor III

Can you send me your code?

0 Kudos
ChrisBradberry
Occasional Contributor

I don't have much, just what you said to put in the config.json

{
  "legend":{
    "arrangement": 0,
    "autoUpdate": true,
    "respectCurrentMapScale": true
  },
   "position" : {
  "left" : 25,
  "relativeTo" : "map"
  }

}

0 Kudos
DanielStoelb
Occasional Contributor III

The position should be in reference to the specific widget you are trying to position.

For example, you'd have the "My location" widget placed here:

{

  "uri" : "widgets/MyLocation/Widget",

  "position" : {

  "left" : 7,

  "top" : 110,

  "relativeTo" : "map"

  },

In your code sample above, the location is not referencing anything.  You should see a section in the config.json that is tagged as "widgetOnScreen".  The code should be similar to this:

{

        "uri": "widgets/MyLocation/Widget",

        "position": {

          "left": 25,

          "top": 215,

          "relativeTo": "map"

        },

        "version": "1.3",

        "id": "widgets_MyLocation_Widget_25",

        "name": "MyLocation",

        "label": "My Location"

      },

0 Kudos
ChrisBradberry
Occasional Contributor

The problem is that the way the launch pad template works is the widgets load dynamically.  If one is placed, the rest of them line up adjacent to it.  Then when the first one is removed, the next one fills in where the first one was.  This is more complex than just placing it on the screen.  I only wanted to move them over a bit to keep them from covering the navigation buttons. 

Capture.PNG

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Chris,

   Please refer to this thread where I have answered this question

Layer List auto start location change

ChrisBradberry
Occasional Contributor

Thanks Robert. 

I would have never found that.

Chris

0 Kudos