Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMap.LabelsLayer 下缺少方法 clear(); #1

Open
xby020 opened this issue May 25, 2022 · 1 comment
Open

AMap.LabelsLayer 下缺少方法 clear(); #1

xby020 opened this issue May 25, 2022 · 1 comment

Comments

@xby020
Copy link

xby020 commented May 25, 2022

参见高德文档
AMap.LabelsLayer 拥有方法clear();
在types文件里面没有定义。

@keqingrong
Copy link
Owner

大部分类型直接引用自 @types/amap-js-api ,其中是定义了的呀?

https://cdn.jsdelivr.net/npm/@types/[email protected]/layer/labelsLayer.d.ts

    class LabelsLayer extends Layer {
        /**
         * 标注图层
         * @param options 选项
         */
        constructor(options?: LabelsLayer.Options);
        /**
         * 图层中添加LabelMarker
         * @param labelMarker 标注对象
         */
        add(labelMarker: LabelMarker | LabelMarker[]): void;
        /**
         * 图层中移除LabelMarker
         * @param labelMarker 标注对象
         */
        remove(labelMarker: LabelMarker): void;
        /**
         * 清空图层
         */
        clear(): void;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants