-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Annotating Null Island also annotates its antipode #3563
Conversation
If you really must draw an annotation at null island, here’s a relatively silly but effective work around: - (MGLPointAnnotation *)validateCoordinateForAnnotation:(MGLPointAnnotation *)annotation {
if (annotation.coordinate.latitude == 0 && annotation.coordinate.longitude == 0) {
annotation.coordinate = CLLocationCoordinate2DMake(0.0000001, 0.0000001);
}
return annotation;
} |
This happens because the symbol annotation geographic coordinate intersects with all four surrounding tiles, causing them all to call for |
@brunoabinader, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jfirebaugh, @boundsj and @1ec5 to be potential reviewers. |
Please avoid commandeering an issue opened by someone else by converting it into a PR. The resulting page is confusing for anyone who hasn’t been following the conversation, moreso if for whatever reason the PR gets rejected. |
Apologies @1ec5 - this was part of a PR creation batch and I should've paid more attention to this not being a recently created issue of mine. |
You are correct @jfirebaugh - we were actually doing the wrong coordinate system conversions in Going from
For 2), we require #6626 - thus I'm rebasing this PR against that. We can either merge #6626 first and rebase this against that or just review and merge this and close #6626, I'm fine with either option. |
411050b
to
c5b69ae
Compare
Fixes #5419. |
c5b69ae
to
156862d
Compare
Because geometry tile features are now properly duplicated when they intersect with other tile edges, |
a3c3f78
to
cbd5a0a
Compare
Filtering out duplicated annotations affects the results of some query render tests e.g. |
6d95157
to
197ed67
Compare
i've had an insightful talk with @kkaefer about the possibility to get rid of stencil clipping for symbols. In sum, these are the options we have so far: Option 1: Get rid of stencil clipping for symbols
Option 2: Always clip symbol buckets
|
Pinging @jfirebaugh for evaluating the options. |
Pretty sure that for now we want to go with Option 2: Always clip symbol buckets. Getting rid of stencil clipping for symbols is a good long-term goal but there are a number of tricky issues that we will need to solve for that to be viable, and we should fix this bug in the meantime. |
One way of fixing the clipped features close to tile edges is increasing the bounds when querying for renderable features within tile bounds - downside is that we'll eventually insert features to render tiles that won't be visible at all due to stencil clipping. |
b4c7829
to
dc81a13
Compare
Per conversion with @jfirebaugh, I've decided to split the fixes previously contained in this PR in separate ones:
The commit left for review on this PR fixes the immediate cause for the issue initially mentioned on this issue (now PR). In order to fix rendering of opaque symbols near tile edges, I'm moving this discussion to a new issue: #6670 |
acf18ce
to
36cc9ab
Compare
36cc9ab
to
11c67d7
Compare
This introduces a Can we instead write a method such as |
11c67d7
to
0cc48e9
Compare
Totally @jfirebaugh - this actually ended up in moving |
@@ -149,11 +149,11 @@ std::vector<UnwrappedTileID> tileCover(const LatLngBounds& bounds_, int32_t z) { | |||
|
|||
const TransformState state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused.
0cc48e9
to
6c7b8db
Compare
This would be nice to get on the new release-ios-v3.4.0 branch before it diverges. |
If I add an annotation at the coordinates 0°, 0°, an annotation also appears at the coordinates 0°, 180°, but only at z1.