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

Annotations not draggable if not the latest instantiated XxxManager #1122

Closed
Ph0tonic opened this issue May 4, 2020 · 2 comments
Closed

Comments

@Ph0tonic
Copy link
Contributor

Ph0tonic commented May 4, 2020

Hello,

I encountered a strange behaviour. When I create a marker via a CircleManager on which I add a draggableListener then if I instantiate another Manager(Symbol, Circle, ...) afterwards then my listener is not triggered any more. This happens even if I set the next Manager to be below my CircleManager layer using the belowLayerId property.

Do you have any clue on what could cause this issue ?
Thanks in advance

@Ph0tonic
Copy link
Contributor Author

Ph0tonic commented May 5, 2020

I had a look at the code and I found the following inside DraggableAnnotationController.java :

mapView.setOnTouchListener(new View.OnTouchListener() {
      @Override
      public boolean onTouch(View v, MotionEvent event) {
        androidGesturesManager.onTouchEvent(event);
        // if drag is started, don't pass motion events further
        return draggedAnnotation != null;
      }
    });

From what I know, I think that we replace the touchListener of mapView whenever we create a new AnnotationManager which lead to this bug.

@Ph0tonic
Copy link
Contributor Author

Ph0tonic commented May 6, 2020

Duplicated of #863, I'll close this issue.

@Ph0tonic Ph0tonic closed this as completed May 6, 2020
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