If you use Studio Printing and/or Reporting templates to generate map images from Studio Web apps, you may have noticed that feature highlights do not appear in the generated print/report. If you would like highlighted features to be emphasized in your prints and reports, here is a useful workaround that will allow you to do so.
Create a Workflow to Add Markup
Unlike highlight and focus symbols, markup that is added to a map does appear in prints and reports. Since manually adding markup to selected features can get tedious, especially for polygon features with many vertices, you can utilize a workflow that automates the process for you.
Building the Workflow
To get started, either import the attached workflow JSON to Studio Workflow and save it, or create a new workflow for Studio Web and do the following:
- Add a Get Workflow Inputs activity.
- Add a Run Operation activity, and set the Operation Name to results.to-graphics. In the Operation Parameter box, enter the following expression, substituting in the ID for your Get Workflow Inputs activity: =${Get Workflow Inputs ID}.inputs.context. This converts the VertiGIS Studio features collected by the Get Workflow Inputs activity into Esri graphics, since the command that adds markup to the map does not accept VertiGIS Studio features as its input.
- Add a Run Command activity, and set the Command Name to map.add-markup. In the Command Parameter box, enter the expression for the result of your Run Operation activity. (i.e. =$runOperation1.result)
- Save the workflow.
Integration with Studio Web
Once the workflow is saved, you can add it to Studio Web. It is very important that the workflow gets added as a Feature Action. Otherwise, the Get Workflow Inputs activity will not know what features you are feeding it. You can configure Feature Actions under the settings for any Results component in Web Designer.
Running the workflow on a feature or a collection of features will draw markup based on the style you have set for the Draw tool. To change the look of the mock highlight, adjust the Point Style, Line Style, or Polygon Style settings in the Draw tool submenu.
Once you have finished generating the print or the report, the added markup can be cleared one-by-one using the Edit Markup tool in the Draw tool submenu, or all at once using the Clear Markup tool in the All Markup submenu.
NOTE: The tool names and submenu items are based upon the Web GIS - Default template for Studio Web 5.23, and may be different depending on your app configuration.
Comments
0 comments
Article is closed for comments.