Network Locator offers the possibility to customize the look and feel of a couple of aspects using templates. This includes the dynamic PDF documents that are created by the system during a locate request processing.
There are three different types of documents available:
•Static
•Dynamic
•Negative Reply
You can upload a set of static documents that should be delivered as part of a locator request zip file. You can upload any kind of static document through the Admin interface. Once uploaded a static document gets referenced in the property vertigis.network-locator.default.static-files (see Process Manager) and is then packaged with each locate request.
Apart from adding static documents Network Locator also offers the option to create dynamic PDF documents. Typically these would be used to create a letter document that sums up the locate request.
A dynamic document is created through an Apache FOP Transformation. After the initial deployment there is a sample fop template available that can be used as a starting point to create your personalized transformation. Once uploaded the documents get referenced in the vertigis.network-locator.default.dynamic-document-templates (see Process Manager).
Since version Networks Locator 1.6, it is possible to reference the results of layer intersections directly within the FOP document. A sample fop configuration demonstrating how to iterate over intersected layers is shown here:
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="14pt" font-weight="bold" text-align="start" space-after="1cm">
Netzbetreiber – Kontaktdaten im Rahmen der Planauskunft
</fo:block>
<fo:block font-size="11pt" space-before="11pt" text-align="justify">
{#if group_results??}
{#for group_result in group_results}
{#if group_result.has_intersection is true}
{#for affected_intersection_layer in group_result.affected_intersection_layers}
{#if affected_intersection_layer.layer == 'gas.versorger'}
{#for feature in affected_intersection_layer.features}
<fo:block font-size="11pt" margin-left="15mm"> -------------- </fo:block>
<fo:block font-size="11pt" margin-left="15mm">Name: {feature.name}</fo:block>
<fo:block font-size="11pt" margin-left="15mm">Straße: {feature.street}</fo:block>
<fo:block font-size="11pt" margin-left="15mm">Stadt: {feature.city}</fo:block>
<fo:block font-size="11pt" margin-left="15mm">Beschreibung: {feature.description}</fo:block>
<fo:block font-size="11pt" margin-left="15mm"> -------------- </fo:block>
{/for}
{/if}
{/for}
{/if}
{/for}
{/if}
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
For reference this is the layer configuration that is used to query the data:
The negative reply document is a specialized version of a dynamic document. It is created in cases where for an entire intersection group there is not a single affected feature. In this case there will be no PDF map created but instead the negative reply document is created. In this way you can make sure that a user will never get a map that does not contain any network data.
The negative reply document is references in the parameter vertigis.network-locator.default.negative-reply-templates (see Process Manager).