Map Viewer is a JSP page used for viewing maps. It is located in http://machine:port/<ERES_CONTEXT>/MapBuilder/MapViewer.jsp
and it can be used for both Online Maps and SVG Maps. If you open a map from Menu Page, it is automatically opened in the Map Viewer (If you open a map from Organizer, it is opened in corresponding map designer). Another way to use the Map Viewer is to write your own map URL. This is described in the next chapter.
You can write your own Map Viewer URL. The URL always begins with the 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 mandatory and must always be specified.
The remaining Map Viewer parameters are 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:
This is a Boolean flag that indicates whether or not to display parameter page before displaying the 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 set to false by default.
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 information about this, see Section 3.1.3.2.2 - Parameterized Queries). It is always followed by QueryParamSize and QueryParamValue parameters.
This parameter is used to specify the number of values that will be passed into a particular map parameter. As described in Section 3.1.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 the values to be passed in is one.
This parameter is used to specify a parameter value you want 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 information about creating parameterized queries, please see Section 3.1.3.2.2 - Parameterized Queries.
Example:
To open GoogleMapParam (one of the map examples - parameterized Online 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).