Skip to content

use hosted default_style.json instead of manual styling #345

Description

@nilsnolde

Currently the app hard codes the styling which will eventually become stale wrt upstream valhalla. It'd be best to use our github hosted default_style.json.

Activity

  1. added
    enhancement
    pre-GSoC
    on Mar 5, 2026
  2. lourduradjou commented on Mar 5, 2026

    @lourduradjou
    Contributor

    Hi @nilsnolde , I had a look at valhalla-layers.ts, where the edges, shortcuts and nodes layers are currently defined directly in the web app.
    Should this be replaced by loading the default_style.json from the valhalla repository and using that as the MapLibre style instead of maintaining these layer definitions here? (In case this is how you are expecting the flow to be)

    Happy to work on this once I have the right understanding.

  3. nilsnolde commented on Mar 5, 2026

    @nilsnolde
    MemberAuthor

    Should this be replaced by loading the default_style.json from the valhalla repository and using that as the MapLibre style instead of maintaining these layer definitions here? (In case this is how you are expecting the flow to be)

    that's exactly how I read my comment and the title..

  4. lourduradjou commented on Mar 5, 2026

    @lourduradjou
    Contributor

    Should this be replaced by loading the default_style.json from the valhalla repository and using that as the MapLibre style instead of maintaining these layer definitions here? (In case this is how you are expecting the flow to be)

    that's exactly how I read my comment and the title..

    Got it, thanks for confirming!

  5. added a commit that references this issue on Mar 8, 2026
    c139c07
  6. nandalalshukla commented on Mar 18, 2026

    @nandalalshukla

    @nilsnolde,
    if no one is working on this issue, may i pick this?
    and also i had a confusion regarding this issue, did you just mean to change the MAP_STYLES to take the styling from default_style.json?

  7. nilsnolde commented on Mar 18, 2026

    @nilsnolde
    MemberAuthor

    maplibre lets you set the URL to the style.json

  8. Guptaji-007 commented on Mar 20, 2026

    @Guptaji-007

    Hello @nilsnolde , I’d like to work on this pre-GSoC issue. My plan is to replace the current hardcoded style setup by fetching the hosted default_style.json, while keeping a local fallback in case the remote fetch fails. I’ll also inspect whether any runtime patching is needed for tile/sprite/glyph URLs before applying the style.

  9. Guptaji-007 commented on Mar 20, 2026

    @Guptaji-007

    Hello @nilsnolde , I’d like to work on this pre-GSoC issue. My plan is to replace the current hardcoded style setup by fetching the hosted default_style.json, while keeping a local fallback in case the remote fetch fails. I’ll also inspect whether any runtime patching is needed for tile/sprite/glyph URLs before applying the style.

    I started with an approach where the app fetches the hosted default_style.json, extracts the Valhalla-specific layers from it, and reuses those layer definitions in the app instead of relying on the current manual/local setup.
    Before I turn that into a PR, I wanted to confirm the intended scope of this issue: should I keep that layer-extraction approach, or is the expectation here simply to point the default built-in MapLibre style directly to the hosted default_style.json URL?

  10. nilsnolde commented on Mar 20, 2026

    @nilsnolde
    MemberAuthor

    sure, do it.

    but sigh.. I feel like everyone comes to ask the same question.. isn't this #345 (comment) clear enough? maybe I'm missing smth?

    ok, again then: simply set the style.json to github's hosted file. no fallback, no other fancy stuff. just that.

  11. Guptaji-007 commented on Mar 20, 2026

    @Guptaji-007

    I’ve opened a PR for this here: #388
    Please take a look when you get a chance.
    Thank you.

  12. Rohiyadaop commented on Mar 23, 2026

    @Rohiyadaop

    Hi, I’m a GSoC 2026 applicant and I’m interested in investigating this bug.

    I’m currently getting familiar with the web-app codebase and would like to reproduce the issue locally and work on a fix. Please let me know if someone is already actively working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpre-GSoC

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions