Skip to content

🤔 [QUESTION] any code API to add context menu in the scene ? #235

@helxsz

Description

@helxsz

🐛 Question description [Please make everyone to understand it]

I want to add contextmenu to the scene, I only see the example from https://github.com/antvis/LarkMap/blob/ac6b4de7dc72617f6e9bd0afc077c4bde7c5970a/src/components/ContextMenu/demos/default.tsx#L4 ,which is

      <ContextMenu>
        <ContextMenu.Item  text="放大一级"  onClick={() => {  handleMenu('zoomIn'); }}/>
        <ContextMenu.Item text="缩小一级" onClick={() => handleMenu('zoomOut')} />
        <ContextMenu.Item text="缩放至全国范围" onClick={() => handleMenu('center')} />
      </ContextMenu>

however just wondering is there any code API to have the scene add the context menu ?

        this.scene = new Scene({
            id: 'map',
            map: new GaodeMap(this.map)
        });

best rgds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions