Select to view content in your preferred language

off panel widget

2865
14
Jump to solution
04-18-2018 03:59 AM
MatejSkerjanc
Regular Contributor

Trying to create my first off panel widget, it would have no ui template just configuration, settings ui etc...

From what i read on this forum (yes the api documentation meantions nothing about this) you need to add your widget to the \client\stemap\predefined-apps\default\config.json

but in what format and to which element

According to the forum I

1. copied Scalebar widget (which is off panel widget), renamed it and changed name in manifest

2. went to config.json (mentioned above) and added a copy of scalebar widget items i found in this json

under 

1.

widgetOnScreen.widgets 

{
"uri": "widgets/Something/Widget",
"position": {
"left": 17,
"bottom": 25
},
"version": "0.01"
},

2. mobileLayout.widgetOnScreen.widgets 

"widgets/Something/Widget": {
"position": {
"left": 7,
"bottom": 40
},
"version": "1.4"
},

I am left without any idea how to add off panel widget now. 

Also when you want to deploy this to IIS for portal admins to use on their Portals will they have to write into these configuration files as well?

Best regards

0 Kudos
14 Replies
MatejSkerjanc
Regular Contributor

Hello Robert I see, i deleted it but still same result, on the left its the original Scalebar and in the inpanel widgets i see the new "scalebar", and i have no idea why it is called scalebar still. Thought i changed the name 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Matej,

   The label still being Scalebar is simple you like did not do the step I outlined about changing the _widgetLabel in the strings.js. Have you tried to start new app? The issue with setting the widget in the predefined-apps\default\config.json is that it only takes affect when creating a new app, and does NOT affect existing apps.

MatejSkerjanc
Regular Contributor

found the string just as i read this:)

Oh so i have to make another app in order for it to work ...I'll try that and report back as soon as i get VPN going..its bugging out. Thanks!

0 Kudos
MatejSkerjanc
Regular Contributor

Hello mr. Robert

I've added another app and the widget was still in the inpanel section. 

This is the entire widget ExpireBox | GDiGisPluginWidget.7z its not done yet but it should start without a prob. Its located in the \client\stemapp\widgets. And this Pastiebin.com 5ad978fa2fe76 

is the \client\stemapp\predefined-apps\default\config.json

Cannot find the reason why wont it appear in the off panel

p.s it did work if i complete the steps in the application itself

0 Kudos
MatejSkerjanc
Regular Contributor

Mr. Robert,

After I've done second new application it worked...dont ask me how that happened but in the 2nd new app its where it belongs. Thank you for your help, I'm really grateful

0 Kudos