<map_uri>/tileFeature[.<format>]
By executing a request for the tileFeature resource, you can get the tile elements in the vector layer in the map {mapName}. The tiles that the client gets can be rendered in a custom style and can be queried.
You can set the parameters of the output vector tiles in the URI, such as setting the layer, tile size, grid row and column number, and so on. The grid division rules are as follows: display the map in a full view, cut from the top left corner, to down and to right, where the default tile size is 256 * 256 pixels. The upper left corner row number is 0, and the column number is 0, ascending to down and to right. The grid size and map scale and other parameters can be specified at the request.
Supported Methods:
Supported output formats: rjson, json, html, xml.
Implement the HTTP request on the following URI, where supermapiserver is the server name, "Worldmap" is the map name ({mapName}) with rjson being the output format.
http://supermapiserver:8090/iserver/services/map-world/rest/maps/世界地图/tileFeature.rjson
Get the vector tiles of the map, the parameters in URI determine the position of the grid.
To execute a GET request for the tileFeature resource to get the tiles of the specified vector layer, you need to include the relevant parameters in the URI. If no parameters are specified, cutting and map output will be taken according to the current state of the map. The parameters are:
Name | Type | Description |
x | long | Grid column number in the map, increasing from left to right. The grid column number starts from the upper left corner by default, which is 0. |
y | long | Grid row number in the map, increasing from up to bottom. The grid row number starts from the upper left corner by default, which is 0. |
scale | double | The map scale. E.g., 0.0001 means that the scale is 1:10000. Please see Definition of the scale. |
width | int | The width of the grid, unit: Pixel, 256 pixels by default. |
height | int | The height of the grid, unit: Pixel, 256 pixels by default. |
origin | Point2D | The starting reference point of the tiles, which defaults to the upper left corner of the map range. If other values are specified, the tile position is calculated using the assigned reference point. If the starting point for the worldmap is set to origin = {"x": - 200, "y": 45}, then the origin is in the upper left corner of the tile with the position (0,0), and in the lower right corner of the tile with the position (-1, -1). |
layersID | String | Gets the map layer ID for the tiles, that is, the vector layer (point, line, region, and text layer) to generate the map tiles, and is the combination of the specified layers in the current map. If this parameter is empty, the default all vector layers are cached. The definition of the current map layer ID is as follows: 1. Layers are numbered from top to bottom from 0. 2. The one before the colon (:) is the top layer. 3. The English period (.) indicates the affiliation relationship between layers. 4. The English comma (,) indicates the separation between layers. For example: 1. [0: 0,1,2.0] represents the sublayer below the top-level layer 0: 0,1 and all sub-layers, and sub-layer 0 under layer 2. 2. [1: 1.2,2] represents the sublayer below the top-level layer 1: sub-layer 2 under 1, and layer 2 and all sub-layers. 3. The two examples are merged together as : [0: 0,1,2.0,1: 1.2,2] In addition, [0,1,2,3] represents the layers 0,1, 2, 3, and all sublayers under layer 0, [0:,1:,2:] represent top-level layers 0, 1, 2, and all sub-layers. |
layerNames | String[] | Specifies the name list for the layer. The supported types are vector layers (points, lines, regions, and text layers). E.g., layerNames=["ContinentLabel@World","Capitals@World"]. layerNames=_all means to pass all vector layers. |
_cache | boolean | Whether to use the cache, the default is true. If false, all caches are closed. |
expands | int | The pixel value of each layer extending. On the basis of layer coding (layersID encoding method of tileImage resource), the pixels extended by each layer are defined. The specific method is to add "_ {pixel}" to the layer ID to identify the pixels that the layer needs to be expanded; if no "_ {pixel}" is added, the layer style is calculated according to the default layer style. For example: 0_15: 0_5,1_10: for 0,1 sub-layer of the top 0 layer, the extended pixels are 5,10 pixels; for the other sub layers except 0,1 sub-layer of the top 0 layer, the extended pixels are 15 pixels. 0: 0_5,1_10: for 0,1 sub-layer of the top 0 layer, the extended pixels are 5,10 pixels; for the other sub layers except 0,1 sub-layer of the top 0 layer, the extended pixels are calculated according to the default style. |
compressTolerance | int | Thinning tolerance. The unit is pixel, and the coordinate sequence within the tolerance range will be combined. |
coordinateType | CoordinateType | Returns the expression type of the tiles. If you set to Map, the tile is returned according to the coordinates position of the feature on the map. If you set to Pixel, the tile is returned according to the pixel position on the tile. For the pixel coordinates, the upper left corner is the starting point (0, 0). |
returnCutEdges | boolean | Whether to return the cutting edge information. The default is false, not to return. |
Returns the data information containing the vector layer name and feature coordinates.
Field | Type | Description |
recordsets | VectorRecordSet[] | Recordset. Each record consists of features and layer names. |
To request the vector tiles of all layers in the worldmap map of the tileFeature resource , you need to execute a GET request: http: // supermapiserver: 8090 / iserver / services / map-world / rest / maps / worldmap /tileFeature.json?scale= & x = 2 & y = 7 & width = 256 & height = 256 & layersID = & compressTolerance = & returnAttributes = false & cacheEnabled = true.
The rjson resource representation returned is as follows:
Returns the same HTTP response header as the GET request, but does not have the response entity. It can get the metadata information in the response header without transferring the whole response content. Metadata information includes media type, character encoding, compression encoding, entity content length, and so on.
The HEAD request can be used to determine whether the tileFeature resource exists or whether the client has authority to access the resource. It can quickly determine whether the tileFeature resource supports the representation in <format> format by performing HEAD request on URI with <format>.