You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
In public void onCenterUpdated(LatLng center) , update the internal 'center' variable as well
In public LatLng getCenter() { return center; } change to public LatLng getCenter() { return centerMarker.getPosition(); }
The text was updated successfully, but these errors were encountered:
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
I implemented the
onMoveCircleEnd()
method of theCircleManagerListener
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
ofGeofenceCircle
class is not being updated properly. So, I suggest two solutions:In
public void onCenterUpdated(LatLng center)
, update the internal 'center' variable as wellIn
public LatLng getCenter() { return center; }
change topublic LatLng getCenter() { return centerMarker.getPosition(); }
The text was updated successfully, but these errors were encountered: