"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextLayer = void 0;
var tslib_1 = require("tslib");
var l7_layers_1 = require("@antv/l7-layers");
var core_layer_1 = require("../../core/core-layer");
/**
 * 文本图层
 * 对应 L7 的 PointLayer
 **/
var TextLayer = /** @class */ (function (_super) {
    tslib_1.__extends(TextLayer, _super);
    function TextLayer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.type = 'textLayer';
        return _this;
    }
    /**
     * 创建图层
     */
    TextLayer.prototype.createLayer = function () {
        var config = this.getLayerConfig();
        var layer = new l7_layers_1.PointLayer(config);
        return layer;
    };
    /**
     * 适配属性配置
     */
    TextLayer.prototype.adaptorAttrOptions = function (options) {
        var _a = this.options, field = _a.field, _b = _a.style, style = _b === void 0 ? {} : _b;
        var _c = style || {}, color = _c.fill, size = _c.fontSize;
        var shape = { field: field, value: 'text' };
        return tslib_1.__assign({ shape: shape, color: color, size: size }, options);
    };
    return TextLayer;
}(core_layer_1.CoreLayer));
exports.TextLayer = TextLayer;
//# sourceMappingURL=index.js.map