Repository navigation
Conversation
…Adds partial test.
| BOOL _needsDisplayRefresh; | ||
|
|
||
| NSUInteger _changeDelimiterSuppressionDepth; | ||
| NSInteger _changeDelimiterSuppressionDepth; |
There was a problem hiding this comment.
This was changed to NSInteger since there's an assert later in the code that checks for >= 0.
1ec5
left a comment
There was a problem hiding this comment.
We’ll need a blurb in the iOS and macOS changelogs, since this could be a fairly significant change in behavior for some developers.
Note that if #3249 gets pushed from the v4.0.0 milestone for any reason, we should back out this change, because the current behavior is easier to justify than what we’d get with only this PR and not #3249.
| { | ||
| [self selectAnnotation:firstAnnotation animated:NO]; | ||
| } | ||
| [self selectAnnotation:firstAnnotation animated:NO]; |
There was a problem hiding this comment.
Would you mind making the corresponding change to the macOS implementation of MGLMapView? Thanks!
| { | ||
| [self selectAnnotation:firstAnnotation animated:NO]; | ||
| } | ||
| [self selectAnnotation:firstAnnotation animated:NO]; |
There was a problem hiding this comment.
Also, this documentation needs to be updated:
mapbox-gl-native/platform/ios/src/MGLMapView.h
Lines 1171 to 1172 in 9fa2749
|
|
||
| - (void)selectAnOffscreenAnnotation { | ||
| id<MGLAnnotation> annotation = [self randomOffscreenAnnotation]; | ||
| [self.mapView selectAnnotation:annotation animated:NO]; |
There was a problem hiding this comment.
According to the -[MKMapView selectAnnotation:animated:] documentation, MapKit’s special case is because an offscreen annotation would have no backing view:
If the specified annotation is not onscreen, and therefore does not have an associated annotation view, this method has no effect.
I think this SDK’s view-backed annotations will get selected just fine when off-screen, but I’m not sure what’ll happen once we implement #3249. This gives me pause: we should make sure #3249 is at least feasible for view-backed annotations before committing to the behavior here.
There was a problem hiding this comment.
I agree, I think it's worth waiting for #3249 before accepting these changes. I'll re-add the do not merge tag.
|
I think it's worth keeping #3249 separate from this change, but agree that they should be treated as a pair. |
|
Can we put this into a patch release before 4.0.0? |
|
@lilykaiser as a feature that will be a "fairly significant change in behavior for some developers”, this doesn’t seem appropriate for a patch release. |
|
@lilykaiser @friedbunny How about a 3.8.0, if this needs to land before 4.0.0? |
I think changing how the selected annotation moves (and the behaviour of the animated parameter) should be handled by #3249.