-
Notifications
You must be signed in to change notification settings - Fork 8
Location dot moves with scrolling #59
Comments
@russellquinn, can you elaborate if you're still seeing this? I can't replicate. |
Yep, still an issue for me: https://dl.dropbox.com/u/44154592/LocationDotProblem.mov |
Ah, that helps. Thanks. |
Can we reopen this one? I don't have permission. |
Whoops. |
Man, I just cannot replicate this, even in your app (latest beta). Sure you're not doing something odd in your testing? I can never get the dot to jump. |
Happens in simulator, iPhone 4S and iPad (all on iOS 5.1.1) exactly like the movie I posted above. Very weird. |
I've tried timing and not timing it with the known update intervals (about 1s) between "pulses" of the location manager. Also tried different device orientations. |
There's absolutely no magic in the gestures required to replicate it, just tracking location then panning left and right like in the video shows it every time. It you can't see it in our app beta, it must be related to something else in our setups that differs. Hmm. |
Also, can you replicate this in any of our test apps or just yours? |
I just tried it in MapBox Me and no, it doesn't happen. But, then I did some more investigation, and it seems related to annotations — if I don't add any annotations then it's fine. I also tried adding annotations, but then returning nil in layerForAnnotation, and it still happens, so it's something about adding lots of annotations via addAnnotation. (We have a couple of hundred I guess.) Note that it still happens even when browsing somewhere far away from any annotations (like, in a country without any) so I don't think it's directly related to the drawing of these annotations? |
Here's another video showing it: |
Cool, I will mock up a bunch of annotations on a loop and see what I can dig up. |
I'm working with 200 annotations and can't replicate. Are you creating layers on callback or by assigning |
Here's where I add the markers to the map. If I don't do this, it's fine. The same problem happens whether I later return something in layerForAnnotation or I just return nil.
|
Weird. Only things that jump out at me are 1. you don't need to use It must just have something to do with adding annotations, as you say. |
Well, I was storing the icon and anchor point in the annotation, then using that information in layerForAnnotation. But I tried removing it from the adding function, and still got the problem. I wonder if you're playing around with it enough to recreate the bug? I get it if I tap locate-me, then do a pretty hard swipe to the left (so the map moves right) then drag back toward the location dot in really tiny steps. |
Where is the position of the dot calculated? I could try tracing/breaking on that to see if I can find anything? |
It's updated here: https://github.com/mapbox/mapbox-ios-sdk/blob/develop/MapView/Map/RMMapView.m#L2721
|
Also worth noting: when just dragging a small amount, the blue dot drags correctly with the map, but drag over a certain distance or tap-up and it snaps back to its previous location. |
This actually gives me an idea… I change the user location-related annotations' |
Here's another video detailing when the "snap back" happens. Watch the indicated tap-down state for when it's triggered by dragging too far, or lifting the finger up: https://dl.dropbox.com/u/44154592/MoreDot.mov |
And you aren't adjusting the |
Yep, I double-checked. I'm not manipulating any annotations. |
I put in a fix here related to the idea above… explicitly updating annotation positions after adjusting user position. Curious if this helps at all. I think the effect you see might be related to the annotation never getting its geo-position updated properly, thus snapping back into place at a bad geo point. |
Okay, I'll try. Though the effect does seem like it's snapping back to the same offset from the screen edge each time? |
Just tried it, but no, it didn't work :( |
Related to this -- are you simulating a trip in the simulator, i.e. a constantly-changing user location? It doesn't look like one of the template ones but I'm curious anyway. When the map is being dragged, location doesn't update, but when released, it will jump in place. Your video almost looks like that is happening. |
I've played around with this for a while, but can't pin point it exactly. But, from breakpoints and commenting bits out, it seems as though when the location dot is moved off the screen, it constantly gets moved back to that relative point. i.e.
In summary, the location dot's position isn't updated when it's off-screen — it retains whatever co-ordinates it had, when it first disappeared. |
I still have never been able to reproduce this locally. Can you try commenting out this line to see if it helps? I think you may be right about it being a display issue, as the |
[after some offline conversation] Ok, give it a spin now and let me know what you think. |
Yes!!!! It seem like it's fixed!!! On 8 Aug 2012, at 17:58, "Justin R. Miller" [email protected] wrote:
|
Excellent. What I think was going on here was the following:
So, I made things behave better when a location isn't yet found, including not plotting user location and not allowing heading mode. Going to close this out here. |
There's some minor bad new, I did notice it still happening a few times last night. It's definitely 95% better, but I could still get in a state where the dot was redrawn at the same screen coordinates when scrolling. I haven't been able to reproduce it reliably yet, so let's leave this closed and I'll open a new one, when/if I can. |
Yeah, I'll give some more attention to this today and clean it up a bit more. If you do see it happen, see if you can pause and check out the value of |
Re-opening per @russellquinn reporting seeing it again. |
Let me know if you are still seeing this. I don't, including in your app. |
Yep, it still happens. I'll send you a new video. |
the same issue, any updates? |
Are people still seeing this in the latest |
I plan to verify this issue next week. Justin, should I use develop branch or you already merged with release? |
I'm not going to merge to release until the release is good to go, probably a couple weeks out. |
OK, i'll keep you informed |
still exists http://vimeo.com/53958076 |
steps to reproduce: |
Is this still happening in the latest |
I haven't tested any updates to develop for a while, but I'll try to in the new year. |
I'm seeing this issue when using the 1.0.2 binary framework. |
@derekmpeterson, could you possibly include a video or otherwise give some info on the situation(s) in which you are seeing this? |
@incanus @derekmpeterson - I had this issue but fixed it a at the back end of next week, I am unsure if the fixes I applied will cause fault elsewhere but im still testing and appear OK:
} The layer is correctly reapplied by the delegate but any rotation on the layer from the heading will need reapplying (didn't matter for me) |
I had exactly the same issue and @burrows111 solution works for me too. @incanus, could you check this? Thanks. |
I think this bug just came about after the last big update, but if you track location, then start scrolling (thus canceling tracking) the dot jumps to the edge of the screen, following the scroll. Scroll left and right quickly to see it.
The text was updated successfully, but these errors were encountered: