Show popup widget window after map click

307
1
01-18-2024 05:49 AM
Labels (1)
LeifNorberg1
New Contributor II

We would like our custom widget to behave like this:

1) User clicks the widget icon to enable the widget. No widget popup window is shown.

2) After the user clicks on the map, the widget window is opened.

3) A js function is called and we can fetch the clicked coordinates.
Something like:
map.on("click", function (evt) {
var x = evt.mapPoint.x;
var y = evt.mapPoint.y;
})

How do we stop the widget window of showing after clicking the widget icon?

1 Reply
BrianLeroux
Occasional Contributor III

Maybe a workable solution would be to minimize the widget using minimizeWidget(widget) and then when you are ready call normalizeWidget(widget) to put it back to the normal size.

https://developers.arcgis.com/web-appbuilder/api-reference/widgetmanager.htm 

0 Kudos