diff options
Diffstat (limited to 'platform/macos/src')
-rw-r--r-- | platform/macos/src/MGLMapView.h | 12 | ||||
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h index de099157c8..96b0932c14 100644 --- a/platform/macos/src/MGLMapView.h +++ b/platform/macos/src/MGLMapView.h @@ -396,12 +396,24 @@ MGL_EXPORT IB_DESIGNABLE Changing the value of this property updates the receiver immediately. If you 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). */ @property (nonatomic) MGLCoordinateBounds visibleCoordinateBounds; /** 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). @param bounds The bounds that the viewport will show in its entirety. @param animated Specify `YES` to animate the change by smoothly scrolling and diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index b32edffd43..9ec9012198 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -371,7 +371,7 @@ public: NSImage *logoImage = [[NSImage alloc] initWithContentsOfFile: [[NSBundle mgl_frameworkBundle] pathForResource:@"mapbox" ofType:@"pdf"]]; // Account for the image’s built-in padding when aligning other controls to the logo. - logoImage.alignmentRect = NSInsetRect(logoImage.alignmentRect, 0, 3); + logoImage.alignmentRect = NSOffsetRect(logoImage.alignmentRect, 0, 3); _logoView.image = logoImage; _logoView.translatesAutoresizingMaskIntoConstraints = NO; _logoView.accessibilityTitle = NSLocalizedStringWithDefaultValue(@"MAP_A11Y_TITLE", nil, nil, @"Mapbox", @"Accessibility title"); @@ -2077,7 +2077,7 @@ public: return true; } - if ([annotation isKindOfClass:[MGLShape class]]) + if ([annotation isKindOfClass:[MGLMultiPoint class]]) { return false; } |