Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@edbrett
Copy link
Contributor

@edbrett edbrett commented Nov 27, 2018

Overview

In the Search section of the map menu, when entering coordinates or decimal degrees and submitting the map was updating the center position of the map during the movement to the new desired location. This was causing the center values to be incorrect, and also requiring the user to continue submitting until they reached the correct location. See the pitoval task to access the videos: https://www.pivotaltracker.com/story/show/162083518.

Solution: use the leaflet event moveend instead of move to prevent updating the center early. Additionally floats were being parsed into floats (due to my own incompetence). Now float are floating correctly.

Testing

  • go to map search
  • enter coordinates (41°24'12.2"N 2°10'26.5"E) or decimal degrees (30.211, -16.3213) and submit.
  • check that the bottom right component with lat long matches your search after a single submit.

@edbrett edbrett requested review from benlaken and dfrico November 27, 2018 17:20
Copy link
Contributor

@dfrico dfrico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected! 👍

Note: The parsing to float, is it because it wasn't considering lat and long decimals? Seems to be fine now.

@edbrett edbrett merged commit 46bea5b into develop Nov 29, 2018
@edbrett edbrett deleted the fix/search-coords-not-centering branch November 30, 2018 16:42
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

Successfully merging this pull request may close these issues.

3 participants