URI
<vectorTileService_uri>/resources/sprites/sprite[.<format>]
支持的方法
介绍
通过对 vectorTileSprite 资源执行 GET 请求,可获取当前地图中的 sprite 图集信息。当表述为图片格式时,例如 PNG,可获取 sprite 图,当表述为 JSON 格式时,则返回用于定位图标位置的元数据信息。同时,iServer 支持获取两倍放大的 sprite 图集信息,URI 示例为<vectorTileService_uri>/resources/sprites/sprite@2x[.<format>]。
支持的方法:
支持的表述格式:JSON、PNG。
HTTP 请求方法
对如下 URI 执行 HTTP 请求,其中,supermapiserver 是服务器名,{component}是服务组件名,{mapName}是地图名。
http://supermapiserver:8090/iserver/services/{component}/arcgisrest/{mapName}/VectorTileServer/resources/sprites/sprite.json
GET 请求
获取当前地图中的 sprite 图集信息。
请求参数
无。
响应示例
执行 GET 请求:http://supermapiserver:8090/iserver/services/vectorTile-China100/arcgisrest/China/VectorTileServer/resources/sprites/sprite.png,则返回的结果如下图:
执行 GET 请求:http://supermapiserver:8090/iserver/services/vectorTile-China100/arcgisrest/China/VectorTileServer/resources/sprites/sprite.json,则返回的结果如下:
{
"marker_909072_3_3F3F3F": {
"pixelRatio": 1,
"x": 133,
"width": 6,
"y": 60,
"height": 6
},
"BGRR_4E99DD_12_10": {
"pixelRatio": 1,
"x": 75,
"width": 63,
"y": 20,
"height": 20
},
"BGRR_4E99DD_12_12": {
"pixelRatio": 1,
"x": 0,
"width": 75,
"y": 20,
"height": 20
},
"BGRR_4E99DD_12_11": {
"pixelRatio": 1,
"x": 0,
"width": 69,
"y": 100,
"height": 20
},
"BGRR_4E99DD_12_13": {
"pixelRatio": 1,
"x": 0,
"width": 80,
"y": 80,
"height": 20
},
"BGRR_4E99DD_12_15": {
"pixelRatio": 1,
"x": 0,
"width": 91,
"y": 60,
"height": 20
},
"marker_908173_13_ED2728": {
"pixelRatio": 1,
"x": 46,
"width": 12,
"y": 120,
"height": 12
},
"marker_908146_35_000000": {
"pixelRatio": 1,
"x": 17,
"width": 29,
"y": 120,
"height": 16
},
"BGR_CE8966_10_1": {
"pixelRatio": 1,
"x": 121,
"width": 12,
"y": 60,
"height": 18
},
"marker_72_1_FF0000": {
"pixelRatio": 1,
"x": 134,
"width": 8,
"y": 48,
"height": 8
},
"BGR_CE8966_10_4": {
"pixelRatio": 1,
"x": 80,
"width": 26,
"y": 80,
"height": 18
},
"BGR_CE8966_10_5": {
"pixelRatio": 1,
"x": 91,
"width": 31,
"y": 100,
"height": 18
},
"BGR_CE8966_10_2": {
"pixelRatio": 1,
"x": 0,
"width": 17,
"y": 120,
"height": 18
},
"BGR_CE8966_10_3": {
"pixelRatio": 1,
"x": 69,
"width": 22,
"y": 100,
"height": 18
},
"BGR_CE8966_10_6": {
"pixelRatio": 1,
"x": 106,
"width": 36,
"y": 80,
"height": 18
},
"BGRR_4E99DD_12_9": {
"pixelRatio": 1,
"x": 0,
"width": 58,
"y": 0,
"height": 20
},
"BGRR_4E99DD_12_8": {
"pixelRatio": 1,
"x": 0,
"width": 52,
"y": 40,
"height": 20
},
"BGRR_4E99DD_12_7": {
"pixelRatio": 1,
"x": 87,
"width": 47,
"y": 40,
"height": 20
},
"BGRR_4E99DD_12_6": {
"pixelRatio": 1,
"x": 58,
"width": 41,
"y": 0,
"height": 20
},
"BGRR_4E99DD_12_5": {
"pixelRatio": 1,
"x": 52,
"width": 35,
"y": 40,
"height": 20
},
"BGRR_4E99DD_12_4": {
"pixelRatio": 1,
"x": 91,
"width": 30,
"y": 60,
"height": 20
},
"BGRR_4E99DD_12_3": {
"pixelRatio": 1,
"x": 99,
"width": 24,
"y": 0,
"height": 20
},
"BGRR_4E99DD_12_2": {
"pixelRatio": 1,
"x": 123,
"width": 19,
"y": 0,
"height": 20
},
"marker_72_1_4B5756": {
"pixelRatio": 1,
"x": 134,
"width": 8,
"y": 40,
"height": 8
},
"marker_70_2_5F7675": {
"pixelRatio": 1,
"x": 58,
"width": 10,
"y": 120,
"height": 10
},
"marker_109_0_495340": {
"pixelRatio": 1,
"x": 122,
"width": 18,
"y": 100,
"height": 18
},
"BGR_CE8966_10_-1": {
"pixelRatio": 1,
"x": 138,
"width": 3,
"y": 20,
"height": 18
}
}
HEAD 请求
返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。
HEAD 请求可以用来判断 vectorTileSprite 资源是否存在,或者客户端是否有权限访问 vectorTileSprite 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 vectorTileSprite 资源是否支持<format>格式的表述。
请参见
- vectorTileService、vectorTile、vectorTileFont、vectorTileStyle
- 客户端构建 REST 请求
- 状态码列表及说明
- SuperMap iServer REST API 表述格式介绍