GetTile Request

Feedback


SuperMap iServer WMTS services currently provide KVP and REST two implemenent, that is, GetTile requests are supported in two ways:

KVP encoding request

Request parameters

In the KVP encoding request mode of the GetTile operation, parameters such as service, version, and request layer need to be specified, as shown below:

Table 1 Get Tile Operation KVP Request Parameters

Parameter name Whether it is necessary Description
Service=WMTS

Yes

service type.

Request WMTS Service, request type needs to be set to " WMTS ".

Request=GetTile

Yes

Request name.

A Get Capabilities operation was requested. The request name needs to be set to'GetCapabilities'.

Version=1.0.0

Yes

Version number.

The current version of WMTS is only 1.0.0.

Layer

Yes

The name of the requested layer.

Must have and unique.

Style

Yes

Style.

The requested style must be listed in the Capabilities document. SuperMap iServer currently only provides default styles, so its value can be omitted or set to default.

Format

Yes

Format.

The resource format you want to obtain must be unique. The format currently supported by SuperMap iServer is PNG.

TileMatrixSet

Yes

Set of tile matrices.

Must have and unique.

TileMatrix

Yes

The tile matrix.

Must have and unique.

TileRow

Yes

The requested tile line.

The row values of the tile matrix from top to bottom are 0, 1... MatrixHeight-1.

TileCol

Yes

The requested tile column.

The column values of the tile matrix from left to right are 0, 1... MatrixWidth-1.

An example of a request

The GetTile operation is requested as follows:

<ServiceRoot>?SERVICE=WMTS&REQUEST=GetTile&VERSION=version&Layer=&Style=&Format=&TileMatrixSet=&TileMatrix=&TileRow=&TileCol=

For example, after the native SuperMap iServer successfully starts the WMTS 1.0.0 service, the URL executing GetTile operation is: http://localhost:8090/iserver/services/map-world/wmts100?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&Layer=World+Map&Style=default&Format=image/png&TileMatrixSet=GlobalCRS84Scale_World+Map&TileMatrix=2&TileRow=0&TileCol=0 .

The response result of this request example is shown in the response example .

REST request

Resources and URIs

The REST implementation of GetCapabilities operation corresponds to ServiceMetadata resources, which are implemented through get requests. There are two types of request URI for ServiceMetadata resources, as shown below:

<ServiceRoot>/{layer}/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}[.Format]

<ServiceRoot>/{layer}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}[.Format]

ServiceRoot is the root URI of the service. See the root URI settings . Format is the output format of the image. The format currently supported by SuperMap iServer is PNG.

Request parameters

The service metadata document in resource oriented architecture contains a list of layer elements, and each layer element contains one or more < ResourceURL > child element, which is used to specify the URI template for accessing Tile resources. <ResourceURL> includes three attributes: Format, ResourceType, and Template. By providing the specific URI according to the format specified in the Template, Tile resources can be requested using the standard HTTP GET method. The specific descriptions of the three attributes are shown in the table below:

Table 2 URI parameters required to request a Tile resource

Parameter name Description
Format Format. The format of the resource you want to obtain must be unique.
ResourceType Resource type. Here is the tile.
Template URI template. See Table 2 for details.

Table 3 Parameters of URL Template

Parameter name Description
Layer The name of the requested layer. Must have and unique.
Style Style. The requested style must be listed in the Capabilities document. SuperMap iServer currently only provides default styles, so its value can be omitted or set to default.
Dimension Dimension identification. If you define multiple dimensions, you must define a Dimension element for each dimension. SuperMap iServer multidimensional functionality is not currently available.
TileMatrixSet The name of the tile matrix set, which must be unique.
TileMatrix The tile matrix must be unique.
TileRow The requested tile row, the row values of the tile matrix from top to bottom are 0, 1..., MatrixHeight-1.
TileCol The requested tile column. The column values of the tile matrix from left to right are 0, 1..., MatrixWidth-1.

An example of a request

For example, after the native SuperMap iServer has successfully started the WMTS 1.0.0 service, a Tile is requested by the URI: http://localhost:8090/iserver/services/map-world/wmts100/World+Map/default/GlobalCRS84Scale_World+Map/2/0/0.png .

The response result of this request example is shown in the response example .