Source: styles/legendItem.js

/**
 * Класс, описывающий элемент легенды слоя
 * @class LegendItem
 */
class LegendItem {
   /**
    * Конструктор LegendItem
    * @param params {object} - опции создания элемента легенды
    * @param params.index {number} - индекс в коллекции
    * @param params.properties {object} - свойства
    * @param params.style {object} - описание стиля
    * @param params.geometryType {string} - тип геометрии
    * @param params.symbolExample {object} - образцы стиля
    */
    constructor(params) {
        this.index = params.index || 0;
        this.properties = params.properties || {};
        this.label = params.label || params.value || "любое значение";
        this.style = params.style;
        this.geometryType = params.geometryType;
        this.symbolExample = params.symbolExample;
    }
}

module.exports = LegendItem;