Is there a way to get the extent of the map dynamically when the it changes?
I want to make a query based on the current extent of the map. So that every time that users zoom in/out the list updates with the current extent.
For instance in WF4 we can do that via "ListenForExternalEvent" activity and "MapExtentChangeEvent"
I have tried to use some display form events or loops and still couldn't find a good way.
-
Hello Adrian,
It is possible using the Get Map Extent's extent output as an input to the Query Layer's geometry input. You can try and use the Run Command activity with those commands; I'll try this myself and let you know.
I'm not sure if this is currently possible to achieve dynamically without using those events but a similar experience could be done by interacting with a form element and set the query to run when the change event is fired.
Thanks,
Stefan
0 -
I'm not able to use that command in the same manner as WF4. I'll create an issue for our devs to look at. Thanks.
0 -
Hello Stefan,
Thank you for the fast respond and looking forward to hear when this issue is solved.
Best Regards.
0 -
Hello Adrian,
I posed your question to the development team and they stated that there are no short term plans to address this but there are a few possibilities for achieving this behaviour:
- Add a "behavior" to the map extent changed configuration in Desktop.json.js that calls the RunWorkflowByUrl command.
- Use GW4 to listen for the event and then have it call the RunWorkflowByUrl command.
- Implement a custom activity that subscribes to the event.
0 -
Hello @Adrian Akbari? , @Stefan Schweigert? ,
How can you add a behavior in the Desktop.json.js file that calls the runWorkflowByUrl command. We want to implement a custom behavior when clicking on the map in stead of the "InvokeMapTip" behavior.
I tried already this notation but it didn't work. How did you do that?
0 -
Hello Wouter,
I don't believe that it is possible to configure this command directly within this behaviour as the url is a required parameter for RunWorkflowByUrl. I'll let you know if I can find a solution, but you could add this to the Ideas section.
Thanks, Stefan
0 -
I would also like to see this as an enhancement. Would be very useful to be able to detect changes of scale/extent automatically and fire a event when it occurs.
0
Please sign in to leave a comment.
Comments
7 comments