GetFeatureInfoFormat

new Cesium.GetFeatureInfoFormat(type, format, callback)

描述从 Web 地图服务 (WMS) 服务器请求 GetFeatureInfo 的格式。
Name Type Description
type string 期望从 GetFeatureInfo 请求获得的响应类型。 有效 值为 'JSON'、'XML'、'HTML' 或 'text'。
format string optional 要从 WMS 服务器请求的信息格式。 这通常是一个 MIME 类型,例如 'application/json' 或 text/xml'。 如果未指定此参数,提供程序将请求 'json' 使用 'application/json',使用 'XML',使用 'text/xml',使用 'HTML',使用 'text/html',使用 'text/plain' 的 'text'。
callback function optional 使用 WMS 服务器的 GetFeatureInfo 响应调用的函数 以生成选取的 ImageryLayerFeatureInfo 实例的数组。 如果不指定该参数, 使用响应类型的 default 函数。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.