Skip to content

Commit

Permalink
Merge pull request getodk#2974 from lognaturel/issue-2973
Browse files Browse the repository at this point in the history
Don't recenter the map if user is manually placing points
  • Loading branch information
yanokwa authored Mar 29, 2019
2 parents 1375747 + c60357a commit 004bd82
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,15 @@ private void onClick(MapPoint point) {
}

private void onGpsLocationReady(MapFragment map) {
if (getWindow().isActive()) {
// Don't zoom to current location if a user is manually entering points
if (getWindow().isActive() && (!inputActive || recordingEnabled)) {
map.zoomToPoint(map.getGpsLocation(), true);
}
updateUi();
}

private void onGpsLocation(MapPoint point) {
if (inputActive) {
if (inputActive && recordingEnabled) {
map.setCenter(point, false);
}
updateUi();
Expand Down

0 comments on commit 004bd82

Please sign in to comment.