Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location tracking 'blinking' #65

Open
nilesbarnes opened this issue Jul 18, 2017 · 11 comments
Open

Location tracking 'blinking' #65

nilesbarnes opened this issue Jul 18, 2017 · 11 comments

Comments

@nilesbarnes
Copy link
Member

All icons are currently 'blinking' when location tracking is turned on.

@clhenrick
Copy link
Collaborator

Which icons specifically @nilesbarnes ?

@nilesbarnes
Copy link
Member Author

The right hand buttons for the map type, info/key, location, and then the scale in bottom left 30m and the copyright square. So essentially the the whole screen has a blink type response. I noticed this while biking in case speed of travel impacts this.

@clhenrick
Copy link
Collaborator

Okay, will attempt to reproduce. Which device (android, iphone) and type (e.g. iphone 6, 7) are you using when you notice this?

clhenrick added a commit that referenced this issue Jul 18, 2017
@clhenrick
Copy link
Collaborator

Noting that I'm unable to reproduce this bug on my iPhone 6.

I temporarily disabled the max bounds of the map area so we could test it in Oakland. Will try on the Android phone we have in the office.

@danrademacher let me know if you experience this on your device?

@nilesbarnes
Copy link
Member Author

nilesbarnes commented Jul 24, 2017

@clhenrick I am wondering if this is related to travel speed? Doesn't seem to occur when walking.

@nilesbarnes
Copy link
Member Author

nilesbarnes commented Aug 9, 2017

Just checked again and it seems to be related to speed of travel and zoom level.

@danrademacher
Copy link
Collaborator

danrademacher commented Aug 9, 2017

Confirmed locally -- I mean in Oakland. Let's do a short bit of research to see what might be involved in addressing it.

@danrademacher
Copy link
Collaborator

Confirmed again, with screen recording coming (github doesn't take mov).

But noted that the issue did not occur at this zoom:
https://ecg-map.herokuapp.com/?loc=16,37.84486,-122.25898

Setting a max zoom at 16, still useful for routing, might be a simple solution

@nilesbarnes
Copy link
Member Author

I find the ability to zoom in closer to (to 30m or so) helpful when relying on location tracking as opposed to a set destination with cues. I found the blinking to be intermittent this morning. It wasn't happening at any zoom level for me initially, but then started to occur as I fiddled with the zoom.

@clhenrick
Copy link
Collaborator

Agree that restricting the zoom isn't an optimal solution here. I suspect it's a bug with the location plug-in's author(s) but will investigate further.

@danrademacher
Copy link
Collaborator

We did a bit more R+D on the flickering map components and found that this appears to be a bug in Leaflet, our mapping library, related to tile loading.

If you quickly pan the map on your phone, even while not moving, the controls blink on and off — unless you recently viewed that part of the map, in which case the tiles are cached and don’t reload.

I can’t quite believe that we’ve never dealt with this before in the hundreds of Leaflet maps we’ve made. But I think part of the issue is that when the controls flicker as a result of user interaction — move the map — we naturally tolerate the flash. “The map is doing something, I’ll wait.” Whereas when you’re just riding along and the darned thing is flickering, it seems broken. Actually, the map is doing the same thing — “the center point moved, I need new tiles” — but because we’re not actively moving the map ourselves, it feels wrong.

Not quite sure what to do about this. We noticed that this is not happening with the very latest version of Leaflet. BUT the latest version of Leaflet is not yet compatible with Carto.js, the code we need to use Carto services. They are working on that. I presume that when the new Carto.js for new Leaflet is released and if we updated the app, the problem would go away.

But we don't know when that new Carto.js will come, and we don't know level of effort to upgrade, so it's not much help for this issue in the near term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants