Hi all,
Right now in WAB I have code to allow the user to click on the map, capture the x/y location, initate a popup with a link (that has the x/y location passed in), and when the link is hit fires up Survey123 to enter data.
What I want to do next is allow the user to click a button to perform this rather than have this option on "all the time".
Any ideas or samples?
Thanks,
Joe
Solved! Go to Solution.
Joe,
OK, I posted that back in February so that is years ago for me in GeoNet time. I did not create a settings dialog for the widget so it will error and spin when you add it to the app but just hit OK and then use the widget.
It worked.
Just a few questions:
-can the widget instead just be an on/off?
-Once the user clicks the widget to turn it on they can immediately click on the map and a new browser tab will open. This avoids a few clicks. Is this possible?
Thanks
Sure. I have given you a start but I can not do all your development for you.
What areas of the code should I focus in to accomplish this?
For the on-off portion you would edit the manifest.json and set inPanel to false then run all your code in onOpen function (i.e. adding you map click event and then in onClose remove the click event handler. My Layer Toggle Button widget is an example of an on off widget. By the way it is probably time to mark this question as answered before you go changing/adding to the question again lol.
Thanks!