From d303980e75d85ac88c382cac54c55cc7ee74534e Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Thu, 14 Jul 2016 19:50:41 -0400 Subject: [PATCH 01/14] [ios] Pass `animated` property when deselecting annotation views (#5677) --- platform/ios/src/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index ffd6fcbbb..cb192d361 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 From 09221ecf1a6f85b73a501b3ae90869dd5a4b033a Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Thu, 14 Jul 2016 14:14:57 -0400 Subject: [PATCH 02/14] [core] Guard against camera's `minScale` being NaN Fixes a bug where calculating the padded bounds for a single point would cause division by zero, resulting in NaN for `minScale`. This invalid `minScale` would then be used to create an invalid padded `centerPixel`. --- src/mbgl/map/map.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index b08d3ef71..24c39fe24 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -503,13 +503,16 @@ CameraOptions Map::cameraForLatLngs(const std::vector& latLngs, optional double height = nePixel.y - swPixel.y; // Calculate the zoom level. - double scaleX = getWidth() / width; - double scaleY = getHeight() / height; - if (padding && *padding) { - scaleX -= (padding->left + padding->right) / width; - scaleY -= (padding->top + padding->bottom) / height; + double minScale = INFINITY; + if (width > 0 || height > 0) { + double scaleX = getWidth() / width; + double scaleY = getHeight() / height; + if (padding && *padding) { + scaleX -= (padding->left + padding->right) / width; + scaleY -= (padding->top + padding->bottom) / height; + } + minScale = util::min(scaleX, scaleY); } - double minScale = ::fmin(scaleX, scaleY); double zoom = util::log2(getScale() * minScale); zoom = util::clamp(zoom, getMinZoom(), getMaxZoom()); 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: [PATCH 03/14] [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(-) diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 6158a9a3d..789ee0037 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 1190070d8..7d8b2c304 100644 --- a/platform/ios/app/Main.storyboard +++ b/platform/ios/app/Main.storyboard @@ -79,7 +79,7 @@ - + From ede1e713d8b66be713d96141653b83078443cbea Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Mon, 18 Jul 2016 14:04:14 -0700 Subject: [PATCH 04/14] [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(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index cb192d361..4d692fa71 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. 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: [PATCH 05/14] [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 ++++ platform/macos/CHANGELOG.md | 1 + src/mbgl/annotation/annotation_manager.hpp | 6 ++++-- test/api/annotations.cpp | 15 +++++++++++++++ .../overlapping_fill_annotation/expected.png | Bin 0 -> 1538 bytes 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/annotations/overlapping_fill_annotation/expected.png diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 6c08b357a..d8aa66409 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 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index cc2b3b8d4..a92e9f765 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog for Mapbox macOS SDK ## 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)) * Replaced the wireframe debug mask with an overdraw visualization debug mask to match Mapbox GL JS’s overdraw inspector. ([#5403](https://github.com/mapbox/mapbox-gl-native/pull/5403)) * Improved the design of the generated API documentation. ([#5306](https://github.com/mapbox/mapbox-gl-native/pull/5306)) diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index 73907e10c..7e0cf3a39 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -58,8 +58,10 @@ private: AnnotationID nextID = 0; using SymbolAnnotationTree = boost::geometry::index::rtree, boost::geometry::index::rstar<16, 4>>; - using SymbolAnnotationMap = std::unordered_map>; - using ShapeAnnotationMap = std::unordered_map>; + // Unlike std::unordered_map, std::map is guaranteed to sort by AnnotationID, ensuring that older annotations are below newer annotations. + // + using SymbolAnnotationMap = std::map>; + using ShapeAnnotationMap = std::map>; SymbolAnnotationTree symbolTree; SymbolAnnotationMap symbolAnnotations; diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp index 60d7db6ba..552a386f9 100644 --- a/test/api/annotations.cpp +++ b/test/api/annotations.cpp @@ -68,6 +68,21 @@ TEST(Annotations, FillAnnotation) { test.checkRendering("fill_annotation"); } +TEST(Annotations, OverlappingFillAnnotation) { + AnnotationTest test; + + Polygon polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + FillAnnotation underlaidAnnotation { polygon }; + underlaidAnnotation.color = { { 0, 255, 0, 1 } }; + FillAnnotation overlaidAnnotation { polygon }; + overlaidAnnotation.color = { { 255, 0, 0, 1 } }; + + test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json")); + test.map.addAnnotation(underlaidAnnotation); + test.map.addAnnotation(overlaidAnnotation); + test.checkRendering("overlapping_fill_annotation"); +} + TEST(Annotations, StyleSourcedShapeAnnotation) { AnnotationTest test; diff --git a/test/fixtures/annotations/overlapping_fill_annotation/expected.png b/test/fixtures/annotations/overlapping_fill_annotation/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..09f48081a8088406f3a482b6fea2238fcdda653b GIT binary patch literal 1538 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=FJ$JY5_^ zDj45hIhcFcLB#oBsg;lWD-G3Cs}$VrndF$QCeQ1CYFWp^A)w&Uz`)2ff*3`O;rARG zLmt>YH`f(tx95MLzfNJEgYpNPf3JVO)BnHDtzP+S`rPSsbKr#H6@>r}i3X=wwMIckW`iOQ(^2gs zCg}Eb1zopr08#EN#{d8T literal 0 HcmV?d00001 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: [PATCH 06/14] [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(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d8aa66409..d74f99738 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 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: [PATCH 07/14] [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/darwin/src/MGLOfflineStorage.h | 8 ++++++++ platform/darwin/src/MGLOfflineStorage.mm | 13 +++++++++++++ platform/darwin/test/MGLOfflineStorageTests.m | 4 ++++ platform/ios/CHANGELOG.md | 1 + platform/macos/CHANGELOG.md | 2 ++ 5 files changed, 28 insertions(+) diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h index 20cc521f2..211135f84 100644 --- a/platform/darwin/src/MGLOfflineStorage.h +++ b/platform/darwin/src/MGLOfflineStorage.h @@ -217,6 +217,14 @@ typedef void (^MGLOfflinePackRemovalCompletionHandler)(NSError * _Nullable error */ - (void)setMaximumAllowedMapboxTiles:(uint64_t)maximumCount; +/** + The cumulative size, measured in bytes, of all downloaded resources on disk. + + The returned value includes all resources, including tiles, whether downloaded + as part of an offline pack or due to caching during normal use of `MGLMapView`. + */ +@property (nonatomic, readonly) unsigned long long countOfBytesCompleted; + @end NS_ASSUME_NONNULL_END diff --git a/platform/darwin/src/MGLOfflineStorage.mm b/platform/darwin/src/MGLOfflineStorage.mm index dd15920ea..dab870ea3 100644 --- a/platform/darwin/src/MGLOfflineStorage.mm +++ b/platform/darwin/src/MGLOfflineStorage.mm @@ -275,6 +275,19 @@ NSString * const MGLOfflinePackMaximumCountUserInfoKey = @"MaximumCount"; _mbglFileSource->setOfflineMapboxTileCountLimit(maximumCount); } +#pragma mark - + +- (unsigned long long)countOfBytesCompleted { + NSURL *cacheURL = [[self class] cacheURLIncludingSubdirectory:YES]; + NSString *cachePath = cacheURL.path; + if (!cachePath) { + return 0; + } + + NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:cachePath error:NULL]; + return attributes.fileSize; +} + #pragma mark MGLOfflinePackDelegate methods - (void)offlinePack:(MGLOfflinePack *)pack progressDidChange:(__unused MGLOfflinePackProgress)progress { diff --git a/platform/darwin/test/MGLOfflineStorageTests.m b/platform/darwin/test/MGLOfflineStorageTests.m index e2346c5f6..e44bd06e3 100644 --- a/platform/darwin/test/MGLOfflineStorageTests.m +++ b/platform/darwin/test/MGLOfflineStorageTests.m @@ -144,4 +144,8 @@ XCTAssertEqual([MGLOfflineStorage sharedOfflineStorage].packs.count, countOfPacks - 1, @"Removed pack should have been removed from the canonical collection of packs owned by the shared offline storage object. This assertion can fail if this test is run before -testAAALoadPacks or -testAddPack."); } +- (void)testCountOfBytesCompleted { + XCTAssertGreaterThan([MGLOfflineStorage sharedOfflineStorage].countOfBytesCompleted, 0); +} + @end diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index d74f99738..f71037895 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 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index a92e9f765..db23be755 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -1,7 +1,9 @@ # Changelog for Mapbox macOS SDK ## 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)) +* 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)) * Replaced the wireframe debug mask with an overdraw visualization debug mask to match Mapbox GL JS’s overdraw inspector. ([#5403](https://github.com/mapbox/mapbox-gl-native/pull/5403)) * Improved the design of the generated API documentation. ([#5306](https://github.com/mapbox/mapbox-gl-native/pull/5306)) From 2a0e2961992be22aa0cc4c394a00ef09b0fe3d71 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 19 Jul 2016 15:11:46 +0300 Subject: [PATCH 08/14] [core] Set annotation tileset max zoom to 18 --- src/mbgl/annotation/annotation_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index e33285035..9a4f0a21c 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -107,7 +107,9 @@ std::unique_ptr AnnotationManager::getTile(const CanonicalTileID void AnnotationManager::updateStyle(Style& style) { // Create annotation source, point layer, and point bucket if (!style.getSource(SourceID)) { - std::unique_ptr source = std::make_unique(SourceType::Annotations, SourceID, "", util::tileSize, std::make_unique(), nullptr); + auto tileset = std::make_unique(); + tileset->maxZoom = 18; + std::unique_ptr source = std::make_unique(SourceType::Annotations, SourceID, "", util::tileSize, std::move(tileset), nullptr); source->enabled = true; style.addSource(std::move(source)); 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: [PATCH 09/14] [ios, macos] Updated changelog --- platform/ios/CHANGELOG.md | 1 + platform/macos/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index f71037895..795c1c95c 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)) diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index db23be755..a5c0acc3a 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -3,6 +3,7 @@ ## 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)) +* 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)) * 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)) * Replaced the wireframe debug mask with an overdraw visualization debug mask to match Mapbox GL JS’s overdraw inspector. ([#5403](https://github.com/mapbox/mapbox-gl-native/pull/5403)) * Improved the design of the generated API documentation. ([#5306](https://github.com/mapbox/mapbox-gl-native/pull/5306)) From 12b431ee03b09643643be88da439283d873a6694 Mon Sep 17 00:00:00 2001 From: jingsam Date: Mon, 4 Jul 2016 15:26:28 +0800 Subject: [PATCH 10/14] mapbox: URL containing query string causes infinite loop (#5554) * correct all EXPECT_EQ(actual, expected) to EXPECT_EQ(expected, actual) * fix getMapboxURLPathname() of URL with querystring * add test for normalizeSourceURL of non-mapbox protocal * Update mapbox.cpp Cherry-picked from e82ecc60acfeb95ec4804ecb0964a2d695416ea1. --- src/mbgl/util/mapbox.cpp | 11 +++---- test/util/mapbox.cpp | 65 +++++++++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index 41959563f..97c28c0ae 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -20,13 +20,14 @@ bool isMapboxURL(const std::string& url) { std::vector getMapboxURLPathname(const std::string& url) { std::vector pathname; std::size_t startIndex = protocol.length(); - while (startIndex < url.length()) { + std::size_t end = url.find_first_of("?#"); + if (end == std::string::npos) { + end = url.length(); + } + while (startIndex < end) { std::size_t endIndex = url.find("/", startIndex); if (endIndex == std::string::npos) { - endIndex = url.find_first_of("?#"); - } - if (endIndex == std::string::npos) { - endIndex = url.length(); + endIndex = end; } pathname.push_back(url.substr(startIndex, endIndex - startIndex)); startIndex = endIndex + 1; diff --git a/test/util/mapbox.cpp b/test/util/mapbox.cpp index e5da25991..7f9e7ef59 100644 --- a/test/util/mapbox.cpp +++ b/test/util/mapbox.cpp @@ -7,34 +7,65 @@ using namespace mbgl; -// TODO: correct all EXPECT_EQ(actual, expected) to EXPECT_EQ(expected, actual) TEST(Mapbox, SourceURL) { - EXPECT_EQ(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "key"), "https://api.mapbox.com/v4/user.map.json?access_token=key&secure"); - EXPECT_EQ(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "token"), "https://api.mapbox.com/v4/user.map.json?access_token=token&secure"); - EXPECT_THROW(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", ""), std::runtime_error); + EXPECT_EQ( + "https://api.mapbox.com/v4/user.map.json?access_token=key&secure", + mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "key")); + EXPECT_EQ( + "http://path", + mbgl::util::mapbox::normalizeSourceURL("http://path", "key")); + EXPECT_THROW( + mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", ""), + std::runtime_error); } TEST(Mapbox, GlyphsURL) { - EXPECT_EQ(mbgl::util::mapbox::normalizeGlyphsURL("mapbox://fonts/boxmap/Comic%20Sans/0-255.pbf", "key"), "https://api.mapbox.com/fonts/v1/boxmap/Comic%20Sans/0-255.pbf?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeGlyphsURL("mapbox://fonts/boxmap/{fontstack}/{range}.pbf", "key"), "https://api.mapbox.com/fonts/v1/boxmap/{fontstack}/{range}.pbf?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeGlyphsURL("http://path", "key"), "http://path"); - EXPECT_EQ(mbgl::util::mapbox::normalizeGlyphsURL("mapbox://path", "key"), "mapbox://path"); + EXPECT_EQ( + "https://api.mapbox.com/fonts/v1/boxmap/Comic%20Sans/0-255.pbf?access_token=key", + mbgl::util::mapbox::normalizeGlyphsURL("mapbox://fonts/boxmap/Comic%20Sans/0-255.pbf", "key")); + EXPECT_EQ( + "https://api.mapbox.com/fonts/v1/boxmap/{fontstack}/{range}.pbf?access_token=key", + mbgl::util::mapbox::normalizeGlyphsURL("mapbox://fonts/boxmap/{fontstack}/{range}.pbf", "key")); + EXPECT_EQ( + "http://path", + mbgl::util::mapbox::normalizeGlyphsURL("http://path", "key")); + EXPECT_EQ( + "mapbox://path", + mbgl::util::mapbox::normalizeGlyphsURL("mapbox://path", "key")); } TEST(Mapbox, StyleURL) { - EXPECT_EQ(mbgl::util::mapbox::normalizeStyleURL("mapbox://foo", "key"), "mapbox://foo"); - EXPECT_EQ(mbgl::util::mapbox::normalizeStyleURL("mapbox://styles/user/style", "key"), "https://api.mapbox.com/styles/v1/user/style?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeStyleURL("mapbox://styles/user/style/draft", "key"), "https://api.mapbox.com/styles/v1/user/style/draft?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeStyleURL("http://path", "key"), "http://path"); + EXPECT_EQ( + "mapbox://foo", + mbgl::util::mapbox::normalizeStyleURL("mapbox://foo", "key")); + EXPECT_EQ( + "https://api.mapbox.com/styles/v1/user/style?access_token=key", + mbgl::util::mapbox::normalizeStyleURL("mapbox://styles/user/style", "key")); + EXPECT_EQ( + "https://api.mapbox.com/styles/v1/user/style/draft?access_token=key", + mbgl::util::mapbox::normalizeStyleURL("mapbox://styles/user/style/draft", "key")); + EXPECT_EQ( + "http://path", + mbgl::util::mapbox::normalizeStyleURL("http://path", "key")); } TEST(Mapbox, SpriteURL) { - EXPECT_EQ(mbgl::util::mapbox::normalizeSpriteURL("map/box/sprites@2x.json", "key"), "map/box/sprites@2x.json"); - EXPECT_EQ(mbgl::util::mapbox::normalizeSpriteURL("mapbox://foo", "key"), "mapbox://foo"); - EXPECT_EQ(mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8.json", "key"), "https://api.mapbox.com/styles/v1/mapbox/streets-v8/sprite.json?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8@2x.png", "key"), "https://api.mapbox.com/styles/v1/mapbox/streets-v8/sprite@2x.png?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8/draft@2x.png", "key"), "https://api.mapbox.com/styles/v1/mapbox/streets-v8/draft/sprite@2x.png?access_token=key"); + EXPECT_EQ( + "map/box/sprites@2x.json", + mbgl::util::mapbox::normalizeSpriteURL("map/box/sprites@2x.json", "key")); + EXPECT_EQ( + "mapbox://foo", + mbgl::util::mapbox::normalizeSpriteURL("mapbox://foo", "key")); + EXPECT_EQ( + "https://api.mapbox.com/styles/v1/mapbox/streets-v8/sprite.json?access_token=key", + mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8.json", "key")); + EXPECT_EQ( + "https://api.mapbox.com/styles/v1/mapbox/streets-v8/sprite@2x.png?access_token=key", + mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8@2x.png", "key")); + EXPECT_EQ( + "https://api.mapbox.com/styles/v1/mapbox/streets-v8/draft/sprite@2x.png?access_token=key", + mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8/draft@2x.png", "key")); } TEST(Mapbox, TileURL) { From d640c2215f7dc47f4d55d2c0c1da867849761e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 19 Jul 2016 16:01:24 +0200 Subject: [PATCH 11/14] [core] add check for missing sprite URL file extension Cherry-picked from 559f3a654b976d41d0f3db3fa958ebcda3e97b1c. --- src/mbgl/util/mapbox.cpp | 8 ++++++++ test/util/mapbox.cpp | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index 97c28c0ae..28dedaf25 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -83,10 +83,18 @@ std::string normalizeSpriteURL(const std::string& url, const std::string& access std::string id, extension; if (isDraft) { size_t index = pathname[3].find_first_of("@."); + if (index == std::string::npos) { + Log::Error(Event::ParseStyle, "Invalid sprite URL"); + return url; + } id = pathname[2]; extension = pathname[3].substr(index); } else { size_t index = pathname[2].find_first_of("@."); + if (index == std::string::npos) { + Log::Error(Event::ParseStyle, "Invalid sprite URL"); + return url; + } id = pathname[2].substr(0, index); extension = pathname[2].substr(index); } diff --git a/test/util/mapbox.cpp b/test/util/mapbox.cpp index 7f9e7ef59..35c478287 100644 --- a/test/util/mapbox.cpp +++ b/test/util/mapbox.cpp @@ -66,6 +66,12 @@ TEST(Mapbox, SpriteURL) { EXPECT_EQ( "https://api.mapbox.com/styles/v1/mapbox/streets-v8/draft/sprite@2x.png?access_token=key", mbgl::util::mapbox::normalizeSpriteURL("mapbox://sprites/mapbox/streets-v8/draft@2x.png", "key")); + EXPECT_EQ( + "mapbox://sprites/mapbox/streets-v9?fresh=true.png", + mbgl::util::mapbox::normalizeSpriteURL( + "mapbox://sprites/mapbox/streets-v9?fresh=true.png", + "key")); + EXPECT_EQ("mapbox://////", mbgl::util::mapbox::normalizeSpriteURL("mapbox://////", "key")); } TEST(Mapbox, TileURL) { From c261d0b2a8ca2b1311e55eeae628d9a169ae31c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 19 Jul 2016 16:03:28 +0200 Subject: [PATCH 12/14] [core] use more const, auto and refs Cherry-picked from 40ea4247d81eccc1d48af56fe1da95438bbdefcc. --- src/mbgl/util/mapbox.cpp | 71 +++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index 28dedaf25..b60c04a3e 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -19,13 +19,13 @@ bool isMapboxURL(const std::string& url) { std::vector getMapboxURLPathname(const std::string& url) { std::vector pathname; - std::size_t startIndex = protocol.length(); - std::size_t end = url.find_first_of("?#"); + auto startIndex = protocol.length(); + auto end = url.find_first_of("?#"); if (end == std::string::npos) { end = url.length(); } while (startIndex < end) { - std::size_t endIndex = url.find("/", startIndex); + auto endIndex = url.find("/", startIndex); if (endIndex == std::string::npos) { endIndex = end; } @@ -52,16 +52,15 @@ std::string normalizeStyleURL(const std::string& url, const std::string& accessT return url; } - std::vector pathname = getMapboxURLPathname(url); - + const auto pathname = getMapboxURLPathname(url); if (pathname.size() < 3) { Log::Error(Event::ParseStyle, "Invalid style URL"); return url; } - std::string user = pathname[1]; - std::string id = pathname[2]; - bool isDraft = pathname.size() > 3; + const auto& user = pathname[1]; + const auto& id = pathname[2]; + const bool isDraft = pathname.size() > 3; return baseURL + "styles/v1/" + user + "/" + id + (isDraft ? "/draft" : "") + "?access_token=" + accessToken; } @@ -70,36 +69,33 @@ std::string normalizeSpriteURL(const std::string& url, const std::string& access return url; } - std::vector pathname = getMapboxURLPathname(url); - + const auto pathname = getMapboxURLPathname(url); if (pathname.size() < 3) { Log::Error(Event::ParseStyle, "Invalid sprite URL"); return url; } - std::string user = pathname[1]; - bool isDraft = pathname.size() > 3; + const auto& user = pathname[1]; + const bool isDraft = pathname.size() > 3; - std::string id, extension; - if (isDraft) { - size_t index = pathname[3].find_first_of("@."); - if (index == std::string::npos) { - Log::Error(Event::ParseStyle, "Invalid sprite URL"); - return url; - } - id = pathname[2]; - extension = pathname[3].substr(index); - } else { - size_t index = pathname[2].find_first_of("@."); - if (index == std::string::npos) { - Log::Error(Event::ParseStyle, "Invalid sprite URL"); - return url; - } - id = pathname[2].substr(0, index); - extension = pathname[2].substr(index); + const auto& name = isDraft ? pathname[3] : pathname[2]; + const size_t index = name.find_first_of("@."); + if (index == std::string::npos) { + Log::Error(Event::ParseStyle, "Invalid sprite URL"); + return url; } + const auto& extension = name.substr(index); - return baseURL + "styles/v1/" + user + "/" + id + "/" + (isDraft ? "draft/" : "") + "sprite" + extension + "?access_token=" + accessToken; + if (isDraft) { + const auto& id = pathname[2]; + return baseURL + "styles/v1/" + user + "/" + id + "/draft/sprite" + extension + + "?access_token=" + accessToken; + + } else { + const auto& id = pathname[2].substr(0, index); + return baseURL + "styles/v1/" + user + "/" + id + "/sprite" + extension + "?access_token=" + + accessToken; + } } std::string normalizeGlyphsURL(const std::string& url, const std::string& accessToken) { @@ -107,16 +103,15 @@ std::string normalizeGlyphsURL(const std::string& url, const std::string& access return url; } - std::vector pathname = getMapboxURLPathname(url); - + const auto pathname = getMapboxURLPathname(url); if (pathname.size() < 4) { Log::Error(Event::ParseStyle, "Invalid glyph URL"); return url; } - std::string user = pathname[1]; - std::string fontstack = pathname[2]; - std::string range = pathname[3]; + const auto& user = pathname[1]; + const auto& fontstack = pathname[2]; + const auto& range = pathname[3]; return baseURL + "fonts/v1/" + user + "/" + fontstack + "/" + range + "?access_token=" + accessToken; } @@ -137,7 +132,7 @@ std::string canonicalizeTileURL(const std::string& url, SourceType type, uint16_ tilesetStartIdx += sizeof("/v4/") - 1; - auto tilesetEndIdx = url.find("/", tilesetStartIdx); + const auto tilesetEndIdx = url.find("/", tilesetStartIdx); if (tilesetEndIdx == std::string::npos) { return url; } @@ -154,12 +149,12 @@ std::string canonicalizeTileURL(const std::string& url, SourceType type, uint16_ basenameIdx += 1; } - auto extensionIdx = url.find(".", basenameIdx); + const auto extensionIdx = url.find(".", basenameIdx); if (extensionIdx == std::string::npos || extensionIdx == queryIdx - 1) { return url; } - auto tileset = url.substr(tilesetStartIdx, tilesetEndIdx - tilesetStartIdx); + const auto tileset = url.substr(tilesetStartIdx, tilesetEndIdx - tilesetStartIdx); auto extension = url.substr(extensionIdx + 1, queryIdx - extensionIdx - 1); #if !defined(__ANDROID__) && !defined(__APPLE__) && !defined(QT_IMAGE_DECODERS) 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: [PATCH 13/14] [ios, macos] Updated changelogs Updated changelogs for #5723, #5554. Cherry-picked from a53dfcd675049943443def6b65cc8b654faa7a90. --- platform/ios/CHANGELOG.md | 2 ++ platform/macos/CHANGELOG.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 795c1c95c..049d165c2 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)) diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index a5c0acc3a..e09f1e5b5 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -2,9 +2,11 @@ ## master +* 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 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)) * 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)) +* 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)) * Replaced the wireframe debug mask with an overdraw visualization debug mask to match Mapbox GL JS’s overdraw inspector. ([#5403](https://github.com/mapbox/mapbox-gl-native/pull/5403)) * Improved the design of the generated API documentation. ([#5306](https://github.com/mapbox/mapbox-gl-native/pull/5306)) 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: [PATCH 14/14] 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(-) diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index 85a42ef2b..1597c9c7a 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 a461b7e77..8990c2b36 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.'