3.1 MapViewer Map Server

This section explains how to submit map requests in XML format to MapViewer, and it also describes the XML document type definitions (DTDs) for the map requests (input) and responses (output).

XML is widely used for transmitting structured documents using the HTTP protocol. If an HTTP request (GET or POST method) is used, it is assumed the request has a parameter named xml_request whose value is a string containing the XML document for the request.

As shown in Figure 1-1, the basic flow of action with MapViewer is that a client locates a remote MapViewer instance, binds to it, sends a map request, and processes the map response returned by the MapViewer instance.

A request to the MapViewer servlet has the following format:

http://hostname[:port]/MapViewer-servlet-path?xml_request=xml-request

In this format:

  • hostname is the network path of the server on which MapViewer is running.
  • port is the port on which the web server listens.
  • MapViewer-servlet-path is the MapViewer servlet path (for example, mapviewer/omserver).
  • xml-request is the URL-encoded XML request submitted using the HTML GET or POST method.

The input XML is required for all requests. The output depends on the content of the request: the response can be either an XML document, or a binary object containing the (generated image) file requested by the user.

In an input request, you must specify a data source, and you can specify one or more of the following:

  • Themes and styles.
  • A center point or a box for the map display, and options such as highlight, label, and styles.
  • A predefined base map, which can be reused and overlaid with custom data.
  • A custom theme with the user data points (or any geometry) retrieved dynamically and plotted directly from an accessible database.
  • Custom features (point, circles, or any geometry) specified in the XML request string to be plotted. These require that you provide the dynamic data in the format of the <geoFeature> element (described in Section 3.1.2.5), as defined in the DTD. The geometry portion of the <geoFeature> element adopts the Geometry DTD as specified in Open GIS Consortium Geography Markup Language Version 1.0 (OGC GML v1.0).
  • Thematic mapping.

You can manage the definition of base maps, themes, and styles (individual symbologies) using the Map Builder tool, which is described in Oracle Map Builder Tool.

Note that the MapViewer accepts only a coordinate pair to identify the location for a map request; it cannot take a postal address as direct input for a map.

More examples of map requests and detailed explanations of XML DTDs for requests and other operations are described in the following topic: