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

feat: use mapbox vector source #4888

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

marius-at-atb
Copy link
Contributor

@marius-at-atb marius-at-atb commented Dec 17, 2024

DRAFT

This is a branch with (almost) everything put together.
Planning to merge as a series of PRs:

- Design System - Add Icons // replaced by sprite solution

  • Create sprites and make them available at some url

  • Remote config

    • Url for tile server endpoint
    • Mapbox style source for stop places
  • Update to new map style

    • New map style env vars
    • Use new style URL based on light/dark mode
    • StopPlaces -> added using VectorSource, supporting selection of active stop place
  • Optional: Use new style for all maps in app

    • Update map config to use the new map style
    • Add StopPlaces to relevant maps, e.g. live bus in map.
  • Vehicles and Stations

    • Remove all legacy code, use VectorSource, supporting selection of active stop place
    • Fix for map filter
    • Handle onClick logic (not done in this Draft PR)
  • Deprecate old BFF endpoints

  • Documentation

Uses and depends on the server tile endpoint: https://github.com/AtB-AS/mobility/pull/35.

Resolves https://github.com/AtB-AS/kundevendt/issues/19555


Also just for entertainment, here's a screenshot from the development of the new map solution:

@marius-at-atb marius-at-atb self-assigned this Dec 17, 2024
* @throws {AxiosError} If the HTTP request fails.
* @throws {Error} For any other unexpected errors.
*/
export async function getMapboxStyle(styleUrl: string): Promise<MapboxStyle> {
Copy link
Contributor Author

@marius-at-atb marius-at-atb Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.mapbox.com/api/maps/styles/#styles-api-restrictions-and-limits
Hmm, max limit means we should get this through our own server (or contact mapbox).

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.

1 participant