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

[Compose] Add onDrag support for all annotations #2460

Open
k3nda opened this issue Aug 16, 2024 · 2 comments
Open

[Compose] Add onDrag support for all annotations #2460

k3nda opened this issue Aug 16, 2024 · 2 comments

Comments

@k3nda
Copy link

k3nda commented Aug 16, 2024

New Feature

Add possibility to listen to drag events for all annotations. Either parameter dragListener or all onDragStarted, onDrag and onDragFinished.

Same functionality as it is now possible in non-composable:

    mapView.annotations.createCircleAnnotationManager().apply {
        addDragListener(object : OnCircleAnnotationDragListener {
            override fun onAnnotationDrag(annotation: Annotation<*>) {
                
            }

            override fun onAnnotationDragFinished(annotation: Annotation<*>) {
                
            }

            override fun onAnnotationDragStarted(annotation: Annotation<*>) {
                
            }
        })
    }

Example of usage:

            CircleAnnotationGroup(
                onDragStart = { annotation: CircleAnnotation -> /* handle event */ }
            )

Why

There is onClick parameter already so why there is no support for drag events? It is crucial thing for us as we draw polygons and we need to edit them and move with points.

@flasher297
Copy link
Contributor

Thank you for the suggestion.
We created a ticket to support onDrag in Compose.
I'll come back as soon as it's released.

@k3nda
Copy link
Author

k3nda commented Sep 30, 2024

Can you provide any time estimation of the release please?

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

No branches or pull requests

2 participants