Print Templates - Showing Imagery Dates
Forgive me if there is a simple solution to this, I have only set up basic print templates in the past. What I would like to do is have a field on my print template where the date of the aerial photography (if selected) is shown. Where it gets a bit more complicated is that my imagery layer does not actually have the dates they were flown as an attribute field. To get around this, I have created a transparent polygon layer which then has the dates as an attribute field so that the user can find out how up to date the imagery is.
So to break it down - is it possible to have a field on the print template that will show the date attribute field of the Aerial Photography Dates layer that is within the map extent? If so, is it possible to make this work when the dates layer is NOT turned on in the layers, but when the actual aerial photography is turned on?
How that makes sense!
Aled
-
Hi Aled,
This is possible using Workflow.
First, you'll have to set up an editable text field in your report. Add the text box where you'd like it to display, and set the DataField property to a value of your choosing. In Rest Manager, edit your print template and go to the Text Fields tab. Add the text box, give it a Display Name, and set it to be editable.
In your workflow, use a GetLayerVisibility activity to get the visibility of a layer in your aerial service. Make sure that you set the Effective Visibility property to True, so that it will be True when the service is on, and False when the service is not visible. Then, if the visibility is True, query your polygon layer for the attribute that holds the date. It will not matter if this layer is visible, or even added to your site. Pass the resulting date to the TextFields property on the PrintMap activity either by adding it to a dictionary, or using the following syntax:
New System.Collections.Generic.Dictionary(Of String, String) From { { "tb1", imageDate } }
where imageDate is the string variable holding the value of the date, and tb1 is the display name of the Text Field that you set up in Manager. Finally, use a Display Hyperlink activity to allow the user to download the print.
A sample workflow can be downloaded (https://support.geocortex.com/Data/Sites/1/media/forumfiles/printwithdate.zip) here.
-Victoria
0 -
Hi Victoria,
That looks like exactly what I need. However, the issue here is that I do not have a Get Layer Visibility option. I am on 3.12, so was this option released after this? If so, is it possible to work around it by using a combination of something like the Set Layer Visiblity?
Thanks,
Aled
0 -
Hi Aled,
Get Layer Visibility was added in Essentials 3.13. I don't believe there is another way to get the current visibility of a layer using workflow. However, you could use a form to ask the user whether they want to include the aerial imagery in the print or not, and then use Set Layer Visibility to turn the layer on or off depending on their selection.
Alternatively, you could have two print options in the Viewer, "Print Map" and "Print Map with Aerial Imagery", and again use Set Layer Visibility to turn on the aerial layer if they choose to print with aerial imagery.
-Victoria
0
Please sign in to leave a comment.
Comments
3 comments