GetFeatureInfoFormat

new Cesium.GetFeatureInfoFormat(type, format, callback)

描述向 Web Map Service (WMS) 或 Web Map Tile Service (WMTS) 服务器请求 GetFeatureInfo 时所使用的格式。
Name Type Description
type string GetFeatureInfo 请求所期望的响应类型。有效 值为 'json'、'xml'、'html' 或 'text'。
format string optional 向服务器请求的信息格式。这通常是一个 MIME 类型,例如 'application/json' 或 'text/xml'。如果未指定此参数,provider 将按如下方式请求:'json' 使用 'application/json','xml' 使用 'text/xml','html' 使用 'text/html','text' 使用 'text/plain'。
callback function optional 一个函数,传入服务器的 GetFeatureInfo 响应以 生成一组被选中的 ImageryLayerFeatureInfo 实例数组。如果未指定此参数, 将使用与响应类型对应的默认函数。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。