MapInfo Pro provides access to the Microsoft Bing tile server, so there is no setup required to access it (see Adding a Bing Layer to your Map). Separate instructions are provided for setting up a mapping tile server table for use with a MapXtreme .NET tile server (see Creating a Map Tile Server Table for MapXtreme.NET Tile Server).
You can access a Google Earth Enterprise tile server from MapInfo Pro. If you have access to a Google Earth server, then you would create TAB and XML files for each Google layer that you wish to use. There is no support for a public Google server; this feature lets you get data from a private Google Earth Enterprise Server.
A Google Earth Enterprise Tiling Server can contain image tiles for one or more layers. The tiles can be based on image or vector data. The URL to request individual tiles uses a slightly different format for Imagery versus Vector data requests. This impacts the <url> in the XML file. The data can be in two different projections.
A tile server can contain one or more layers (Tile Server Layers). Each tile server layer has its own information, including and not limited to: ID, label, version, type of data/request. Each tile server layer corresponds to a single MapInfo Table/Layer.
Google Enterprise supports two projections: flat and Mercator. This impacts the Coordsys clause in the TAB file (including the Bounds, which are different for flat and Mercator projections).
To use a Google server as a tile server within MapInfo Pro, you must have a TAB and XML file. This corresponds to one layer on the tile server. You can open and use the TAB file in MapInfo Pro just like any other tile server table. Currently, there is no automatic way to generate these files. The following sections explain how to get information about the server and how to construct TAB and XML files for your specific server.
Getting Information about a Tile Server
This section explains how to issue a command to get information about a server.
Sample web request to get server definition:
<Google tile server>/query?request=Json&vars=geeServerDefs
Actual request to get server definition:
http://gmdemo.keyhole.com/query?request=Json&vars=geeServerDefs
Specific items to look at in results of geeServerDefs request:
projection : "flat",
In the "layers : " section, for each layer:
id : 1029,
requestType : "ImageryMaps",
version : 20
Building a TAB file
There are two TAB file variations for a Google server based on the Google projection: flat and Mercator. It is important that the name of the "File" in the TAB matches the name of the XML file.
TAB File for Flat Projection
The Google flat projection corresponds to the MapInfo Longitude / Latitude (WGS 84) coordinate system. It is shown in geeServerDefs as:
projection : "flat",
Sample TAB file for Flat Projection:
!table
!version 1050
!charset WindowsLatin1
Definition Table
File "Google_Flat_Projection.xml"
Type "TILESERVER"
CoordSys Earth Projection 1, 104 Bounds(-180, -180) (180, 180)
RasterStyle 4 1
RasterStyle 7 0
RasterStyle 9 1
The RasterStyle clauses are optional. They are suggested for tiles that are based on vector data (requestType: "VectorMapsRaster"). They are provided to make pixels in the tile server images transparent by default, by determining the transparent color from each image tile. For image based data (requestType: "ImageryMaps"), the RasterStyle tags may not be appropriate.
TAB File for Mercator Projection
The Google Mercator projection corresponds to the Popular Visualization CRS coordinate system. It is shown in geeServerDefs as:
projection : "mercator",
Sample TAB file for Flat Projection:
!table
!version 1050
!charset WindowsLatin1
Definition Table
File "Google_Mercator_Projection.xml"
Type "TILESERVER"
CoordSys Earth Projection 10, 157, "m", 0 Bounds (-20037508.342789244,
-20037508.343038857) (20037508.342789244, 20037508.343038857)
RasterStyle 4 1
RasterStyle 7 0
RasterStyle 9 1
The RasterStyle clauses are optional. They are suggested for tiles that are based on vector data (requestType: "VectorMapsRaster"). They are provided to make pixels in the tile server images transparent by default, by determining the transparent color from each image tile. For image based data (requestType: "ImageryMaps"), the RasterStyle tags may not be appropriate.
Building an XML File
There are two XML file variations for a Google server. The variation is based on the tile request type (image or vector). One major difference is how the tile requests are made (X/Y/Z versus Level/Row/Column).
XML File for Imagery Requests
This imagery request is denoted in the geeServerDefs as:
requestType : "ImageryMaps",
Sample XML file for imagery maps:
<?xml version="1.0" encoding="utf-8"?>
<TileServerInfo Type="LevelRowColumn">
<Url>http://gmdemo.keyhole.com/query?request=ImageryMaps&channel=1
029&version=20&x={ROW}&y={COL}&z={LEVEL}</Url>
<MinLevel>1</MinLevel>
<MaxLevel>23</MaxLevel>
<TileSize Height="256" Width="256" />
</TileServerInfo>
XML File for Vector Map Requests
This vector request is denoted in the geeServerDefs as:
requestType : " VectorMapsRaster",
Sample XML file for vector maps:
<?xml version="1.0" encoding="utf-8"?>
<TileServerInfo Type="LevelRowColumn">
<Url>http://gmdemo.keyhole.com/query?request=VectorMapsRaster&leve
l={LEVEL}&row={COL}&col={ROW}&channel=1005&version=4</
Url>
<MinLevel>0</MinLevel>
<MaxLevel>23</MaxLevel>
<TileSize Height="256" Width="256" />
</TileServerInfo>
XML Parameters for Server and Layer
There are parameters that are in common for both imagery and vector requests. These parameters relate to the server and layer. In the XML file, the <Url> also contains the following.
Specifying Server
The server is specified by the first part of the <Url>, such as:
<Url>http://gmdemo.keyhole.com/query?request=VectorMapsRaster&leve
l={LEVEL}&row={COL}&col={ROW}&channel=1005&version=4</
Url>
Specifying Layer and Version
The particular layer from the server is specified by the channel and version:
<Url>http://gmdemo.keyhole.com/query?request=VectorMapsRaster&leve
l={LEVEL}&row={COL}&col={ROW}&channel=1005&version=4</
Url>
The channel can be found from the id in the geeServerDefs:
{
icon : "icons/road_yellow_l.png",
id : 1005,
initialState : true,
isPng : true,
label : "Labels",
lookAt : "none",
opacity : 1,
requestType : "VectorMapsRaster",
version : 4
}