[osx] Corrected documentation

Corrected the path to the build output. Also added a missing inline comment.
This commit is contained in:
Minh Nguyễn
2015-12-13 16:25:53 -08:00
committed by Minh Nguyễn
parent 835bb6ab08
commit a01dd8ade1
2 changed files with 7 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ This project provides an OS X SDK analogous to the Mapbox iOS SDK. Mapbox does n
### Build
1. Run `make xpackage`, which produces a `Mapbox.framework` in the `gyp/build/Release/` folder.
1. Run `make xpackage`, which produces a `Mapbox.framework` in the `build/osx/pkg/` folder.
### Install

View File

@@ -1659,14 +1659,16 @@ public:
std::sort(nearbyAnnotations.begin(), nearbyAnnotations.end());
if (nearbyAnnotations == _annotationsNearbyLastClick) {
// The first selection in the cycle should be the one nearest to the
// click.
CLLocationCoordinate2D currentCoordinate = [self convertPoint:point toCoordinateFromView:self];
std::sort(nearbyAnnotations.begin(), nearbyAnnotations.end(), [&](const MGLAnnotationTag tagA, const MGLAnnotationTag tagB) {
CLLocationCoordinate2D coordinateA = [[self annotationWithTag:tagA] coordinate];
CLLocationCoordinate2D coordinateB = [[self annotationWithTag:tagB] coordinate];
double distanceA = hypot(coordinateA.latitude - currentCoordinate.latitude,
coordinateA.longitude - currentCoordinate.longitude);
double distanceB = hypot(coordinateB.latitude - currentCoordinate.latitude,
coordinateB.longitude - currentCoordinate.longitude);
CLLocationDegrees distanceA = hypot(coordinateA.latitude - currentCoordinate.latitude,
coordinateA.longitude - currentCoordinate.longitude);
CLLocationDegrees distanceB = hypot(coordinateB.latitude - currentCoordinate.latitude,
coordinateB.longitude - currentCoordinate.longitude);
return distanceA < distanceB;
});