Using the mapxtreme tile handler – Pitney Bowes MapXtreme User Manual

Page 95

Advertising
background image

Chapter 5: Web Applications, Controls, and Tools

MapXtreme Tile Handler

MapXtreme v7.1

95

Developer Guide

contain information exclusive to the user, such as information returned from a query, these maps are
generated on the fly. Because they are tiled, only the tiles that would be visible in the map window
(based on the tile size, map window size and zoom level) would be returned.

For an example of a web application that takes advantage of the MapXtreme Tile Handler, see the
MapXtreme Tile Handler example located on the

MapInfo Developers Code Exchange

.

MapXtreme provides support for:

requesting tiles by their row and column positions in the map

requesting a list of available maps

requesting a description of a map

specifying the cache instructions for better tiling performance

The MapXtreme Tile Handler API is included under the MapInfo.WebControls.Tiling namespace.
See the Developer Reference for details. Source code for the Tile Handler is provided in the
\Samples\WebControlsSourceCode folder.

Using the MapXtreme Tile Handler

In its simplest form, to access the MapXtreme Tile Handler and request map tiles and information
from a tile server:

1. Modify your web.config file to point to the handler, as follows.

<httpHandlers>

<add verb="*" path="TileServer/*"

type="MapInfo.WebControls.Tiling.TileHandler" />
<add verb="*" path="TileServer/*/*"
type="MapInfo.WebControls.Tiling.TileHandler" />
<add verb="*" path="TileServer/*/*/*"
type="MapInfo.WebControls.Tiling.TileHandler" />
<add verb="*" path="TileServer/*/*/*/*"
type="MapInfo.WebControls.Tiling.TileHandler" />
</httpHandlers>

2. Provide a workspace (.MWS) that contains multiple maps.

For example, for a coverage locator application where the user wants to know if their location is
inside or outside your coverage (cell network, trade area, school districts, etc.) include:

a base map layer to server as a background and reference map.

an overlay map containing reference points and lines such as point locations and road
networks.

a coverage layer containing your coverages

3. Request a list of available maps using the following URL format.

http://server/TileServer/maplist.{ext}
where ext is an extension denoting the format of the information returned (current support for
JSON only)
This query will return a JSON object (JavaScript Object Notation) with the following format:
{

[

"Map1Alias",

Advertising