tileJobs


URI

<tileService_uri>/jobs[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

tileService

Child resources

tileJob

Introduction

The entrance resource to distributed caching, which supports creating new tiling tasks.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.

http://supermapiserver:8090/iserver/manager/tileservice/jobs.rjson

GET request

Gets the tiling task list.

Response structure

Returns the tiling task list, including the information for each tiling task. The information for each tiling task is as follows:

Field Type Description
id String The tiling task ID.
state JobState The current status for the tiling task.
info JobInfo The basic information of the tiling task.

Response example

The rjson format response result returned after implementing the GET request on the tileJobs resource http://localhost:8090/iserver/manager/tileservice/jobs.rjson to return tiling task list is as follows:

POST request

Creates new tiling task.

Request parameters

The structure of the request body parameters is as follows:

Name Type Description
dataConnectionString String The connection information for the data to be tiled. The service component name can be directly passed in, map-china400 for instance.
mapName String The name of the map to be tiled.
tileSize TileSize The size of the tile. The default value is SIZE_256.
format OutputFormat The output cache format, PNG for instance.
transparent boolean Whether the tile is transparent. The default is False.
scaleDenominators double[] The collection of denominators for tile scales, ["1000000", "2000000"] for instance.
originalPoint Point2D The original point for tile index. The default is the top left of the map.
epsgCode int The coordinates system for tiling. While not specified, the original coordinates system will be used.
cacheBounds Rectangle2D The cache extent, [0,0,180,90]. If not specified, the default will be the full extent of the map.
storageID String The storage configuration ID.
storeConfig TileSourceInfo Tile storage configuration.
createNewTileVersion boolean Whether to create new tile version.
parentTileVersion String The parent version of the version of tiles to be created. null indicates to create new version based on the mostly update version.
tileType TileType Tile type
utfGridParameter UTFGridJobParameter Properties tiles configuration parameter. When the type of tiles is UTFGrid, this parameter is invalid.
vectorParameter VectorJobParameter Vector tiles configuration parameter. When the type of tiles is Vector, this parameter is invalid.

Response structure

Field Type Description
succeed String Whether tiling is successful.
newResourceID String The ID of the created tile task resource.
customResult TileJob The related information of the created tile task resource.
newResourceLocation String The address of the created tile task resource.
postResultType enum The result type of the POST request. "CreateChild" indicates creating new child resource.

Response example

Suppose we implement the POST request on http://localhost:8090/iserver/manager/tileservice/jobs.rjson to create a new tile task, the rjson request body is as follows:

{

    "dataConnectionString": "map-china400",

    "mapName": "China",

    "tileSize": "SIZE_256",

    "format": "PNG",

    "transparent": false,

    "scaleDenominators": ["1200000"],

    "cacheBounds": {

        "left": "-20037508.342789244",

        "bottom": "-20037508.34278914",

        "right": "20037508.342789244",

        "top": "20037508.342789095"

    },

    "storageID": "aa",

    "storeConfig": {

        "fdhtGroups": [

            ["192.168.122.44:11411"]

        ],

        "type": "FastDFS",

        "fdfsTrackers": ["192.168.122.44:22122"]

    },

    "originalPoint": null,

    "epsgCode": -1,

    "tileType":"Image"

}

The response result in rjson format returned is as follows:

{

    "customResult": {

        "id": "c9575f3c-c417-4ef9-a4da-9b0aa2c68d32",

        "info": {

            "actualTileVersion": "119df1b3-03f8-46de-b194-4f4e0473c9d8",

            "cacheBounds": {

                "bottom": -2.003750834278914E7,

                "left": -2.0037508342789244E7,

                "leftBottom": {

                    "x": -2.0037508342789244E7,

                    "y": -2.003750834278914E7

                },

                "right": 2.0037508342789244E7,

                "rightTop": {

                    "x": 2.0037508342789200.0037508342789244E7,

                    "y": 2.0037508342789100.003750834278914E7

                },

                "top": 2.0037508342789095E7

            },

            "createNewTileVersion": false,

            "dataConnectionString": "../../samples/data/China400/China400.smwu",

            "epsgCode": -1,

            "format": "PNG",

            "mapName": "China",

            "originalPoint": {

                "x": -2.0037508342789244E7,

                "y": 2.0037508342789100.003750834278914E7

            },

            "parentTileVersion": null,

            "refMapRestAdress": "http://localhost:8090/iserver/services/map-china400/rest/maps/China",

            "resolutions": [317.50000000000000],

            "scaleDenominators": [1200000],

            "storageID": "aa",

            "storeConfig": {

                "fdfsTrackers": ["192.168.122.44:22122"],

                "fdhtGroups": [

                    ["192.168.122.44:11411"]

                ],

                "type": "FastDFS"

            },

            "tileSize": "SIZE_256",

            "transparent": false,

             "tileType":"Image"

        },

        "state": {

            "analystBlankPercentage": 0,

            "buildingScale": {

                "completed": 0,

                "completedBytes": 0,

                "completedRegion": null,

                "failedRegion": null,

                "matrixes": [{

                    "columnCount": 494,

                    "rowCount": 494,

                    "startingIndex": {

                        "columnIndex": 0,

                        "rowIndex": 0

                    }

                }],

                "nextIndex": {

                    "columnIndex": 0,

                    "rowIndex": 0

                },

                "scaleDenominator": 1200000,

                "total": 244036,

                "totalMatrix": null,

                "workerBuildingInfos": null

            },

            "completed": 0,

            "completedBytes": 0,

            "completedScale": [],

            "deployedWorkerId": [],

            "elapsedTime": 0,

            "masterAddress": "http://localhost:8090/iserver/services/tilemaster",

            "remainTime": 0,

            "runState": "BUILDING",

            "scaleConfigs": [{

                "cacheRegions": [],

                "excludeRegions": [],

                "scaleDenominator": 1200000,

                "tileBoundsHeight": "81279.99999999999",

                "tileBoundsWidth": "81279.99999999999"

            }],

            "scaleInfos": [{

                "completed": 0,

                "completedBytes": 0,

                "completedRegion": null,

                "failedRegion": null,

                "matrixes": [{

                    "columnCount": 494,

                    "rowCount": 494,

                    "startingIndex": {

                        "columnIndex": 0,

                        "rowIndex": 0

                    }

                }],

                "scaleDenominator": 1200000,

                "total": 244036,

                "totalMatrix": null,

                "workerBuildingInfos": null

            }],

            "speedPerSecond": 0,

            "tasks": [],

            "tasksToRetry": [],

            "tileMatrixEdgeCount": 20,

            "total": 244036

        }

    },

    "newResourceID": "c9575f3c-c417-4ef9-a4da-9b0aa2c68d32",

    "newResourceLocation": "http://localhost:8090/iserver/manager/tileservice/jobs/c9575f3c-c417-4ef9-a4da-9b0aa2c68d32.rjson",

    "postResultType": "CreateChild",

    "succeed": true

}

Access the resource URI of the generated child resource http://localhost:8090/iserver/manager/tileservice/jobs/c9575f3c-c417-4ef9-a4da-9b0aa2c68d32, you can check the status of the created tile task. For details, please refer to tileJob.

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the tileJobs resource exists, or if the tileJobs resource can be accessed by clients. It can also determine if the tileJobs resource supports an output format <format> if performed on a URI with .<format> included.

See