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
Solved! Go to Solution.
Chris,
Please refer to this thread where I have answered this question
This should be found in the config.json file. Their position is indicated using the position tag:
"position" : {
"left" : 25,
"bottom" : 25,
"relativeTo" : "map"
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.
Can you send me your code?
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"
}
}
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"
},
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.
Chris,
Please refer to this thread where I have answered this question
Thanks Robert.
I would have never found that.
Chris