import defined from "terriajs-cesium/Source/Core/defined"; import ImageryLayerFeatureInfo from "terriajs-cesium/Source/Scene/ImageryLayerFeatureInfo"; import formatPropertyValue from "../../Core/formatPropertyValue"; /** * Configures the description of this feature by creating an HTML table of properties and their values. * * @param {Object} properties An object literal containing the properties of the feature. */ ImageryLayerFeatureInfo.prototype.configureDescriptionFromProperties = function (properties: any) { function describe(properties: any) { let html = ''; for (const key in properties) { if (Object.prototype.hasOwnProperty.call(properties, key)) { const value = properties[key]; if (defined(value)) { if (typeof value === "object") { html += ""; } else { html += ""; } } } } html += "
" + key + "" + describe(value) + "
" + key + "" + formatPropertyValue(value) + "
"; return html; } this.description = describe(properties); };