4.5. Map Viewer

Map Viewer is a JSP page used for viewing maps. It is located at http://machine:port/<ERES_CONTEXT>/MapBuilder/MapViewer.jsp. It can be used for both Google Maps and SVG Maps. If you open map from Organizer or Menu Page, it is automatically opened in the Map Viewer. Another way to use the Map Viewer is to write your own map URL. This is described in the next chapter.

Click to view larger image

ERES Maps Viewer (showing SVG Maps with threshold)

4.5.1. Writing Map Viewer URL

You can write your own Map Viewer URL. The URL always begins with location of the Map Viewer JSP: http://<machine>:<port>/<ERES_CONTEXT>/MapBuilder/MapViewer.jsp?. Following the question mark you need to specify Map Viewer parameters. Parameters are separated by the & character.

The most important Map Viewer parameter is filePath. It specifies the path to the map you want to display. The value can be either URL or file path on the server. The file path can be absolute or relative to the ERES installation directory. This parameter is compulsory and must always be specified.

The rest of the Map Viewer parameters is used for setting map parameters. These parameters have no function in non-parameterized maps, so they are ignored if the map is not parameterized. The parameters are:

ForHTMLParamPage:

This is a Boolean flag that indicates whether or not to display parameter page before displaying map. If this argument is set to true then the URL will return the parameter page and ignore any parameter values passed into the URL. This argument is false by default.

QueryParamName:

This parameter is used to specify parameter for parameterized map. QueryParamName specifies the name of the parameter you will be supplying a value for. (Parameter names are specified when you create the query. For more on this, see Section 2.4.3.2.2 - Parameterized Queries) It is always followed by the QueryParamSize, and the QueryParamValue parameter.

QueryParamSize:

This parameter is used to specify the number of values that will be passed into a particular map parameter. As detailed in Section 2.4.3.2.2.1 - Multi-Value Parameters, some queries can have multi-value parameters. This URL parameter allows you to specify if the parameter (indicated by the previous QueryParamName parameter) takes multiple values. This parameter is always followed by one or more QueryParamValue arguments for each of the parameter values for a particular parameter. If you do not specify this parameter, it will assume that the number of values to be passed in is one.

QueryParamValue:

This parameter is used to specify a parameter value that you would like to pass to the query parameter specified by the QueryParamName argument. For multi-value parameters, a separate QueryParamValue argument must be supplied for each distinct parameter value that you are passing in. For more on creating parameterized queries, please see Section 2.4.3.2.2 - Parameterized Queries.

Example:

To open GoogleMapParam (one of the map examples - parameterized Google Map) with parameter State set to CA, use this URL:

http://machine:port/<ERES_CONTEXT>/MapBuilder/MapViewer.jsp?filePath=help/examples/Maps/MapExample1/GoogleMapParam.gxml&QueryParamName=State&QueryParamSize=1&QueryParamValue=CA

Please replace machine with your machine name or IP, port with the port Tomcat is running on (8080 by default) and <ERES_CONTEXT> with your ERES context (ERES by default).