Skip to content

Conversation

@TimSylvester
Copy link
Contributor

@TimSylvester TimSylvester commented Aug 14, 2025

Adds an optional encoding field to vector sources, based on the one in raster sources, to allow the use of MapLibre Tiles.

Implementation issues:

Resolves #1252

I don't think this has any effect on APIs, can someone confirm?

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license)
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.37%. Comparing base (1768c7b) to head (e32cf89).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1251   +/-   ##
=======================================
  Coverage   95.37%   95.37%           
=======================================
  Files         114      114           
  Lines        7398     7398           
  Branches     2327     2327           
=======================================
  Hits         7056     7056           
  Misses        342      342           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HarelM
Copy link
Collaborator

HarelM commented Aug 14, 2025

Thanks for taking the time to open this PR!
Can you also please open an issue in this repo with a design proposal (basically advising to add encoding to vector source as can be understood from this PR)?

Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

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

Encoding focuses on "format", not the organization that produced it. mlt, mvt, ...

Copy link
Member

@louwers louwers left a comment

Choose a reason for hiding this comment

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

I prefer using mvt and mlt instead of mapbox and maplibre.

It is not unthinkable that either Mapbox or MapLibre releases another vector tile format in the future. Then these names would be very confusing. I already think mapbox is quite confusing because I personally don't associate MVTs with Mapbox even though they invented the format.

TimSylvester added a commit to WetDogWeather/maplibre-gl-native that referenced this pull request Aug 15, 2025
@HarelM
Copy link
Collaborator

HarelM commented Aug 17, 2025

This looks good in general.
Let's have the design proposal open for a few more days to let more people comment, and if no one has new insights we will be able to merge this.
Thanks for taking the time to open this PR and implement it!

@louwers
Copy link
Member

louwers commented Sep 30, 2025

@HarelM Let's merge?

@louwers louwers merged commit c0c6b81 into maplibre:main Oct 1, 2025
6 checks passed
@TimSylvester TimSylvester deleted the mlt branch October 1, 2025 17:43
@HarelM
Copy link
Collaborator

HarelM commented Oct 1, 2025

We need a new release of the spec package to update the docs, right?

@louwers
Copy link
Member

louwers commented Oct 1, 2025

No need, looks like it is live. https://maplibre.org/maplibre-style-spec/sources/#encoding

@HarelM
Copy link
Collaborator

HarelM commented Oct 1, 2025

Nice! Wasn't sure if docs are updated only on release or every merge to main. DevOps is awesome 😎

@acalcutt
Copy link
Contributor

acalcutt commented Nov 3, 2025

I am probably a bit late here, but I was looking at the MLT maplibre-js PR to get an idea of how I would implement it in tileserver-gl and was wondering about this choice to use 'encloding' instead of 'format' for the type of tile in MLT. it seems like other tile types use 'format' metadata to distinguish between what is in the tile . "encoding" seems like we only use in terrain right now, and for example in tileserver-gl it is set to either mapbox or terrarium right now. This being a vector source it is probably not much of an issue, but it seems different from the convention we have been using.

@TimSylvester
Copy link
Contributor Author

It's just for consistency with the other source definition.

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.

Design Proposal: Add encoding field to vector source

8 participants