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

[ios] Make MGLCoordinateInCoordinateBounds() public #5053

Merged
merged 2 commits into from
May 17, 2016

Conversation

friedbunny
Copy link
Contributor

@friedbunny friedbunny commented May 17, 2016

Makes the formerly-private MGLCoordinateInCoordinateBounds() function publicly available.

  • The old private function converted MGLCoordinateBoundsmbgl::LatLngBounds and CLLocationCoordinate2Dmbgl:LatLng.
  • The new public function compares CLLocationCoordinate2D and MGLCoordinateBounds directly.

/cc @1ec5

@friedbunny friedbunny self-assigned this May 17, 2016
@friedbunny friedbunny added iOS Mapbox Maps SDK for iOS refactor labels May 17, 2016
@friedbunny friedbunny added this to the ios-v3.3.0 milestone May 17, 2016
@friedbunny friedbunny force-pushed the fb-coordInBounds-public branch from f39272d to b383248 Compare May 17, 2016 13:11
@friedbunny friedbunny force-pushed the fb-coordInBounds-public branch from b383248 to 04a475e Compare May 17, 2016 14:22
@friedbunny
Copy link
Contributor Author

friedbunny commented May 17, 2016

One potential issue I’ve encountered with this simplified function is that it strictly requires the bounds to be NE, SW. The old function would fix screwy bounds (e.g., where NW/SE was used) by creating a convex hull from that bounds’ points — essentially, always recreating the bounds.

@1ec5
Copy link
Contributor

1ec5 commented May 17, 2016

Looks good to me.

The old function would fix screwy bounds (e.g., where NW/SE was used) by creating a convex hull from that bound's points — essentially, always recreating the bounds.

We've also discussed flipped coordinates as a way of indicating a bounds that spans the antimeridian. Whatever the case, perhaps we need an MGLCoordinateBoundsStandardize(), by analogy with CGRectStandardize().

@friedbunny friedbunny merged commit 2244737 into master May 17, 2016
@friedbunny friedbunny deleted the fb-coordInBounds-public branch May 17, 2016 15:02
friedbunny added a commit that referenced this pull request Jun 10, 2016
1ec5 added a commit that referenced this pull request Jun 14, 2016
friedbunny added a commit that referenced this pull request Jun 22, 2016
friedbunny added a commit that referenced this pull request Jul 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants