very similar question to this
I have created a Property Report widget (it is just a watered down Print widget using the Export Web Map) but now I'm looking for a simple way to present this to the user. If I could find where the 'Zoom To' comes from I'm sure I can add my own Property Report button in the same fashion.
It would be ideal to place this in the pop-up. In doing so I assume I will have access to the feature's attributes to pass them to my Print code for the customTextElements.
Thanks for any possible help...
Solved! Go to Solution.
Dave,
It seems a little easier in 2.0 but either way it involves a little work. In 1.3 you
// create PopupHandler this.popupHandler = new PopupHandler({ map: this.map, myWidget: this, nls: this.nls });
Dave,
Are you talking WAB 1.3 or WAB 2.0 as the methods for addign buttons to the popup have completely changed in 2.0?
Lovely, I will need to learn both or else I'll be stuck in 1.3 until I do.
Let's start with 1.3 for now.
Is the 2.0 technique significantly easier, or just different?
Dave,
It seems a little easier in 2.0 but either way it involves a little work. In 1.3 you
// create PopupHandler this.popupHandler = new PopupHandler({ map: this.map, myWidget: this, nls: this.nls });
This is great, I'm 95% there, but the button will only appear if the widget has been previously opened (understandable).
I've read some of your other answers regarding loading a widget at start-up but keeping it invisible. I also started with an in-Panel widget (Print) but I don't need the UI anymore. where can I initiate the widget to allow the popupHandler to initialize?
I've tried this but to no success.
"widgetOnScreen": {
"widgets": [{
"uri": "widgets/PrintDemo/Widget",
"position": {
"relativeTo": "map"
},
"version": "1.4",
"id": "widget_PrintDemo",
"name": "PrintDemo",
"label": "Print Demo",
"config": "configs/PrintDemo/config_PrintDemo.json",
"visible": true
}, {
any other suggestions?....
Dave,
If you do not need a UI anymore then delete you Widget.html and edit your manifest.json to be
inPanel: false
hasUIFile: false
hasStyle: false
Thanks I got it working!
it should be mentioned that the above attributes need to go into a 'properties' element
{........
"properties":{
"inPanel": false,
"hasUIFile": false,
"hasStyle": false,
"openAtStart": true
}
}
Thanks again, your help and contributions to the forum are invaluable and very appreciated!
Dave
The steps are still the same as outlined in this thread above.
@RobertScheitlin__GISP ,
I tried following the procedure mentioned above but couldn't found the 'PopupHandler.js' file in Attribute table widget. Also you mentioned that this procedure is for version 1.3 but i'm using version 2.16. I have added a screen shot of attribute table widget file.
Thankyou,