Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

avoid adding duplicate points to bounds - #9955

Merged
tobrun merged 1 commit into
masterfrom
9953-validate-if-point-was-contained
Sep 11, 2017
Merged

tobrun merged 1 commit into
masterfrom
9953-validate-if-point-was-contained

Conversation

@tobrun

@tobrun tobrun commented Sep 11, 2017

Copy link
Copy Markdown
Member

closes #9953, this PR validates if a point added to the LatLngBounds builder hasn't been added before. Atm a developer can create a bounds from one point by passing in the same point twice.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Sep 11, 2017
@tobrun tobrun added this to the android-v5.1.4 milestone Sep 11, 2017
@tobrun tobrun self-assigned this Sep 11, 2017
@tobrun
tobrun requested a review from zugaldia September 11, 2017 12:10
@tobrun tobrun changed the title [android] - avoid adding duplicate points to bounds avoid adding duplicate points to bounds Sep 11, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you extract this into a private method? The same exact piece of code is duplicated and could be simplified and used from both includes and include methods.

@tobrun
tobrun force-pushed the 9953-validate-if-point-was-contained branch from eb9cd34 to 6f5b62c Compare September 11, 2017 14:07

@Guardiola31337 Guardiola31337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@tobrun
tobrun merged commit 738f682 into master Sep 11, 2017
@tobrun
tobrun deleted the 9953-validate-if-point-was-contained branch September 11, 2017 17:26
@tobrun tobrun mentioned this pull request Sep 26, 2017
19 tasks done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LatLngBounds with one point

2 participants