-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Polyline and markers drawn underneath road in Streets style #3037
Comments
Interesting! /cc @jfirebaugh |
Looks like this bug can happen when annotations are added before the style finishes loading. In that scenario, it's possible for the annotation layers to get added first, and then when the style JSON loads, the style layers get appended. |
@jfirebaugh that seems likely in this situation. Is it possible to serve the style JSON locally to reduce the likelihood of this? |
Loading styles locally is broken (#3050) at the moment. |
I have been rolling back commit after commit to find the one that caused this issue, and I found a candidate: f9ebe54 @jfirebaugh |
This happens also when adding annotations after loading the map. |
@jfirebaugh I've updated to latest and still get this issue, but much less now. I have re-place an annotation by long-press on the map. The annotation is sometimes visible and sometimes not. And again rolling back to older commits before f9ebe54 then this works. |
Yeah, I also managed to get an invisible annotation that became visible when I removed and readded it. On Thu, 19 Nov 2015, at 14:11, Zakay wrote:
|
To reproduce modify handleLongPress on the demo app to remove other annotations. It's tiresome but sometimes it happens a lot and sometimes you need to give in some time. This issue is the only blocking issue we have left before releasing a major version of our app, and really look forward to have this fixed. Rolling back is no option as latest commits also have fixed serious crashing issues we've had. - (void)handleLongPress:(UILongPressGestureRecognizer *)longPress
{
if (longPress.state == UIGestureRecognizerStateBegan)
{
MGLPointAnnotation *point = [MGLPointAnnotation new];
point.coordinate = [self.mapView convertPoint:[longPress locationInView:longPress.view]
toCoordinateFromView:self.mapView];
point.title = @"Dropped Marker";
point.subtitle = [NSString stringWithFormat:@"lat: %.3f, lon: %.3f", point.coordinate.latitude, point.coordinate.longitude];
[self.mapView removeAnnotations:self.mapView.annotations];
[self.mapView addAnnotation:point];
[self.mapView selectAnnotation:point animated:YES];
}
} |
The previous fix resulted in annotations sometimes never being added. This would happen if, during the execution of MapContext::update where Update::Annotations was set, the style itself was loaded but some of its subresources (sprite or sources) were not. #3082 is a follow up issue to make MapContext::update less error-prone.
The previous fix resulted in annotations sometimes never being added. This would happen if, during the execution of MapContext::update where Update::Annotations was set, the style itself was loaded but some of its subresources (sprite or sources) were not. #3082 is a follow up issue to make MapContext::update less error-prone.
@jfirebaugh This seems to fix the case I mentioned in above post (re-adding an annotation when tile layer is fully loaded). But can happen still when tile layer hasn't yet loaded fully. I have a test case, where I switch tile layer, and remove and re-add annotations. These annotations are now hidden and were not before. (Its not related to this issue #1488, as I have a patch locally to re-add sprites to the spritestore when they are missing as an dirty fix until #1488 is fixed) |
@Zakay, the original issue here is fixed. Can you please file a new issue, and include your test case? |
@jfirebaugh just got it working with removing and re-adding them with our own local patch. We of course look forwards remove our own patch when #1488 is fixed. Thanks for your solving this issue so quickly! Going to submit to Apple today, major release! |
I've just built CityCyclist against c35f18f, and I managed to get it into a situation, shortly after launch, where the route polyline and marker were drawn underneath the roads, but above the background colour. I quit and restarted and the issue went away, and I can't reproduce it again.
The text was updated successfully, but these errors were encountered: