URI

<arcgisrest_uri>/{mapName}/VectorTileServer[.<format>]

支持的方法

GETHEAD

介绍

ArcGIS REST 矢量瓦片服务的根 API 资源,提供有关服务的信息,如瓦片信息、空间参考以及初始和完整地理范围。

支持的方法:

  • GET:获取 ArcGIS REST 矢量瓦片服务的基本信息。
  • HEAD:检查 ArcGIS vectorTileService 资源是否存在,权限是否可以访问。

支持的表述格式:PJSON、JSON。

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 json 输出格式为例加以说明,其中,supermapiserver 是服务器名,{component}是服务组件名 ,{mapName}是地图名。

http://supermapiserver:8090/iserver/services/{component}/arcgisrest/{mapName}/VectorTileServer.json

GET 请求

获取矢量瓦片当前状态的基本信息,包括瓦片信息、空间参考以及初始和完整地理范围等。

请求参数

无。

响应结构

对 ArcGIS 矢量瓦片服务资源执行 GET 请求,返回的资源表述的结构如下:  

字段 类型 说明
fullExtent ArcGISMapExtend 地图的全幅范围
capabilities String 支持的功能,当前仅支持 TilesOnly
type String 矢量瓦片类型,当前仅支持 indexedVector
tileMap String 标识瓦片地图,由于当前版本不支持 tileMap 资源,因此该值为 null
defaultStyles String 瓦片使用的默认风格指向的 url,该值为 resources/styles
tiles String[] 获取瓦片的 url,该值为 tile/{z}/{y}/{x}.pbf
exportTilesAllowed boolean 是否支持输出瓦片,由于当前版本不支持 tileMap 资源,因此该值为 false
maxExportTilesCount int 最大能输出的瓦片数量,默认为100000
maxScale double 地图的最大显示比例尺。该值为0时,表示没有比例尺显示限制。
currentVersion String 对标 ArcGIS 服务的版本,该值为 11.4
name String 地图名称
initialExtent ArcGISMapExtend 初始范围
minScale double 地图的最小显示比例尺。该值为0时,表示没有比例尺显示限制。
tileInfo ArcGISTileInfo 切片信息
其中,format 参数值为 pbf,cols、rows 的参数值为512
resourceInfo ResourceInfo 瓦片资源信息

响应示例

对 vectorTileService 资源:http://supermapiserver:8090/iserver/services/vectorTile-China100/arcgisrest/China/VectorTileServer?f=json 执行 GET 请求,返回 json 格式的资源表述如下:

{
  "fullExtent": {
    "ymin": -20037508.34278914,
    "xmin": -20037508.342789248,
    "ymax": 20037508.342789087,
    "xmax": 20037508.342789244,
    "spatialReference": {
      "latestWKID": 3857,
      "wkid": 3857
    }
  },
  "capabilities": "TilesOnly",
  "maxScale": 0,
  "tileInfo": {
    "lods": [
      {
        "level": 0,
        "scale": 591658710.909131,
        "resolution": 78271.51696402045
      },
      {
        "level": 1,
        "scale": 295829355.454566,
        "resolution": 39135.75848201029
      },
      {
        "level": 2,
        "scale": 147914677.727283,
        "resolution": 19567.879241005146
      },
      {
        "level": 3,
        "scale": 73957338.8636414,
        "resolution": 9783.939620502559
      },
      {
        "level": 4,
        "scale": 36978669.4318207,
        "resolution": 4891.969810251279
      },
      {
        "level": 5,
        "scale": 18489334.7159103,
        "resolution": 2445.9849051256333
      },
      {
        "level": 6,
        "scale": 9244667.35795517,
        "resolution": 1222.9924525628194
      },
      {
        "level": 7,
        "scale": 4622333.67897759,
        "resolution": 611.4962262814103
      },
      {
        "level": 8,
        "scale": 2311166.83948879,
        "resolution": 305.74811314070445
      },
      {
        "level": 9,
        "scale": 1155583.4197444,
        "resolution": 152.8740565703529
      },
      {
        "level": 10,
        "scale": 577791.709872198,
        "resolution": 76.43702828517618
      },
      {
        "level": 11
        "scale": 288895.854936099,
        "resolution": 38.21851414258809
      },
      {
        "level": 12,
        "scale": 144447.92746805,
        "resolution": 19.109257071294113
      }
    ],
    "origin": {
      "x": -20037508.342789248,
      "y": 20037508.342789087
    },
    "format": "pbf",
    "rows": 512,
    "dpi": 192,
    "spatialReference": {
      "latestWKID": 3857,
      "wkid": 3857
    },
    "cols": 512
  },
  "type": "indexedVector",
  "resourceInfo": {
    "styleVersion": 8,
    "cacheInfo": {
      "storageInfo": {
        "storageFormat": "esriMapCacheStorageModeCompactV2",
        "packetSize": 128
      }
    },
    "tileCompression": "gzip"
  },
  "currentVersion": "11.4",
  "defaultStyles": "resources/styles",
  "tileMap": null,
  "maxExportTilesCount": 10000,
  "exportTilesAllowed": false,
  "tiles": [
    "tile/{z}/{y}/{x}.pbf"
  ],
  "initialExtent": {
    "ymin": -10018754.17139466,
    "xmin": -10018754.17139464,
    "ymax": 10018754.171394607,
    "xmax": 10018754.171394626,
    "spatialReference": {
      "latestWKID": 3857,
      "wkid": 3857
    }
  },
  "name": "China",
  "minScale": 1000000000000
}

HEAD 请求

返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。

HEAD 请求可以用来判断 vectorTileService 资源是否存在,或者客户端是否有权限访问 vectorTileService 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 vectorTileService 资源是否支持<format>格式的表述。

请参见