Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Prevent map crash by not using strict equality when comparing point coordinates #737

Merged
merged 1 commit into from Aug 21, 2019

Conversation

jwalgran
Copy link
Contributor

Overview

Points were not being combined into a disambiguation popup and throwing an exception when a precision or rounding error prevented the points from being strictly equal.

Connects #734

Testing Instructions

  • Run ./scripts/resetdb
  • Run ./scripts/manage dbshell and set the same location for all facilities in VN.
UPDATE api_facility 
SET location = st_geomfromtext('POINT(106.8909948 10.9393085)', 4326) 
WHERE id IN (
  SELECT id 
  FROM api_facility 
  WHERE country_code = 'VN'
);

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

@jwalgran jwalgran changed the title Don't use strict equality when comparing point coordinates Prevent map crash by not using strict equality when comparing point coordinates Aug 21, 2019
Points were not being combined into a disambiguation popup and throwing an
exception when a precision or rounding error prevented the points from being
strictly equal.
Copy link
Contributor

@kellyi kellyi left a comment

Choose a reason for hiding this comment

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

👍

Screen Shot 2019-08-21 at 5 13 32 PM
Screen Shot 2019-08-21 at 5 13 38 PM

@jwalgran
Copy link
Contributor Author

Thanks for the review.

@jwalgran jwalgran merged commit 605d65c into develop Aug 21, 2019
@jwalgran jwalgran deleted the jcw/fix-overlap-point-click branch August 21, 2019 21:30
@kellyi kellyi assigned jwalgran and unassigned kellyi Aug 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants