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

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

Open
helxsz opened this issue Jul 15, 2024 · 0 comments
Open

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

helxsz opened this issue Jul 15, 2024 · 0 comments

Comments

@helxsz
Copy link

helxsz commented Jul 15, 2024

🐛 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

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

1 participant