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

setOnMarkerDragListener does not report marker drag event #1329

Open
gpopac opened this issue Apr 14, 2024 · 2 comments
Open

setOnMarkerDragListener does not report marker drag event #1329

gpopac opened this issue Apr 14, 2024 · 2 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@gpopac
Copy link

gpopac commented Apr 14, 2024

I have trouble implementing marker dragging with android-maps-utils, despite following the guideline. The marker is draggable, but dragging it on the map does not trigger onMarkerDrag, onMarkerDragEnd or onMarkerDragStart.

I am using KmlLayer and GeoJsonLayer to add custom overlay on the map and simple marker only (not clusters). For more details the code of the Activity is available here: https://github.com/Biologer/Biologer-Android/blob/master/app/src/main/java/org/biologer/biologer/gui/MapActivity.java

In summary I used:

Marker marker;
MarkerManager markerManager = new MarkerManager(googleMap);
MarkerManager.Collection markerCollection = markerManager.newCollection();
MarkerOptions markerOptions = new MarkerOptions().position(latLong).draggable(true);
marker = markerCollection.addMarker(markerOptions);
markerCollection.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener( ... ...
@gpopac gpopac added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 14, 2024
@wangela
Copy link
Member

wangela commented Apr 14, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@gpopac Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@gpopac
Copy link
Author

gpopac commented Apr 14, 2024

Update. It looks like the dragging stops working as soon as I add KmlLayer or GeoJsonLayer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants