Skip To Content
ArcGIS Developer
Dashboard

Import Tiles

Description

The importTiles operation supports importing tiles into an existing cached service.

Prerequisites

Before executing this operation, you will need to make certain the following prerequisites are met:

  1. Upload the TPK you wish to merge with the existing service, take note of its item ID.
  2. Make certain that the uploaded TPK item's tiling scheme matches with the service you wish to import into.
  3. The source service LOD's should include all the LOD's that are part of the imported TPK item. For example, if the source service has tiles from levels 0 through 10, you can import tiles only within these levels and not above it.

Parameters

ParameterDetails
f

The response format. The default response format is html .

Supported values: html | json | pjson.

token

An access token that identifies the authenticated user and controls access to restricted resources and operations.

sourceItemId

<Required> The TPK file's item ID. This TPK file contains to-be-extracted bundle files which are then merged into an existing cached service.

extent

<Optional> Use only if needing to extract specific bundles from the TPK file to an existing cached service. Specify the custom extent for these extracted bundles.

Example:

6224324.092137296,487347.5253569535,11473407.698535524,4239488.369818687 the minx, miny, maxx, maxy values or,

{"xmin":6224324.092137296,"ymin":487347.5253569535,"xmax":11473407.698535524,"ymax":4239488.369818687,"spatialReference":{"wkid":102100}} the JSON representation of the Extent object.

levels

<Optional> By default, all level bundle files are extracted from the TPK file to the existing cached service.

mergeBundle

<Optional> Default is false and applicable to compact cache storage format. It controls whether the bundle files from the TPK file are merged with the one in the existing cached service. Otherwise, the bundle files are overwritten.

replaceTiles

<Optional> Default is false, applicable to compact cache storage format and used when mergeBundle=true. It controls whether the new tiles will replace the existing ones when merging bundles.

JSON Response Syntax


 
{
  "id":<id>,
  "name": <service name>,
  "itemId": <item id>,
  "status": <success | failed>,
  "type": <map service>,
  "jobId": <job id>,
  "message" : "<message>"
}
or 
{
  "error": {
    "code": <code>,
    "message": "<description>",
    "details": [
      "<message>"
    ]
  }
}

JSON Response Example (succeeds)


            {
  "id" : "82cc6785db3dcd0d", 
  "name" : "World",  
  "itemId" : "87147b59c92c44de92152730634aa1a4", 
  "status" : "Success",
  "type" : "Map Service", 
  "jobId" : "bee23b456506f414", 
  "message" : "success"
}

JSON Response Example (fails)


            {
  "error" : 
  {
    "code" : 500, 
    "message" : "Specified level id \"19\" is not within the min and max scale range.",
    "details" : null
  }
}