Select to view content in your preferred language

Custom widget and Map widget tool (Measure tool) communication options

753
3
Jump to solution
04-05-2024 12:19 AM
tamasoz
Emerging Contributor

Hi,

I am rather new to ExB so this might just be a tivial issue for some...

I've a built a custom widget that do a few things on a map - this is all good. However as per client's request we need to add the Measure tool to the Map Widget. 

I would like my custom widget to know when the user opens the Measure tool or vica versa if that is possible.

I understand that there are ways to send Messages and Actions out from a custom widget - that is fine. Not sure how I should configure the Map widget in EXB to receive such message or send one out when the user opens the Measure tool..

I'd be happy to see a trigger that can be raised in the Map widget's Trigger section related to these - but its not there - the only two option there is "Extent change" and "Record selection change".

All I need to do is to have my Widget panel closed when the user opens the Measure tool.

So what I would like to know if there is any way to implement this at all? If it is then what is the best architecture to achieve this?

Obviously if there were a measure widget available that I can just put under the Widget controller where my custom widget is then there would be no issue as that I can configure to have only one widget open at one time. But I cannot see the Measure widget as an available option.

Thank you

1 Solution

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

A stand-alone Measure Widget is scheduled for the next update, so if you can wait a few months, that's probably your best solution.

ArcGIS Experience Builder 2024 Roadmap (esri.com)

If you want something now, there is probably a way to use reactiveUtils to put a watch handle on the measure widget. The default measure tool in the Map Widget is a Measurement Widget from the API placed inside an Expand Widget. I'm not sure what the exact syntax would be but there should be a method to track the Expand Widget's expand property to check if it is opened.

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
3 Replies
JeffreyThompson2
MVP Regular Contributor

A stand-alone Measure Widget is scheduled for the next update, so if you can wait a few months, that's probably your best solution.

ArcGIS Experience Builder 2024 Roadmap (esri.com)

If you want something now, there is probably a way to use reactiveUtils to put a watch handle on the measure widget. The default measure tool in the Map Widget is a Measurement Widget from the API placed inside an Expand Widget. I'm not sure what the exact syntax would be but there should be a method to track the Expand Widget's expand property to check if it is opened.

GIS Developer
City of Arlington, Texas
0 Kudos
tamasoz
Emerging Contributor

Thanks Jeffrey, this is exactly what I have been looking for - in the meantime I can restrict the user actions in my widget so it does not influence the measure widget when its active - though I must say the reactiveUtils-based watcher does look promising - I'll see which implementation I can have the time to go forward with - I will post the source if I implement something re this.

Cheers

0 Kudos
AntonTymoshenko
New Contributor

Good day, Jeffrey, 

are there any updates regarding Measure Widget feature, when should it be deployed?