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

Bug: GeofenceCircle getCenter() method does not return correct position if circle has been moved #5

Open
ssak995 opened this issue Jan 19, 2018 · 0 comments

Comments

@ssak995
Copy link

ssak995 commented Jan 19, 2018

I implemented the onMoveCircleEnd() method of the CircleManagerListener interface to get the new coordinates of the circle after it has been dragged on the map. However, it was returning the original coordinates of the marker/circle.

After looking through the code, I found out that its because the internal variable center of GeofenceCircle class is not being updated properly. So, I suggest two solutions:

  1. In public void onCenterUpdated(LatLng center) , update the internal 'center' variable as well

  2. In public LatLng getCenter() { return center; } change to
    public LatLng getCenter() { return centerMarker.getPosition(); }

@ssak995 ssak995 changed the title Bug: GeofenceCircle getCenter() method does not return new position if circle has been moved Bug: GeofenceCircle getCenter() method does not return correct position if circle has been moved Jan 19, 2018
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