UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

56 lines (54 loc) 2.08 kB
import type { JSONSupport } from "../core/JSONSupport.js"; export interface LayerOptionsProperties extends Partial<Pick<LayerOptions, "returnTopmostRaster" | "showNoDataRecords">> {} /** * The `LayerOptions` class defines additional options that can be * defined for a layer's [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/). * * @since 4.11 * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) * @see [Sample - Intro to PopupTemplate](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/) * @see [Sample - Multiple popup elements](https://developers.arcgis.com/javascript/latest/sample-code/popup-multipleelements/) * @example * popupTemplate: { * "title": "ScientificData/SeaTemperature:{ProductName}", * content: [{ * type: "fields", * "fieldInfos": [{ * "fieldName": "Raster.ItemPixelValue", * "label": "Item Pixel Value", * "isEditable": false, * "visible": true, * "format": { * "places": 2, * "digitSeparator": true * } * }], * "layerOptions": { * "showNoDataRecords": true * } * }] * } */ export default class LayerOptions extends JSONSupport { constructor(properties?: LayerOptionsProperties); /** * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/). * Indicates whether or not only the topmost raster should be displayed. * * @default false */ accessor returnTopmostRaster: boolean | null | undefined; /** * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/). * Indicates whether records without data should display within the popup. * * @default true */ accessor showNoDataRecords: boolean | null | undefined; /** * Creates a deep clone of the LayerOptions class. * * @returns A deep clone of the LayerOptions instance. */ clone(): LayerOptions; }