Hoppa till huvudinnehållet

Is there away to disable popups during geometry selection?

Kommentarer

15 kommentarer

  • Permanently deleted user

    My team and I resolved this. Here are the steps we took to accomplish it.

     

    1. Get Map
    2. Set Property Activity
      1. Object: =$map.map.map.infoWindow.domNode
      2. Property Name: hidden
      3. Property Value: true
    3. Form with Geometry Picker
    4. Set Property Activity
      1. Object: =$map.map.map.infoWindow.domNode
      2. Property Name: hidden
      3. Property Value: false
    5. Continue workflow
    0
  • Permanently deleted user

    There's a bit of an issue with the above method if the user starts the workflow and then closes rather than submit/cancel. The Set Property Activities are better suited in change events inside your form. For example: radioButtonList on change, hidden = true; geometryPicker on change, hidden = false.

    0
  • Darryl Klassen

    I am trying to do the same thing. I have a check box and basically I want 2 things to happen when the box is checked:

    • allow popups $map2.map.map.infoWindow.domNode HIDDEN = false
    • disable the geometry selection tool

    The popup part is working fine, but the first time I pick a feature - it selects it and provides the popup. The 2nd time i click another feature - only the popup comes up. Basically the disabling of the selection tool is not taking effect until after I run it 1 last time. Any thoughts on this? I have an IF tool that runs a Set Form Element Property - Selection tool enabled = false if the box is selected.

    Untitled

    0
  • Permanently deleted user

    Try turning off the popup before the geometry picker or outside of the IF. I suspect what's happening is that your IF is passing a False or somehow resetting your popup back to ON. It's difficult to know where the issue resides exactly without seeing more of your workflow.

    I have my popup turning OFF as the first event in the Geometry Picker change, and turning back ON immediately outside of my Form.

    Hope that helps.

    0
  • Darryl Klassen

    Thanks JD. Do you mean you have the Set Property function after the Display Form on the Start window? This doesn't seem to be working for me.

    Untitled

    0
  • Permanently deleted user

    Here's a simple set up of how I had mine to show you placement. Off in the Picker change event and On after the form

    0
  • Darryl Klassen

    Thanks JD. That makes sense, but the Set Property after the form doesn't seem to invoke. I have even tried putting a LOG activity there to see if it runs, and it doesn't. Once the hidden is set to TRUE in the geometry picker - it doesn't ever go back to false when I close the form.

    0
  • Permanently deleted user

    You could try and put it in the Form Button Bar Click event. It's hard to know where would be the best place to put it without knowing what else is going on in your workflow.

    If that doesn't work, would you be willing to share your workflow, or at least part of it?

    0
  • Darryl Klassen

    Attached is my workflow.

     

    0
  • Permanently deleted user

    Looks like there are a couple of solutions depending on how you want the user experience to be.

    1. In order for your workflow to exit the Form and reach the Popup-On after the Form, one of the buttons must be set to Cause Validation. Since you have the Popup-Off in the change event on the picker it should turn back off if they run the flow again as long as you have the Form reset.
    2. If you don't want either of the buttons to cause validation I'd suggest putting the Popup-On at the end of the Click-Footer flow. Just tie the end of both True and False branches from your IF that checks to see if the user clicked "apply" to the Popup-On.

    The idea is for the popup to come back on once the user is finished doing their work, so whenever that is in your flow that's where you set the property.

    0
  • Darryl Klassen

    Thanks so much for all your help/suggestions on this JD. I will try a few of these options and see what is best for the user interaction.

    Darryl

    0
  • Permanently deleted user

    An alternative solution to turn off popups (and the display of a selected feature in the map) is to do the following:

    1) 'Get Map' activity

    2) 'Evaluate Expression' activity with the following expression:

     

    =$map.map.map.setInfoWindowOnClick(false)

     

    and to turn back on:

     

    =$map.map.map.setInfoWindowOnClick(true)

     

    Cam

    0
  • Darryl Klassen

    Thanks Cam, I have seen this in another forum, but the issue I have is I don't have a trigger for turning it back on - i.e. when the form closes using the upper-right X of the dialog box. This works if I add a CLOSE button to the form, but without that - there is nothing to trigger this workflow item.

    0
  • Permanently deleted user

    Hey Darryl, there is a relatively easy way to remove the 'X' in the upper-right corner of the form. You can use the 'Inject CSS' activity to hide, then show the 'X'.

    The Content value for hiding is (assuming WAB host):

     

    ="div.close-btn { display:none; overwritePreviousCSS: "+Date.now()+" }"

     

    The Content value for showing is:

     

    ="div.close-btn { display:block; overwritePreviousCSS: "+Date.now()+" }"

     

    Capture

    0
  • Darryl Klassen

    That is great - thanks Cam. Do you know if there is any way to tie the Evaluate Expression object to the X button itself? As opposed to a close button?

    0

Du måste logga in om du vill lämna en kommentar.