地图服务
描述
地图服务可提供对托管在服务器上的地图内容的访问。地图服务可以公开不同级别的功能。当地图服务托管在 GeoScene Online 或 GeoScene Portal 上时,它将公开一组切片影像,客户端将使用这些影像进行快速地图导航。当地图服务托管在 GeoScene Server 站点上时,它将公开其他功能,如动态绘图、查询和搜索。借助 GeoScene Server,可通过允许网络分析、矢量要素编辑等的地图服务根 URL 获取更多的 web 服务。
REST API 地图服务资源仅与已发布地图文档的默认数据框架一起工作。该资源可提供关于地图的基本信息,包括地图所包含的图层、地图是否被缓存、其空间参考、初始和完整范围、地图单位和版权文本。它还提供了一些与服务相关的元数据,如服务描述、作者和关键字。如果缓存了地图,则会包含关于其切片方案的其他信息,例如缓存切片的原点、详细级别和切片大小。
地图服务不会公开编辑功能。它们提供对要素和属性内容的只读访问。
由 GeoScene Online 和 GeoScene Portal 托管的地图服务
由 GeoScene Online 或 GeoScene Portal 托管的地图服务只能从服务器的缓存返回切片;它们不能动态地绘制图像,也不允许查询地图背后的各个要素。使用要素服务和地图服务,您可以在应用程序中支持查询和信息弹出窗口。
因此,本部分文档中提到的一些资源、操作和属性不适用于 GeoScene Online 或 GeoScene Portal 托管的地图服务。
GeoScene Server 托管的地图服务
GeoScene Server 托管的地图服务支持以下一系列操作:
3.0 中的新增功能
- 从 GeoScene Pro 发布的地图服务的根资源中增加了一个新属性 supportsTimeRelation。这允许客户端应用程序(如 GeoScene Pro)在使用时间滑块处理时间感知图层时拥有更多的控制权。您可以决定是否包括或排除开始或结束时间。
- documentInfo.Version 指示原始源地图文档的版本。只有在基于 GeoScene Pro 运行时的地图服务中,您才会看到此参数。"1.1”意味着最初的服务是从 ArcMap 发布的。任何其他值均反映 GeoScene Pro 版本。
旧版本:
随着 GeoScene Enterprise 4.0 的发布,对 ArcMap 服务运行时的支持已被弃用。
- 在图层/表资源中添加了新属性
- preferredTimeReference 和 datesInUnknownTimezone。
- supportsLOD 表示可以检索到要素图格中的空间聚合结果。
- 文件地理数据库中的图层支持计算百分位数
- 为附件返回附加元数据,如 exifInfos、keywords 等。
- 以下操作是使用 timeRelation 参数更新的:
- 导出
- 识别
- QueryLegends
- Query 操作已增强,以便以规则形状多边形(如六边形、正方形等)基于点要素的细分返回空间聚合结果。
注:
图层必须启用要素图格化功能。
- 在 GeoScene Pro 2.1 或更高版本中,您可以添加 supportsLOD 为 true 的图层,并在图格多边形中查看聚合结果,而不是重叠点要素
2.1 中的新特性
- 新属性 liveModeOffsetDirection 已添加到从 GeoScene Pro 发布的地图服务的 timeInfo 下的根资源中,以表示其实时数据模式。此参数仅在 hasLiveData 为 true 时可用。如果 hasLiveData 为 true,则“导出”和“标识”操作将 time 参数值默认设置为:
- 当 liveModeOffsetDirection 为 past 时:
[<current server time - defaultTimeWindow>, <current server time>]
- 当 liveModeOffsetDirection 为 future 时:
[<current server time>, <current server time + defaultTimeWindow>]
- 当 liveModeOffsetDirection 为 pastAndFuture 时:
[<current server time - defaultTimeWindow/2>, <current server time + defaultTimeWindow/2>]
- 当 liveModeOffsetDirection 为 past 时:
2.0 中的新增功能
- 在 GeoScene Pro 发布的地图服务上,支持 export、identify、find 和 queryLegends 操作中的以下新参数:
- clipping,用于掩膜裁剪多边形外的图层。
- spatialFilter,用于绘制或查询仅满足空间过滤条件的要素。
注:
在使用 clipping 或 spatialFilter 参数之前,请确保地图服务的根资源分别包括 supportsClipping 和 supportsSpatialFilter 属性。
- referenceScale 添加为一个新属性,用于表示参与图层的符号和文本大小所固定的比例。
1.7.1 中的新特性
- queryLegends 操作可用来返回关于地图服务图例的信息,该图例通过图层和可见性进行过滤。仅当图层资源报告 supportsDynamicLegends 为 true 时,该操作才可用。
- supportedQueryFormats 现在包括 pbf (protocol buffer),一种用于地理数据的压缩二进制编码。
- minLOD 是切片方案的最小细节级别 (LOD),在该级别上缓存切片在切片服务中可用。这不必是您的切片方案中的最小比例。可以选择不为切片方案的所有 LOD 创建缓存切片,只从 min-maxLODs 创建缓存。重采样属性将用于显示超过 min-max LODs 级别的缓存。
- maxLOD 是切片方案的最大细节级别 (LOD),在该级别上缓存切片在切片服务中可用。在此级别之外绘制切片的任何请求都将尝试使用重采样设置从最近的可用 LOD 重新采样切片。maxLOD 应始终大于 minLOD。
注:
在发布到 GeoScene Server、GeoScene Portal 和 GeoScene Online 环境时,minLOD 和 maxLOD 值将自动验证。要编辑这些值,需要使用编辑服务操作。
- 在 1.7.1 版本中,minScale 和 maxScale 属性均已进行了更新。在以前版本中,对于切片服务,这些属性被描述为管理员允许构建切片的最小和最大地图比例。从 1.7.1 版本起,其描述已更新如下:
- minScale 是服务图层在地图视图中可见时的最小比例 (缩至最小)。如果地图缩小到超过此比例,则服务图层将不可见。值为 0 表示该图层没有最小比例。minScale 值应始终大于 maxScale 值。
- maxScale 是服务图层在当前地图视图中可见时的最大比例 (放至最大)。如果地图放大至超过此比例,则服务图层将不可见。值为 0 表示该图层没有最大比例。maxScale 值应始终小于 minScale 值。
- resampling 属性已在 1.7.1 版本中更新。在 1.3 版本中,此属性引入为布尔值 (true|false),该值指示客户端是否应在切片不可用的区域中重采样切片。在 1.7.1 版本中,其说明已更新为:
- 一个布尔值 (true | false) ,用于在诸如 GeoScene Pro、Map Viewer Classic 和 JSAPI 等切片包客户端中渲染。启用 resampling 重新绘制图像,直到 maxScale 值。在没有数据的区域,将显示模糊影像。
1.7 中的新增功能
- 已终止支持作为输出格式的动作消息格式 (AMF)。
1.6.1 中的新增内容
- 已添加对图层文件 (.lyrx) 作为动态图层源的支持:动态工作空间图层。
- 对于启用归档的数据,图层资源上的 query 操作以及 queryRelatedRecords 操作支持一个 historicMoment 参数。将 supportsQueryWithHistoricMoment 属性设置为 true 的图层支持 historicMoment 参数。
- 当 returnCountOnly 和 returnDistinctValues 参数的值都为 true 时,query 操作在字段中返回多个惟一值,而不是惟一值列表。
- legend 资源引入了两个新的参数来返回具有更高 dpi 和不同大小的图例图面。
- layer/table 资源引入了 hasMetadata 标志和三个新资源:iteminfo、thumbnail 和 metadata。
1.5 中的新增功能
- 支持 export、identify、find 和 query 操作中的以下新参数:
- datumTransformation
- mapRangeValues
- layerRangeValues
- layerParameterValues
- 当地图具有范围时,地图服务根资源包括 activeRangeName 和 currentRangeExtent。
- 可用时,图层资源包括 rangeInfos 和 parameterInfos。
- identify 和 find 操作可使用以下布尔标识进行增强,以支持在需要时返回未格式化的值和字段名称:
- returnUnformattedValues
- returnFieldName
- 支持在查询操作的 orderBy、groupByFieldsForOutStatistics, 和 outStatistics 中使用 SQL 表达式。选中资源中的 supportsSqlExpression 以了解图层/表是否允许 SQL 表达式。
- 当地图包含来自企业级地理数据库的一个或多个图层时,returnUpdates 响应包括更新的完整空间范围。
1.4 中的新增内容
- GeoJSON 支持作为地图服务图层查询操作的输出格式。
- 除 orderByFields 和 groupByFieldsForStatistics 的字段名之外,查询操作还支持表达式。
1.3 中的新增内容
- 地图服务将返回 resampling:true|false,以指示客户端是否应对切片不可用的区域重采样切片。默认情况下不启用此属性;您可以使用 GeoScene Server Administrator Directory 进行启用。
1.2 中的新增内容
- 标准化 SQL 查询是指定 where 子句或定义表达式的默认方式。地图服务图层和动态图层资源现在报告 useStandardizedQueries 属性,以表示对标准化查询的支持。
- 图层和动态图层上的查询操作现在支持结合 outStatistics 参数指定 gdbVersion 参数。
- 渲染器对象支持两个新的可选属性:rotationType,用于控制旋转的原点和方向,和 rotationExpression,这是一个常量值或表达式,可基于要素属性值派生旋转角度。当在 rotationExpression 中指定属性名时,它括在方括号中,例如 [Rotation]。
- 地图服务资源列出了两个新属性:exportTilesAllowed,指示客户端是否可以导出缓存切片的 Boolean 标志,和 maxExportTilesCount,指定可以导出到缓存数据集或切片包的最大切片数。
- 地图服务资源可列出一个新的 supportedExtensions 属性,这是一个以逗号分隔的地图服务支持的扩展列表。
1.1 SP1 中的新增内容
1.1 中的新增内容
- 地图服务资源支持新的 returnUpdates 参数,该参数接受布尔值。传递此参数以从地图服务检索更新的信息。
- 地图服务资源具有新的 option 和 outSR 输入参数,以支持在 geoscene.cn 中查看地图服务的轮廓线。
- 地图服务中增加了对动态图层的支持。这允许对渲染器、连接、地理数据库版本或现有地图服务图层的图层顺序按请求修改。如果地图服务具有已注册的工作空间,则动态图层还允许根据来自已注册工作空间的数据按请求添加图层。使用地图服务资源上的 supportsDynamicLayers 属性来确定服务是否支持动态图层。
- 地图服务资源包含 maxRecordCount、maxImageHeight 和 maxImageWidth 属性。maxRecordCount 表示查询、查找和标识操作可以返回的最大记录数。maxImageHeight 和 maxImageWidth 表示地图服务将导出的最大图像高度和宽度,以像素为单位。
- 地图服务资源包括 tileServers 属性,它在地图服务端点上发布多个子域。这允许在此属性中指定的切片服务器上分割切片请求,例如 https://maps1.myserver.com and https://maps2.myserver.com。
- 地图服务资源包括 supportedQueryFormats。此值指示查询操作支持的输出格式。
- 地图服务资源包括 timeInfo 下的这些新属性: timeRelation、defaultTimeInterval、defaultTimeIntervalUnits、defaultTimeWindow 和 hasLiveData。
- timeRelation 可表明如何处理时间滑块范围的开始和结束时间:esriTimeRelationOverlaps 表示包括时间滑块的开始和结束时间,esriTimeRelationOverlapsStartWithinEnd 表示包括开始时间但排除结束时间,esriTimeRelationAfterStartOverlapsEnd 表示排除开始时间但包括结束时间。
- defaultTimeInterval 和 defaultTimeIntervalUnits 表示初始时间滑块步长。允许的单位包括:
- esriTimeUnitsCenturies
- esriTimeUnitsDays
- esriTimeUnitsDecades
- esriTimeUnitsHours
- esriTimeUnitsMilliseconds
- esriTimeUnitsMinutes
- esriTimeUnitsMonths
- esriTimeUnitsSeconds
- esriTimeUnitsWeeks
- esriTimeUnitsYears
- esriTimeUnitsUnknown
- defaultTimeWindow 表示时间滑块窗口的大小。
- hasLiveData 可返回一个 Boolean 值。如果为 true,则 export 和 identify 操作可将 time 参数的默认值设为 [<current server time - defaultTimeWindow>, <current server time>]。
- 地图服务资源包括 minScale 和 maxScale 属性。对于缓存的地图服务,这些值表示管理员允许构建切片的最小和最大地图比例。在动态地图服务的情况下,这些值被计算为所有地图图层的最小和最大比例尺的联合。
- 如果已对任何地图图层数据进行了版本化,则地图服务资源包括 hasVersionedData。当为 true 时,地图服务操作接受 gdbVersion 参数来切换地理数据库版本。
1.0 SP1 中的新增内容
- 增加了对地图服务图例子资源的支持。
- 地图服务资源包括图层的比例信息 (minScale 和 maxScale)。
1.0 中的新增内容
- 在 1.0 及更高版本中,除图层之外,地图服务还可以发布独立表。响应包括一个新的 tables 属性,该属性包含关于表的一些基本信息。子图层资源现在是图层/表资源,因为它根据指定的 ID 表示图层或表。
- 1.0 版本增加了对时间感知地图服务的支持。如果地图支持基于时间来查询和导出地图,则响应将包含一个 timeInfo 属性,该属性包含诸如地图的时间范围和地图的本机时间参考等信息。然而,REST API 总是使用 UTC 来编码时间 (纪元以来的毫秒数)。
请求参数
参数 |
详细信息 |
---|---|
returnUpdates | 如果为 true,则此资源将返回更新的时间范围。如果服务不是时间感知型的,则资源将返回一个空响应。 值:true | false |
option | ![]() 在 GeoScene Enterprise 4.1 中,已移除了对足迹的支持,并且该参数的 footprints 值已被弃用。 如果 option 为 footprints,则地图服务的覆盖区将作为要素集合返回。此要素集合可以在 GeoScene Online 中查看。仅当响应格式为 json 时,才支持此选项。 值:footprints |
outSR | ![]() GeoScene Enterprise 4.1 不再支持足迹。 在覆盖范围中返回的几何的空间参考。仅当将 option 指定为 footprints 时,才支持此参数。应将空间参考指定为一个 WKID。如果未指定 outSR,则几何将使用 GCS_WGS_1984 返回。 |
f |
响应格式。默认响应格式为 html。 值:html | json | kmz | lyr | nmf | jsapi | ve | gmaps |
用法示例
以下是 StateCityHighway_USA 地图服务的示例请求 URL:
https://sampleserver1.geosceneonline.cn/geoscene/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer
JSON 响应语法
示例一
{
"currentVersion": <currentVersion>,
"serviceDescription": "<serviceDescription>",
"mapName": "<mapName>"
"description": "<description>",
"copyrightText": "<copyrightText>",
"supportsDynamicLayers": <true|false>,
"layers": [ //the spatial layers published by this service
{
"id": <layerId1>,
"name": "<layerName1>",
"defaultVisibility": <true|false>,
"parentLayerId": <parentLayerId1>,
"subLayerIds": [<subLayerId11>, <subLayerId12>]
"minScale": <minScale1>,
"maxScale": <maxScale1>
},
{
"id": <layerId2>,
"name": "<layerName2>",
"defaultVisibility": <true|false>,
"parentLayerId": <parentLayerId2>,
"subLayerIds": [<subLayerId21>, <subLayerId22>]
"minScale": <minScale1>,
"maxScale": <maxScale1>
}
],
"tables": [ //the tables published by this service - from 10 onward
{
"id": <tableId1>,
"name": "<tableName1>"
},
{
"id": <tableId2>,
"name": "<tableName2>"
}
],
"spatialReference": {<spatialReference>},
"singleFusedMapCache": <true | false>,
"tileInfo": {
"rows": <rows>,
"cols": <cols>,
"dpi": <dpi>,
"format": <format>,
"compressionQuality": <quality>,
"origin": {<point>},
"spatialReference": {<spatialReference>},
"lods": [
{
"level": <level1>,
"resolution": <resolution1>,
"scale": <scale1>
},
{
"level": <level2>,
"resolution": <resolution2>,
"scale": <scale2>
}
]
},
"initialExtent": {<envelope>},
"fullExtent": {<envelope>},
"timeInfo": { //from 10 onward - if the map supports querying and exporting maps based on time
"timeExtent": [<startTime>, <endTime>],
"timeReference": {
"timeZone": "<timeZone>",
"respectsDaylightSaving": <true | false>
},
"timeRelation": "<esriTimeRelationOverlaps | esriTimeRelationOverlapsStartWithinEnd | esriTimeRelationAfterStartOverlapsEnd>",
"defaultTimeInterval": <time interval>,
"defaultTimeIntervalUnits": "<esriTimeUnitsCenturies | esriTimeUnitsDays | esriTimeUnitsDecades |
esriTimeUnitsHours | esriTimeUnitsMilliseconds | esriTimeUnitsMinutes |
esriTimeUnitsMonths | esriTimeUnitsSeconds | esriTimeUnitsWeeks | esriTimeUnitsYears |
esriTimeUnitsUnknown>",
"defaultTimeInterval": <time interval>,
"defaultTimeWindow": <time window>,
"hasLiveData": <true | false>,
"liveModeOffsetDirection": "<pastAndFuture | past | future>"
},
"units": "<units>",
"supportedImageFormatTypes": "<supportedImageFormatTypes>",
"documentInfo": {
"<key1>": "<value1>",
"<key2>": "<value2>"
},
"capabilities": "<capabilities>", //comma separated list of supported capabilities - e.g. "Map,Query,Data"
"maxRecordCount": <maxRecordCount>,
"maxImageHeight": <maxImageHeight>,
"maxImageWidth": <maxImageWidth>,
"minScale": <minimum map scale>,
"maxScale": <maximum map scale>,
"tileServers": ["<tileServerUrl1>","<tileServerUrl2>","<tileServerUrl2>"],
"supportedQueryFormats": "<query output formats>",
"exportTilesAllowed": <true | false>,
"maxExportTilesCount: <export tiles limit>,
"supportedExtensions": "<FeatureServer,KmlServer,MobileServer,WCSServer,WFSServer,WMSServer,NAServer,SchematicsServer>",
"resampling": <true | false> // Added at 10.3
}
示例二
以下示例演示了从服务请求更新信息时的响应:
{
"timeExtent": [
<startTime>,
<endTime>
],
"fullExtent": {
"xmin": <xmin>,
"ymin": <ymin>,
"xmax": <xmax>,
"ymax": <ymax>,
"spatialReference": <spatialReference>
}
}
示例三
以下示例演示了请求服务的覆盖区时的响应:
{
{
"featureCollection": {
"layers": [
{
"layerDefinition": {
"type": "Feature Layer",
"geometryType": "esriGeometryPoint",
"extent": {
<envelope>
},
"objectIdField": "id",
"displayFieldName": "<displayFieldName>",
"drawingInfo": {
"renderer": {
"type": "simple",
"label": "<label>",
"description": "",
"symbol": {
"height": 24,
"xoffset": 0,
"yoffset": 0,
"width": 24,
"contentType": "image/png",
"type": "esriPMS",
"imageData": "<imageData>",
"url": "<imageUrl>"
}
}
},
"fields": [
{
"name": "id",
"alias": "ID",
"type": "esriFieldTypeOID"
},
{
"name": "title",
"alias": "Title",
"type": "esriFieldTypeString"
},
{
"name": "summary",
"alias": "Summary",
"type": "esriFieldTypeString"
},
{
"name": "description",
"alias": "Description",
"type": "esriFieldTypeString"
},
{
"name": "tags",
"alias": "Tags",
"type": "esriFieldTypeString"
},
{
"name": "type",
"alias": "Type",
"type": "esriFieldTypeString"
},
{
"name": "thumbnail",
"alias": "Thumbnail",
"type": "esriFieldTypeString"
},
{
"name": "xmin",
"alias": "xmin",
"type": "esriFieldTypeDouble"
},
{
"name": "ymin",
"alias": "ymin",
"type": "esriFieldTypeDouble"
},
{
"name": "xmax",
"alias": "xmax",
"type": "esriFieldTypeDouble"
},
{
"name": "ymax",
"alias": "ymax",
"type": "esriFieldTypeDouble"
},
{
"name": "accessInformation",
"alias": "Access Information",
"type": "esriFieldTypeString"
},
{
"name": "licenseInfo",
"alias": "License Information",
"type": "esriFieldTypeString"
},
{
"name": "credits",
"alias": "Credits",
"type": "esriFieldTypeString"
},
{
"name": "link",
"alias": "Link",
"type": "esriFieldTypeString"
}
]
},
"featureSet": {
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": <wkid>
},
"features": [
{
"geometry": {
<point>
},
"attributes": {
"id": 1,
"title": "<title>",
"summary": "<summary>",
"description": "<description>",
"tags": "[\"<tag1>\,\"<tag2>\"]",
"type": "MapServer",
"thumbnail": "<thumbnailUrl>",
"xmin": <xmin>,
"ymin": <ymin>,
"xmax": <xmax>,
"ymax": <ymax>,
"accessInformation": "<accessInformation>",
"licenseInfo": "<licenseInfo>",
"credits": "<credits>",
"link": "<serviceResourceLink>",
"geosceneJslink": "<View in JSAPI Link>"
}
}
]
},
"popupInfo": {
"title": "{title} ({type})",
"fieldInfos": [
{
"fieldName": "id",
"label": "ID",
"visible": false
},
{
"fieldName": "title",
"label": "Title",
"visible": true
},
{
"fieldName": "summary",
"label": "Summary",
"visible": true
},
{
"fieldName": "description",
"label": "Description",
"visible": true
},
{
"fieldName": "tags",
"label": "Tags",
"visible": true
},
{
"fieldName": "type",
"label": "Type",
"visible": true
},
{
"fieldName": "thumbnail",
"label": "Thumbnail",
"visible": false
},
{
"fieldName": "xmin",
"label": "xmin",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "ymin",
"label": "ymin",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "xmax",
"label": "xmax",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "ymax",
"label": "ymax",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "accessInformation",
"label": "Access Information",
"visible": true
},
{
"fieldName": "licenseInfo",
"label": "License Information",
"visible": true
},
{
"fieldName": "credits",
"label": "Credits",
"visible": true
},
{
"fieldName": "link",
"label": "Link",
"visible": true
}
],
"description": null,
"showAttachments": false,
"mediaInfos": [
{
"type": "image",
"caption": "Initial Extent: [{xmin}, {ymin}] - [{xmax}, {ymax}]",
"value": {
"sourceURL": "{thumbnail}",
"linkURL": "{geosceneJslink}"
}
}
]
}
}
]
}
}
}
JSON 响应示例
示例一
{
"currentVersion": 2.0,
"serviceDescription": "Test Map Service Description",
"mapName": "Street Map Pro Data",
"description": "Street Map USA",
"copyrightText": "GEOSCENE",
"supportsDynamicLayers": false,
"layers": [
{
"id": 0,
"name": "Cities",
"defaultVisibility": true,
"parentLayerId": -1,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0
},
{
"id": 1,
"name": "States",
"defaultVisibility": true,
"parentLayerId": -1,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0
},
{
"id": 2,
"name": "Counties",
"defaultVisibility": false,
"parentLayerId": -1,
"subLayerIds": [
3,
4
],
"minScale": 0,
"maxScale": 0
},
{
"id": 3,
"name": "Large Counties",
"defaultVisibility": false,
"parentLayerId": 2,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0
},
{
"id": 4,
"name": "Small Counties",
"defaultVisibility": false,
"parentLayerId": 2,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0
}
],
"spatialReference": {
"wkid": 4326
},
"singleFusedMapCache": true,
"tileInfo": {
"rows": 512,
"cols": 512,
"dpi": 96,
"format": "JPEG",
"compressionQuality": 75,
"origin": {
"x": -130,
"y": 50
},
"spatialReference": {
"wkid": 4326
},
"lods": [
{
"level": 0,
"resolution": 8.46,
"scale": 32000
},
{
"level": 1,
"resolution": 4.23,
"scale": 16000
},
{
"level": 2,
"resolution": 2.11,
"scale": 8000
},
{
"level": 3,
"resolution": 1.05,
"scale": 4000
},
{
"level": 4,
"resolution": 0.52,
"scale": 2000
}
]
},
"initialExtent": {
"xmin": -109.55,
"ymin": 25.76,
"xmax": -86.39,
"ymax": 49.94,
"spatialReference": {
"wkid": 4326
}
},
"fullExtent": {
"xmin": -130,
"ymin": 24,
"xmax": -65,
"ymax": 50,
"spatialReference": {
"wkid": 4326
}
},
"units": "esriDecimalDegrees",
"supportedImageFormatTypes": "PNG32,PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ",
"documentInfo": {
"Title": "StreetMap USA.mxd",
"Author": "GEOSCENE Data Team",
"Comments": "GEOSCENE Data and Maps 2004",
"Subject": "Street level data for the US",
"Category": "vector",
"Keywords": "StreetMap USA"
},
"capabilities": "Map,Query,Data",
"maxRecordCount": 1000,
"maxImageHeight": 2048,
"maxImageWidth": 2048,
"minScale": 0,
"maxScale": 0,
"tileServers": ["https://myserver/geoscene/rest/services/basemap/MapServer","https://myserver2/geoscene/rest/services/basemap/MapServer"],
"supportedQueryFormats": "JSON",
"exportTilesAllowed": true,
"maxExportTilesCount": 100000,
"supportedExtensions": "FeatureServer,KmlServer,MobileServer,WCSServer,WFSServer,WMSServer,NAServer,SchematicsServer"
}
示例二
以下示例演示了从服务请求更新信息时的响应:
{
"timeExtent": [
1230768000000, 1243814400000
],
"fullExtent": {
"xmin": -178.21759836192689,
"ymin": 18.924781799107389,
"xmax": -66.969271035924393,
"ymax": 71.406235352841463,
"spatialReference": {
"wkid": 4269,
"latestWkid": 4269
}
}
}
示例三
以下示例演示了请求服务的覆盖区时的响应:

为简洁起见,imageData 的信息已缩短。
{
"featureCollection": {
"layers": [
{
"layerDefinition":{
"type":"Feature Layer",
"geometryType":"esriGeometryPoint",
"extent":{"xmin":-4254455.8606807785,"ymin":-1273247.593581636,"xmax":-3967497.083911836,"ymax":-1127922.6881048125,"spatialReference":{"wkid":102100}},
"objectIdField":"id",
"displayFieldName":"Maps/BrazilMapServer",
"drawingInfo": {
"renderer": {
"type":"simple",
"label":"Maps/Brazil",
"description":"",
"symbol": {
"height":24,
"xoffset":0,
"yoffset":0,
"width":24,
"contentType":"image/png",
"type":"esriPMS",
"imageData":"iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAABGdBTUEAALGPC/...=",
"url":"https://sampleserver/geoscene/rest/static/images/BlueShinyPin.png"
}
}
},
"fields": [
{
"name": "id",
"alias": "ID",
"type": "esriFieldTypeOID"
},
{
"name": "title",
"alias": "Title",
"type": "esriFieldTypeString"
},
{
"name": "summary",
"alias": "Summary",
"type": "esriFieldTypeString"
},
{
"name": "description",
"alias": "Description",
"type": "esriFieldTypeString"
},
{
"name": "tags",
"alias": "Tags",
"type": "esriFieldTypeString"
},
{
"name": "type",
"alias": "Type",
"type": "esriFieldTypeString"
},
{
"name": "thumbnail",
"alias": "Thumbnail",
"type": "esriFieldTypeString"
},
{
"name": "xmin",
"alias": "xmin",
"type": "esriFieldTypeDouble"
},
{
"name": "ymin",
"alias": "ymin",
"type": "esriFieldTypeDouble"
},
{
"name": "xmax",
"alias": "xmax",
"type": "esriFieldTypeDouble"
},
{
"name": "ymax",
"alias": "ymax",
"type": "esriFieldTypeDouble"
},
{
"name": "accessInformation",
"alias": "Access Information",
"type": "esriFieldTypeString"
},
{
"name": "licenseInfo",
"alias": "License Information",
"type": "esriFieldTypeString"
},
{
"name": "credits",
"alias": "Credits",
"type": "esriFieldTypeString"
},
{
"name": "link",
"alias": "Link",
"type": "esriFieldTypeString"
},
{
"name": "geosceneJslink",
"alias": "GeosceneJsLink",
"type": "esriFieldTypeString"
}
]
},
"featureSet": {
"geometryType":"esriGeometryPoint",
"spatialReference": {
"wkid":102100
},
"features": [
{
"geometry": {
"x": -4110976.4722963073,
"y": -1200585.1408432242
},
"attributes": {
"id": 1,
"title": "Maps/Brazil",
"summary": "",
"description": "",
"tags": "[\"Brazil\"]",
"type": "MapServer",
"thumbnail": "https://sampleserver/geoscene/rest/services/Maps/Brazil/MapServer/info/thumbnail",
"xmin": -4254455.8606807785,
"ymin": -1273247.593581636,
"xmax": -3967497.083911836,
"ymax": -1127922.6881048125,
"accessInformation": "",
"licenseInfo": "",
"credits": "",
"link": "https://sampleserver/geoscene/rest/services/Maps/Brazil/MapServer",
"geosceneJslink": "https://sampleserver/geoscene/rest/services/Maps/Brazil/MapServer?f=jsapi"
}
}
]
},
"popupInfo": {
"title": "{title} ({type})",
"fieldInfos": [
{
"fieldName": "id",
"label": "ID",
"visible": false
},
{
"fieldName": "title",
"label": "Title",
"visible": true
},
{
"fieldName": "summary",
"label": "Summary",
"visible": true
},
{
"fieldName": "description",
"label": "Description",
"visible": true
},
{
"fieldName": "tags",
"label": "Tags",
"visible": true
},
{
"fieldName": "type",
"label": "Type",
"visible": true
},
{
"fieldName": "thumbnail",
"label": "Thumbnail",
"visible": false
},
{
"fieldName": "xmin",
"label": "xmin",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "ymin",
"label": "ymin",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "xmax",
"label": "xmax",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "ymax",
"label": "ymax",
"format": {
"places": 2,
"digitSeparator": false
},
"visible": false
},
{
"fieldName": "accessInformation",
"label": "Access Information",
"visible": true
},
{
"fieldName": "licenseInfo",
"label": "License Information",
"visible": true
},
{
"fieldName": "credits",
"label": "Credits",
"visible": true
},
{
"fieldName": "link",
"label": "Link",
"visible": true
}
],
"description": null,
"showAttachments": false,
"mediaInfos": [
{
"type": "image",
"caption": "Initial Extent: [{xmin}, {ymin}] - [{xmax}, {ymax}]",
"value": {
"sourceURL": "{thumbnail}",
"linkURL": "{geosceneJslink}"
}
}
]
}
}
]
}
}