diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2018-02-20 12:57:59 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2018-02-20 12:58:05 -0800 |
commit | 7f5aadd1f034988ad5170b59afead3c356a8df1c (patch) | |
tree | 09de5a7770edf9702e17488210d97e5240e19195 /platform/macos/src/MGLMapView.h | |
parent | 054d4d5ad676ce1ca9a740bc99ccd7ff2f9fecec (diff) | |
download | qtlocation-mapboxgl-7f5aadd1f034988ad5170b59afead3c356a8df1c.tar.gz |
[ios, macos] Unwrap coordinate boundsupstream/1ec5-visible-unwrap-4664
Updated coordinate bounds conversion methods to use the beyond-±180 method to indicate that the bounds extends beyond the antimeridian. Also copyedited conversion documentation.
Diffstat (limited to 'platform/macos/src/MGLMapView.h')
-rw-r--r-- | platform/macos/src/MGLMapView.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h index 96b0932c14..050145b80b 100644 --- a/platform/macos/src/MGLMapView.h +++ b/platform/macos/src/MGLMapView.h @@ -397,11 +397,10 @@ MGL_EXPORT IB_DESIGNABLE want to animate the change, use the `-setVisibleCoordinateBounds:animated:` method instead. - If a longitude is less than −180 degrees or greater than 180 degrees, the visible - bounds straddles the antimeridian or international date line. - - For example, a visible bounds that stretches from Tokyo to San Francisco would have - coordinates of (35.68476, -220.24257) and (37.78428, -122.41310). + If a longitude is less than −180 degrees or greater than 180 degrees, the + visible bounds straddles the antimeridian or international date line. For + example, if both Tokyo and San Francisco are visible, the visible bounds might + extend from (35.68476, −220.24257) to (37.78428, −122.41310). */ @property (nonatomic) MGLCoordinateBounds visibleCoordinateBounds; @@ -409,11 +408,10 @@ MGL_EXPORT IB_DESIGNABLE Changes the receiver’s viewport to fit the given coordinate bounds, optionally animating the change. - To make the visible bounds go across the antimeridian or international date line, - specify some longitudes less than −180 degrees or greater than 180 degrees. - - For example, a visible bounds that stretches from Tokyo to San Francisco would have - coordinates of (35.68476, -220.24257) and (37.78428, -122.41310). + To bring both sides of the antimeridian or international date line into view, + specify some longitudes less than −180 degrees or greater than 180 degrees. For + example, to show both Tokyo and San Francisco simultaneously, you could set the + visible bounds to extend from (35.68476, −220.24257) to (37.78428, −122.41310). @param bounds The bounds that the viewport will show in its entirety. @param animated Specify `YES` to animate the change by smoothly scrolling and @@ -1060,6 +1058,9 @@ MGL_EXPORT IB_DESIGNABLE /** Converts a rectangle in the given view’s coordinate system to a geographic bounding box. + + If a longitude is less than −180 degrees or greater than 180 degrees, the + bounding box straddles the antimeridian or international date line. @param rect The rectangle to convert. @param view The view in whose coordinate system the rectangle is expressed. |