Hello all,
I am trying to use the LDockable panel functionality from the Jewelry box theme to my custom theme, but I can't figure out where to put my widget for it to register it in the config.json that one is present. The panel only shows up in the Jewelry box if you put a widget in in when you create the map. Has anyone tried to use this panel in their theme's?
Thanks for the help.
Doug
Solved! Go to Solution.
Do you have the JewelryBoxTheme copied in the themes folder of your app?
Doug,
I don't know if this is what you're after, but I added the left dockable panel after the zoom slider in my config JSON. Here's an example of the code that I have displaying the legend widget within that panel:
"groups": [
{
"visible": false,
"panel": {
"uri": "themes/JewelryBoxTheme/panels/LDockablePanel/Panel",
"position": {
"left": 0,
"top": 40,
"bottom": 0,
"width": 360,
"relativeTo": "browser"
}
},
"maxWidgets": 1,
"id": "_19",
"widgets": [
{
"name": "Legend",
"label": "Legend",
"version": "2.1",
"uri": "widgets/Legend/Widget",
"config": "configs/Legend/config_Legend.json",
"id": "widgets_Legend_Widget"
}
],
"label": "Group_0"
}
],
Hello Daniel,
Yes, that is what I did, but for some reason, I keep getting an error saying I have "an unexpected character at line 1 column 1 of the JSON data". I don't see anything wrong with the config.json in my theme, so it has to be something somewhere else. Any ideas?
Thanks,
Douglas
Sounds like it might be a missing comma, semicolon, or something else. Can you post your code or PM me the code?
Turned out that I did not have the config folder for that widget in the configs folder. That got rid of the error, but the panel still won't show up.
Do you have the JewelryBoxTheme copied in the themes folder of your app?
No I don't. Why do I have to?
Because if you don't have that directory, you wouldn't have the panels folder that houses the LDockablePanel widget files.
I did that and remapped the panel to the Jewelryboxtheme and the panel is showing up now. Why did that work?
I am thinking that it was looking for the location of the widget javascript for the left dockable panel and couldn't find it.