Hoppa till huvudinnehållet

Kommentarer

6 kommentarer

  • Stefan Schweigert

    Hello Thomas,

     

    There is not a specific activity for this process but it can be achieved using a number of activities. In order to gather the features, you can use a Display Form with a Geometry Picker to obtain an area, which could then be used as a Geometry input to the Query Layer activity to gather a feature set. Then, with the Show Results activity, you can use the results parameter from that query to select the features within.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Hi Thomas,

     

    To interactively select points by a rectangle drag, you would use the 'Geometry Picker' element within the 'Display Form' task. Then use the geometry created to select points or other features from your layer.

     

    Step by step, this is what you would do within the workflow:

    1. In a blank workflow drag a 'Display Form' from the Toolbox. Double click on it. Create a Title of your choosing.

    2. Drag a 'Geometry Picker' from the list of activities available and place it between the Title and the Submit / Cancel buttons.

    3. On the right hand side of the screen, while the Geometry Picker is active, configure a title, and on the button label write something like 'click here and drag a rectangle on the map'.

    4. Choose geometry type, i.e. select by point, polygon - for rectangle, choose 'Extent'.

    5. Choose maximum number of geometries - e.g. can you click just one point or polygon, or multiple. It is easier initially just to choose one geometry.

     

    Save your workflow, and keep saving as you go....

     

    6. Next, get out of the 'Display Form' task by clicking 'Start' (on the breadcrumb on the top of your screen).

    7. And add a 'Query Layer' task under the Display Form. Connect it with the Display form by dragging and arrow from the display form to the query. Choose your URL - this will be the Map Service you are querying - e.g. https://server/arcgis/rest/services/Service/Mapserver/1 

    8. In the 'Geometry' area type: =$form1.state.GeometryPicker1.value.geometry[0] - this will use the polygon you just created as your selection area and it will select the features from your map service that lie under this. There are many other items that can be filled in here, but this is all we really need. 

     

    9. To show your selections on your map, drag a 'Show Results' task under your 'Query Layer' task and connect it. Here you will need to add the feature set result from your query in the 'Features' area - =$query1.results. In the 'Combine Mode' area write 'replace' (not in inverted commas). This allows for a new selection each time the workflow is run. The default is union mode.

     

    10. Now load the workflow into your viewer, and activate the workflow. The geometry picker you configured will appear. To make your selection, you need to activate the Geometry Picker by clicking on the blue banner.

     

    11. Make your selection, and it should appear on the map.

     

    This is the bare bones on how these tasks work. You can make them a lot more elaborate later. Also, we have some tutorials available on this site (in the Getting Started section) and I would recommend doing them. 

     

     

    I hope this helps,

    Marion.

     

     

     

     

     

    0
  • Permanently deleted user

    I tried the above steps but ran into this error after the Display form and before the Query Layer.  

     

    [WF: activity error] Cannot read property 'wkid' of undefined

     

    I've reviewed some of my older WFs and I'm not seeing what I missed.

     

    Thanks

    Tom

    0
  • Permanently deleted user

    I inserted a "Project Geometry" activity and it worked.

    0
  • Stefan Schweigert

    I'm glad to hear you were able to sort out this issue.

    0
  • Reno Sun

    This is fantastic Stefan Schweigert!

    Is it possible to for VertiGIS Studio Workflow - Display Form - Geometry Picker to natively query only visible layers on the web map? 

    I currently get it working to show selected result from "Query Layer" using "Show Results". However, the attributes of selected features are based on "Output Fields" of "Query Layer" activity, but not natively grabbing the configured "attributes" of layers of the web map used by VertiGIS Studio Web application. 

    I would like to have a way to use geometry picker to select on the map, and automatically grab all visible layers' selected features without creating "Query Layer"s for over 60 different feature layers on the web map.

    Cheers,

    Reno

    0

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