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

Use Mapillary vector tiles for images, sequences and map features #8367

Closed
wants to merge 7 commits into from

Conversation

nickplesha
Copy link
Contributor

Hello, this PR updates the Mapillary integration and now it uses our vector tiles as the data source for images, sequences and map features (traffic signs and points).

With this change the loading of Mapillary data should be much faster (you should observe an improvement in loading speed of 1000%+ in very densely mapped areas).

Changes

  • Switched to using vector tiles instead of the Mapillary API
  • Updated the data and cache structure to match new data source
  • Fixed a bug with clicking on a Mapillary image marker
  • Updated how Mapillay JS is initialized (version 3.0.0 introduced some breaking changes)
  • Removed user filter for Mapillary images (vector tiles don't have usernames right now)
  • Cleaned up the code and used a bit more modern JS where possible

You can test a preview of the changes here: https://id-mapillary-tiles.netlify.app/

Let me know if you have any question or suggestions.
Thanks!

@nickplesha
Copy link
Contributor Author

nickplesha commented Feb 25, 2021

BTW, this also reduces the amount of data transferred by up to 50% while still showing more Mapillary data than before which will provide a better experience for users with slower internet connections.

@1ec5
Copy link
Collaborator

1ec5 commented Feb 26, 2021

This sounds fantastic! Comparing this branch to the development branch, the new implementation does load significantly faster, but I’m seeing far fewer sequences connecting the images, even though images belonging to the same sequence are highlighted together once one of the images is selected. Is that the intended behavior?

@nickplesha
Copy link
Contributor Author

@1ec5 Thanks for checking! Yep, I'll fix the sequence loading function - it seems it has been affected by the change in the cache structure, we should still be able to load all visible sequences.

@nickplesha
Copy link
Contributor Author

Fixed sequences - the problem was loading sequences that span multiple tiles so I adjusted how these are stored in the cache.

Also, refactored some old methods to further reduce the size of the code.

@nickplesha
Copy link
Contributor Author

Created a new PR: #8372 to fix merge conflicts and build errors.

@nickplesha nickplesha closed this Mar 1, 2021
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

Successfully merging this pull request may close these issues.

2 participants