summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-03-02 23:52:14 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-03-03 22:09:41 -0800
commit7e9701283f96bfcce3a56a3af4c8fe9154f02b61 (patch)
treed312cd5ed41192447313d423a640d56de45d5d6f /platform/ios
parent9ea41136345c919ba06f31a940ff7a23caabfb08 (diff)
downloadqtlocation-mapboxgl-7e9701283f96bfcce3a56a3af4c8fe9154f02b61.tar.gz
[ios, macos] Update callout when relocating annotation
When relocating a selected point annotation, update the associated callout (popover) rather than deselecting the annotation.
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/CHANGELOG.md3
-rw-r--r--platform/ios/src/MGLMapView.mm13
2 files changed, 4 insertions, 12 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 0579edf5f6..d4904e3252 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -2,7 +2,7 @@
Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started.
-## master
+## 3.5.0
### Packaging
@@ -53,6 +53,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
### Other changes
* Fixed an issue that, among other things, caused various islands to disappear at certain zoom levels. ([#7621](https://github.com/mapbox/mapbox-gl-native/pull/7621))
+* Changing the coordinates of a point annotation no longer deselects the annotation. ([#8269](https://github.com/mapbox/mapbox-gl-native/pull/8269))
* Fixed an issue where translucent, non-view-backed point annotations along tile boundaries would be drawn darker than expected. ([#6832](https://github.com/mapbox/mapbox-gl-native/pull/6832))
* Fixed flickering that occurred when panning past the antimeridian. ([#7574](https://github.com/mapbox/mapbox-gl-native/pull/7574))
* Fixed an issue that sometimes caused crashes when the SDK interacted with the file system in the background. ([#8125](https://github.com/mapbox/mapbox-gl-native/pull/8125))
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 401055341d..28050a879c 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1986,10 +1986,7 @@ public:
// Update the annotation’s backing geometry to match the annotation model object. Any associated annotation view is also moved by side effect. However, -updateAnnotationViews disables the view’s animation actions, because it can’t distinguish between moves due to the viewport changing and moves due to the annotation’s coordinate changing.
_mbglMap->updateAnnotation(annotationTag, mbgl::SymbolAnnotation { point, symbolName.UTF8String });
- if (annotationTag == _selectedAnnotationTag)
- {
- [self deselectAnnotation:annotation animated:YES];
- }
+ [self updateCalloutView];
}
}
else if ([keyPath isEqualToString:@"coordinates"] && [object isKindOfClass:[MGLMultiPoint class]])
@@ -2006,13 +2003,7 @@ public:
{
// Update the annotation’s backing geometry to match the annotation model object.
_mbglMap->updateAnnotation(annotationTag, [annotation annotationObjectWithDelegate:self]);
-
- // We don't current support shape multipoint annotation selection, but let's make sure
- // deselection is handled just to avoid problems in the future.
- if (annotationTag == _selectedAnnotationTag)
- {
- [self deselectAnnotation:annotation animated:YES];
- }
+ [self updateCalloutView];
}
}
}