From d303980e75d85ac88c382cac54c55cc7ee74534e Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Thu, 14 Jul 2016 19:50:41 -0400 Subject: [ios] Pass `animated` property when deselecting annotation views (#5677) --- platform/ios/src/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/ios') diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index ffd6fcbbb7..cb192d3612 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3632,7 +3632,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { MGLAnnotationContext &annotationContext = _annotationContextsByAnnotationTag.at(annotationTag); annotationView = annotationContext.annotationView; - annotationView.selected = NO; + [annotationView setSelected:NO animated:animated]; } // clean up -- cgit v1.2.1 From bdd2d028d93e51dca341754da335638b4346590d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Fri, 15 Jul 2016 15:44:29 -0700 Subject: [ios] Reenabled long tap to drop pins Long pressing drops pins again. The minimum press duration has been extended to a second to avoid preempting the built-in gesture for draggable annotations. --- platform/ios/app/MBXViewController.m | 2 -- platform/ios/app/Main.storyboard | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'platform/ios') diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 6158a9a3de..789ee00372 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -411,7 +411,6 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie { if (longPress.state == UIGestureRecognizerStateBegan) { - /* CGPoint point = [longPress locationInView:longPress.view]; NSArray *features = [self.mapView visibleFeaturesAtPoint:point]; NSString *title; @@ -428,7 +427,6 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie pin.subtitle = [[[MGLCoordinateFormatter alloc] init] stringFromCoordinate:pin.coordinate]; // Calling `addAnnotation:` on mapView is not required since `selectAnnotation:animated` has the side effect of adding the annotation if required [self.mapView selectAnnotation:pin animated:YES]; - */ } } diff --git a/platform/ios/app/Main.storyboard b/platform/ios/app/Main.storyboard index 1190070d8e..7d8b2c304f 100644 --- a/platform/ios/app/Main.storyboard +++ b/platform/ios/app/Main.storyboard @@ -79,7 +79,7 @@ - + -- cgit v1.2.1 From ede1e713d8b66be713d96141653b83078443cbea Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Mon, 18 Jul 2016 14:04:14 -0700 Subject: [ios] fixes #3697 compass, logo and attribution now respects insets (#5671) * [ios] fixes #3697 compass, logo and attribution now respects mapview's content inset * [ios] fixed a bug which added duplicated constraints instead of updating * [ios] layout guides are already taken into account in contentInset --- platform/ios/src/MGLMapView.mm | 71 +++++++++++++----------------------------- 1 file changed, 22 insertions(+), 49 deletions(-) (limited to 'platform/ios') diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index cb192d3612..4d692fa718 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -220,6 +220,7 @@ public: @property (nonatomic) GLKView *glView; @property (nonatomic) UIImageView *glSnapshotView; @property (nonatomic, readwrite) UIImageView *compassView; +@property (nonatomic) NS_MUTABLE_ARRAY_OF(NSLayoutConstraint *) *compassViewConstraints; @property (nonatomic, readwrite) UIImageView *logoView; @property (nonatomic) NS_MUTABLE_ARRAY_OF(NSLayoutConstraint *) *logoViewConstraints; @property (nonatomic, readwrite) UIButton *attributionButton; @@ -451,7 +452,6 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) // setup compass // _compassView = [[UIImageView alloc] initWithImage:self.compassImage]; - _compassView.frame = { CGPointZero, _compassView.image.size }; _compassView.alpha = 0; _compassView.userInteractionEnabled = YES; [_compassView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleCompassTapGesture:)]]; @@ -462,6 +462,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) [container addSubview:_compassView]; container.translatesAutoresizingMaskIntoConstraints = NO; [self addSubview:container]; + _compassViewConstraints = [NSMutableArray array]; // setup interaction // @@ -737,40 +738,29 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) // compass // UIView *compassContainer = self.compassView.superview; - [compassContainer removeConstraints:compassContainer.constraints]; + [constraintParentView removeConstraints:self.compassViewConstraints]; + [self.compassViewConstraints removeAllObjects]; - NSMutableArray *compassContainerConstraints = [NSMutableArray array]; - if (viewController) - { - [compassContainerConstraints addObject: - [NSLayoutConstraint constraintWithItem:compassContainer - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationGreaterThanOrEqual - toItem:viewController.topLayoutGuide - attribute:NSLayoutAttributeBottom - multiplier:1 - constant:5]]; - } - [compassContainerConstraints addObject: + [self.compassViewConstraints addObject: [NSLayoutConstraint constraintWithItem:compassContainer attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1 - constant:5]]; + constant:5 + self.contentInset.top]]; - [compassContainerConstraints addObject: + [self.compassViewConstraints addObject: [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:compassContainer attribute:NSLayoutAttributeTrailing multiplier:1 - constant:5]]; + constant:5 + self.contentInset.right]]; UIImage *compassImage = self.compassView.image; - [compassContainerConstraints addObject: + [self.compassViewConstraints addObject: [NSLayoutConstraint constraintWithItem:compassContainer attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual @@ -779,7 +769,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) multiplier:1 constant:compassImage.size.width]]; - [compassContainerConstraints addObject: + [self.compassViewConstraints addObject: [NSLayoutConstraint constraintWithItem:compassContainer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual @@ -787,23 +777,13 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:compassImage.size.height]]; - [constraintParentView addConstraints:compassContainerConstraints]; + [constraintParentView addConstraints:self.compassViewConstraints]; // logo bug // - [self.logoView removeConstraints:self.logoViewConstraints]; + [constraintParentView removeConstraints:self.logoViewConstraints]; [self.logoViewConstraints removeAllObjects]; - if (viewController) - { - [self.logoViewConstraints addObject: - [NSLayoutConstraint constraintWithItem:viewController.bottomLayoutGuide - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationGreaterThanOrEqual - toItem:self.logoView - attribute:NSLayoutAttributeBaseline - multiplier:1 - constant:8]]; - } + [self.logoViewConstraints addObject: [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom @@ -811,7 +791,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) toItem:self.logoView attribute:NSLayoutAttributeBaseline multiplier:1 - constant:8]]; + constant:8 + self.contentInset.bottom]]; [self.logoViewConstraints addObject: [NSLayoutConstraint constraintWithItem:self.logoView @@ -820,24 +800,14 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) toItem:self attribute:NSLayoutAttributeLeading multiplier:1 - constant:8]]; + constant:8 + self.contentInset.left]]; [constraintParentView addConstraints:self.logoViewConstraints]; // attribution button // - [self.attributionButton removeConstraints:self.attributionButtonConstraints]; + [constraintParentView removeConstraints:self.attributionButtonConstraints]; [self.attributionButtonConstraints removeAllObjects]; - if (viewController) - { - [self.attributionButtonConstraints addObject: - [NSLayoutConstraint constraintWithItem:viewController.bottomLayoutGuide - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationGreaterThanOrEqual - toItem:self.attributionButton - attribute:NSLayoutAttributeBaseline - multiplier:1 - constant:8]]; - } + [self.attributionButtonConstraints addObject: [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom @@ -845,7 +815,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) toItem:self.attributionButton attribute:NSLayoutAttributeBaseline multiplier:1 - constant:8]]; + constant:8 + self.contentInset.bottom]]; [self.attributionButtonConstraints addObject: [NSLayoutConstraint constraintWithItem:self @@ -854,7 +824,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) toItem:self.attributionButton attribute:NSLayoutAttributeTrailing multiplier:1 - constant:8]]; + constant:8 + self.contentInset.right]]; [constraintParentView addConstraints:self.attributionButtonConstraints]; [super updateConstraints]; @@ -974,6 +944,9 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { [self didUpdateLocationWithUserTrackingAnimated:animated]; } + + // Compass, logo and attribution button constraints needs to be updated. + [self setNeedsUpdateConstraints]; } /// Returns the frame of inset content within the map view. -- cgit v1.2.1 From 8179f2f6b2c185c16745c6a3faf4d4bd9683ef16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sat, 16 Jul 2016 14:19:14 -0700 Subject: [core] Restored shape annotation z-order Shapes are once again always added to the top z-index. Fixes #5691. Cherry-picked from 74fe96d2617f870206ff358d7dfcafccf4e109bc. --- platform/ios/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/ios') diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 6c08b357aa..d8aa664090 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,6 +2,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +## master + +* Fixed an issue causing overlapping polylines and polygons to be drawn in undefined z-order. Shapes are always drawn in the order they are added to the map, from the oldest on the bottom to the newest on the top. ([#5710](https://github.com/mapbox/mapbox-gl-native/pull/5710)) + ## 3.3.0 ### Styles and data -- cgit v1.2.1 From 1d96191442cfd8cf798af8fad972e3bcc60f1677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Mon, 18 Jul 2016 15:38:45 -0700 Subject: [ios] Updated changelog for v3.3.1 Added entries for #5693, #5677, and #5671. --- platform/ios/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'platform/ios') diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d8aa664090..d74f99738a 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,9 +2,12 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. -## master +## 3.3.1 * Fixed an issue causing overlapping polylines and polygons to be drawn in undefined z-order. Shapes are always drawn in the order they are added to the map, from the oldest on the bottom to the newest on the top. ([#5710](https://github.com/mapbox/mapbox-gl-native/pull/5710)) +* Fixed an issue preventing MGLMapView from changing its viewport when a single annotation was passed into `-[MGLMapView showAnnotations:animated:]`. ([#5693](https://github.com/mapbox/mapbox-gl-native/pull/5693)) +* If you subclass MGLAnnotationView, your implementation of `-setSelected:animated:` is now called with the correct value in the `animated` parameter, making it possible to animate a deselection. ([#5677](https://github.com/mapbox/mapbox-gl-native/pull/5677)) +* The compass, Mapbox logo, and attribution button now accommodate the containing map view’s content insets. If your interface elements partially overlap the map view but do not affect the top and bottom layout guides, set the `automaticallyAdjustsScrollViewInsets` property to `NO` and set the `contentInset` property to a suitable value. ([#5671](https://github.com/mapbox/mapbox-gl-native/pull/5671)) ## 3.3.0 -- cgit v1.2.1 From e421180129ba6899903b9ac9e1425ab3e9251fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 5 Jul 2016 17:37:55 -0700 Subject: [ios, macos] Offline storage size API Added a property to MGLOfflineStorage that indicates the disk space occupied by all cached and offline resources. Fixes #5580. Cherry-picked from 1bc4f0e0273d6be24de56512fd52a147ea74f9e1. --- platform/ios/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'platform/ios') diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d74f99738a..f710378956 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -8,6 +8,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON * Fixed an issue preventing MGLMapView from changing its viewport when a single annotation was passed into `-[MGLMapView showAnnotations:animated:]`. ([#5693](https://github.com/mapbox/mapbox-gl-native/pull/5693)) * If you subclass MGLAnnotationView, your implementation of `-setSelected:animated:` is now called with the correct value in the `animated` parameter, making it possible to animate a deselection. ([#5677](https://github.com/mapbox/mapbox-gl-native/pull/5677)) * The compass, Mapbox logo, and attribution button now accommodate the containing map view’s content insets. If your interface elements partially overlap the map view but do not affect the top and bottom layout guides, set the `automaticallyAdjustsScrollViewInsets` property to `NO` and set the `contentInset` property to a suitable value. ([#5671](https://github.com/mapbox/mapbox-gl-native/pull/5671)) +* Added a property to MGLOfflineStorage, `countOfBytesCompleted`, that indicates the disk space occupied by all cached and offline resources. ([#5585](https://github.com/mapbox/mapbox-gl-native/pull/5585)) ## 3.3.0 -- cgit v1.2.1 From 223e3b34fc4001e0769dbf7d73dbdc1c02dddaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 19 Jul 2016 07:43:55 -0700 Subject: [ios, macos] Updated changelog --- platform/ios/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'platform/ios') diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index f710378956..795c1c95c0 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON * Fixed an issue causing overlapping polylines and polygons to be drawn in undefined z-order. Shapes are always drawn in the order they are added to the map, from the oldest on the bottom to the newest on the top. ([#5710](https://github.com/mapbox/mapbox-gl-native/pull/5710)) * Fixed an issue preventing MGLMapView from changing its viewport when a single annotation was passed into `-[MGLMapView showAnnotations:animated:]`. ([#5693](https://github.com/mapbox/mapbox-gl-native/pull/5693)) +* Fixed an issue causing polyline and polygon annotations to disappear when the zoom level is one less than the maximum zoom level. ([#5418](https://github.com/mapbox/mapbox-gl-native/pull/5418)) * If you subclass MGLAnnotationView, your implementation of `-setSelected:animated:` is now called with the correct value in the `animated` parameter, making it possible to animate a deselection. ([#5677](https://github.com/mapbox/mapbox-gl-native/pull/5677)) * The compass, Mapbox logo, and attribution button now accommodate the containing map view’s content insets. If your interface elements partially overlap the map view but do not affect the top and bottom layout guides, set the `automaticallyAdjustsScrollViewInsets` property to `NO` and set the `contentInset` property to a suitable value. ([#5671](https://github.com/mapbox/mapbox-gl-native/pull/5671)) * Added a property to MGLOfflineStorage, `countOfBytesCompleted`, that indicates the disk space occupied by all cached and offline resources. ([#5585](https://github.com/mapbox/mapbox-gl-native/pull/5585)) -- cgit v1.2.1 From 91fc58d376ff8d0de3f2408a9ab879d6188560b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 19 Jul 2016 12:08:24 -0700 Subject: [ios, macos] Updated changelogs Updated changelogs for #5723, #5554. Cherry-picked from a53dfcd675049943443def6b65cc8b654faa7a90. --- platform/ios/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'platform/ios') diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 795c1c95c0..049d165c2c 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -4,9 +4,11 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON ## 3.3.1 +* Fixed a crash that occurred when a sprite URL lacks a file extension. See [this comment](https://github.com/mapbox/mapbox-gl-native/issues/5722#issuecomment-233701251) to determine who may be affected by this bug. ([#5723](https://github.com/mapbox/mapbox-gl-native/pull/5723)) * Fixed an issue causing overlapping polylines and polygons to be drawn in undefined z-order. Shapes are always drawn in the order they are added to the map, from the oldest on the bottom to the newest on the top. ([#5710](https://github.com/mapbox/mapbox-gl-native/pull/5710)) * Fixed an issue preventing MGLMapView from changing its viewport when a single annotation was passed into `-[MGLMapView showAnnotations:animated:]`. ([#5693](https://github.com/mapbox/mapbox-gl-native/pull/5693)) * Fixed an issue causing polyline and polygon annotations to disappear when the zoom level is one less than the maximum zoom level. ([#5418](https://github.com/mapbox/mapbox-gl-native/pull/5418)) +* Fixed a crash that occurred when a style or other resource URL has a query string. ([#5554](https://github.com/mapbox/mapbox-gl-native/pull/5554)) * If you subclass MGLAnnotationView, your implementation of `-setSelected:animated:` is now called with the correct value in the `animated` parameter, making it possible to animate a deselection. ([#5677](https://github.com/mapbox/mapbox-gl-native/pull/5677)) * The compass, Mapbox logo, and attribution button now accommodate the containing map view’s content insets. If your interface elements partially overlap the map view but do not affect the top and bottom layout guides, set the `automaticallyAdjustsScrollViewInsets` property to `NO` and set the `contentInset` property to a suitable value. ([#5671](https://github.com/mapbox/mapbox-gl-native/pull/5671)) * Added a property to MGLOfflineStorage, `countOfBytesCompleted`, that indicates the disk space occupied by all cached and offline resources. ([#5585](https://github.com/mapbox/mapbox-gl-native/pull/5585)) -- cgit v1.2.1 From 59f1b2b210318e204ebb2b7423ae5c0e8790dd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 19 Jul 2016 12:28:24 -0700 Subject: ios-v3.3.1 --- platform/ios/Mapbox-iOS-SDK-symbols.podspec | 2 +- platform/ios/Mapbox-iOS-SDK.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/ios') diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index 85a42ef2b3..1597c9c7af 100644 --- a/platform/ios/Mapbox-iOS-SDK-symbols.podspec +++ b/platform/ios/Mapbox-iOS-SDK-symbols.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '3.3.0-symbols' + m.version = '3.3.1-symbols' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index a461b7e779..8990c2b36a 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '3.3.0' + m.version = '3.3.1' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' -- cgit v1.2.1