The HTTP Service API (REST style) is capable of returning map image files or JSON (Javascript Object Notation) responses for easier and faster integration of light weight GIS functionality into websites or web applications with a non-GIS focus.

Prerequisite for a map image is a running WebOffice 10.9 R4 project. Instead of calling the project with https://myserver.domain.com/<WebOffice web application>/synserver the preview images are called with https://myserver.domain.com/<WebOffice web application>/synservice.

 

Several parameters that known from the URL call inteface are also supported (a detailed description for the parameters can be found in the Chapter WebOffice URL Call interface):

 

Actions / Parameter

Description

Basic Information

project

Specifies the ID of the project (Project ID) to be launched by WebOffice 10.9 R4 client.

E.g. use

project=WebOffice_SampleProject

for starting the WebOffice 10.9 R4 Sample Project configuration.

projectinfo

The JSON response shows the layer ID as well as geometry types and edit layers in the node PROJECTINFO

metainfo

The JSON response shows METAINFO information regarding version and build time.

user

User (when using WebOffice UserManagement)

password

Password (when using WebOffice UserManagement)

usergroup

Define a user group to avoid manual selection of UserManagement groups (when using WebOffice UserManagement)

roles

Role for Authentication type HTTP and Authentication type Portalverbundprotokoll (when using WebOffice UserManagement)

um_fallback

If an UM Fallback is configured at the Authentication type, the parameter um_fallback=True allows the authenitication via an UMDB user.

Map Display

x (map units)

Define this parameter to set the center point (x coordinate) for initialization

y (map units)

Define this parameter to set the center point (y coordinate) for initialization

scale

Define this parameter to set the scale for initialization

width (px)

Width (in pixels) of the map image

height (px)

Height (in pixels) of the map image

view

Defines the Map View to be used in the map image.

The configuration of a map view contains a unique ID (External ID). For example, if the ID in WebOffice author standalone is citymap, then use view=citymap

basemapview

Defines the Basemap View to be used in the map image.

The configuration of a basemap view contains a unique ID (External ID). For example, if the ID in WebOffice author standalone is orthofoto, then use basemapview=orthofoto

geo_bookmark

Use this parameter if you want to display the map at a certain spatial extent.

icon_cross-reference

To use this parameter at least one Geo bookmark has to be configured. (See chapter Geo Bookmark.) If e.g. the identifier in WebOffice author standalone is configured to Vienna, then use geo_bookmark=Vienna.

exclude_north_and_scale=true

With the parameter &exclude_north_and_scale=true only a map image will be displayed. North arrow, scale bar and copyright will be suppressed.

dpi

Allows the creation of high quality map images for third application. By default map images are rendered with a resolution of 96dpi. Increase the value to e.g. 192 or 288 for higher resolution.

icon_comment

If a map image with &dpi=288 is being requested, then the 288dpi image will nevertheless be displayed in 96 dpi. That is why the image size has to be increased as well. In this case (288dpi is a threefold of 96dpi) the image will be three times the size.

Position

xmin

ymin

xmax

ymax

Use these 4 parameters for specifying the initial map extent.

lat

lon

starts the application centered at the WGS84 position defined by lat/lon (decimal degrees, decimal separator = .); this works with any project disregarding the projection of the project since lat/lon values are projected from WGS84 to the project coordinate system

coordmarker_lat_lon

Displays an image (by default pub\images\meet_x_20_20.png) to mark the spot which was defined by the specified coordinates. Separate the coordinates either with a space character or with %20. Example:

"&coordmarker_lat_lon=47.069 15.435"

"&coordmarker_lat_lon=47.069%2015.435"

icon_comment

The image can be changed by the following parameter (coordmarker_id).

coordmarker_id

Enter the ID which is configured in WebOffice author standalone in Meeting Points as External Marker-ID. This image will be displayed on the spot that was defined in the parameter coordmarker_lat_lon.

Functions

query (1... n)

keyname (1... n)

keyvalue (1... n)

separator

 

For executing a WebOffice 10.9 R4 search it is possible to pass these parameters.

WebOffice 10.9 R4 then executes the search and displays the results in the Search result and map.

 

icon_comment

For keyname only use the technical field name but not the alias of the field.

 

The parameter query identifies a predefined query.

 

icon_comment

In order to use query, keyname and keyvalue parameters External layer ID and Searchfield are required.

 

Search with multiple search fields: It is possible to search using multiple search fields as well, e.g. if you have address data with fields STREETNAME and HOUSENUMBER it is possible to search for a specific STREETNAME AND HOUSENUMBER (search for address Beachstreet, 1) by submitting a URL call like http://w-ws-koenig:8080/WebOffice601/externalcall.jsp?project=weboffice_masterprojekt&query=GST&keyname=STREETNAME&keyvalue=Beachstreet&keyname=HOUSENUMBER&keyvalue=1.

 

Using wildcards: Using the * character it is possible to search for keyvalues with a wildcard. E.g. you can search for every customer starting with M by typing keyvalue=M*.

 

Multilayer queries: Multilayer queries can be performed by repeating the query, keyname and keyvalue parameters with a suffix.

You can use any suffix (digits, characters, etc.), as long as there is a combination of query, keyname, keyvalue with the same suffix.

Pay attention that the WebOffice call by multilayer queries is only possible in WebOffice core and WebOffice html client because only there an object browser is available which can display multilayer results.

Sample:

externalcall.jsp?query=queryid_layer1&keyname=field_layer1&keyvalue=value_layer1&query2=queryid_layer2&keyname2=field_layer2&keyvalue2=value_layer2

 

externalcall.jsp?query_A=queryid_layer1&keyname_A=field_layer1&keyvalue_A=value_layer1&query_B=queryid_layer2&keyname_B=field_layer2&keyvalue_B=value_layer2.

 

Geolocator service: Geolocator service: WebOffice 10.9 R4 supports geolocator queries by using the parameters query and keyvalue. The parameter query contains the value, that is set in the geolocator query as External Layer-ID (see chapter Define Query), keyvalue contains the address for the geolocator service.

Sample:

externalcall.jsp?project=Test_Stmk&query=geoloc&keyvalue=Herrengasse 1, 8010 Graz

 

The separator parameter defines the separator between multiple search values (keyvalue). Following characters can be used as separators: @ ; - ! ~ / : =

returnkey

manages the result of the executed query where the attribute determined in the returnkey will be sent back in the response.

icon_comment

example request:

synservice?project=Test_Stmk&query=test&keyname=OBJECTID&keyvalue=1&returnkey=Name

Besides it is possible to configure multiple fields as returnkey. Separate the fields with ;, e.g. &returnkey=Name;ID;...

gp_tool

gp_param_name

gp_param_value

Specification of a GP tool configured in the project (gp_tool), whose result is returned, as well as its parameters  (gp_param_name) and their values (pg_param_value).

icon_comment

A GPX file can also be specified as an input parameter for geoprocessing. The GPX file is sent via multipart/form-data. name="gpxFile" must be set.

If the file size is too large to be processed, the maximum size of POST requests can be configured under C:\Program Files\ArcGIS\Server\framework\runtime\tomcat\conf\server.xml - Attribute maxPostSize

query_fts_mw

For more details see FTS in Service API

suggId_fts_mw

For more details see FTS in Service API

edit

For more details see Editing in Service API

image_format (PNG | JPG | data_only)

The value data_only determines that when editing a feature (or multiple features) no image will be created in order to minimize CPU and memory usage.

 

In order to get information about the current version (version and build time), just enter a synservice-request without the parameter project.

Example request: https://<myserver>/WebOffice/synservice

The response of the synservice-request provides the following information in the METAINFO section:

{

 "METAINFO": {

   "version": 10.5,

   "build": 20130228-1717,

   "mw_lic": true"

 },

 "response_id": 1ead5c3c-1bcc-4cd6-b4b0-e186d42df2ca"

}

 

 

Aktionen / Parameter

Beschreibung

version

Installed WebOffice version (majore release)

build

Curretn build of the WebOffice version

mw_lic

Existance of a WebOffice map widget license (true/false)

 

 

By calling a project together with the parameter &projectinfo=true information about geometry types of editing layers will be returned.

Example request: https://<myserver>/WebOffice/synservice?project=World&projectinfo=true

The JSON-response shows layer IDs of geometry types of editing layers in the node PROJECTINFO:

 

{
 "MAP": {
   "url": http://myserver/wo_output/World_20130304_152121_620_40.jpg,
   "x": 1288411.5,
   "y": 6023839.5,
   "scale": 1.174874185680074E7,
   "width": 640,
   "height": 400,
   "upp": 3108.5275
 },
 "PROJECTINFO": {
   "projectname": World,
   "scales": null,
   "editlayers": [
     {
       "layername": points,
       "geometry_type": POINT"
     },
     {
       "layername": lines,
       "geometry_type": LINE"
     },
     {
       "layername": areas,
       "geometry_type": POLYGON"
     }
   ]
 },
 "response_id": 00e38478-4ec4-43e6-88b4-13e245c4073c"
}

 

To get an impression how to use the JSON image preview in a website and to have an interface where you can test your calls, VertiGIS provides a demo website (file preview.jsp).

Open the preview website https://myserver.domain.com/<WebOffice web application>/client_preview/preview.jsp

 

Demo website for synservice interface

Demo website for synservice interface

 

icon_comment

The image format of the response image is configured in the image blending options of the WebOffice application configuration

icon_cross-reference

see chapter Image Blending for details.

 

Here you can test your requests and responses, e.g.:

../synservice?project=WebOffice_SampleProject&query=CNTRY&keyname=CNTRY_NAME&keyvalue=Austria&width=300&height=200

for a JSON request. The response to embed in your website would be:

{
 "MAP": {
   "url": http://<configured output folder>/Demo-Projekt_f_r_WebOffice_Demo-Projekt_f_r_WebOffice_20101210_131400_478_0c.png,
   "x": 4570333.84795,
   "y": 2744950.30755,
   "scale": 7889575.407841748,
   "width": 300,
   "height": 200,
   "upp": 2087.4543349000005
 },
 "FEATURES": {"COORDS": [{
   "x": 150,
   "y": 117
 }]}
}

 

The request for an image would be:

which you could directly embed as source of an image to a website:

 

icon_comment

That specified default map views will be ignored. The displayed layers depend on the TOC of map collection only!