Include Map via "synservice"

Alternative to the feature map and the current map, you can include a map by using the image component. The image is inserted as hyperlink and the hyperlink points to a WebOffice project. How to apply this is explained in the following example:

 

The goal is to create a report on traffic accidents. The traffic accidents should be grouped by municipalities. The map should not represent the single traffic accidents, it should represent the municipality with all containing traffic accidents.

 

First, the traffic accident data are inserted. From the table ACCIDENT the data fields STREET, TYPE and KG are required. STREET and TYPE are inserted as text in the data band of the table ACCIDENT (1). The data field KG contains the name of the municipality in which the traffic accident happened. This data field is used as grouping condition for the traffic accidents. The grouping is set in a group header (2). In a group footer (3) the total sum and the sum of the traffic accidents per type get listed.

 

Data source ACCIDENT

Data source ACCIDENT

 

Traffic accidents report - design view

Traffic accidents report - design view

 

A look at the preview shows the preliminary result of the report.

Traffic accident report - preview

Traffic accident report - preview

 

Next, the map is inserted into the template by using the hyperlink option for the image component. The map is embedded via a service. This requires a map service in a running WebOffice project. The WebOffice project is called by synservice, instead of synserver, which is the standard request.

icon_comment

For more details on the Service API and its parameters see the WebOffice User Manual.

 

To ensure that the URL delivers the correct map the URL must include special parameters:

Project
Name of the WebOffice project, e.g. project=Bregenz_Web

query
Name of the query/search how it is defined in WebAuthor, e.g. query=KG

keyname
Field name of the query/search, e.g. keyname=KGNAME

keyvalue
Value of the defined keyname, e.g. keyvalue={ACCIDENT.KG}. The value is different for every feature, therefore the value is dynamically passed by the data field KG.

icon_warning

ATTENTION!

To ensure that the values are passed correctly, it is required that the information (in this case it is the name of the municipality) is available in the WebOffice search as well as in the ePaper data source.

format
Return format. To insert the map as image the format image is required.

 

synservice URL

synservice URL

 

The result is shown in the figure below. The URL sets a query on the municipality Rieden. A selection shows and highlights the search result.

Map via synservice

Map via synservice