Skip to content

[rapid][services] Add PMTilesService and MetaService for client-side …#1782

Merged
jenningsanderson merged 6 commits intomainfrom
ml-roads-from-pmtiles
Apr 15, 2026
Merged

[rapid][services] Add PMTilesService and MetaService for client-side …#1782
jenningsanderson merged 6 commits intomainfrom
ml-roads-from-pmtiles

Conversation

@jenningsanderson
Copy link
Copy Markdown
Contributor

@jenningsanderson jenningsanderson commented Mar 23, 2026

A work-in-progress to implement basic client-side conflation of the Facebook ML road predictions to load from a PMTiles archive instead of the mapwith.ai/map/ml_road endpoint.

TODO:

  • Proper highway tags

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice

}
const roadData = {
coords,
bbox: { minX: minX - 0.0003, minY: minY - 0.0003, maxX: maxX + 0.0003, maxY: maxY + 0.0003 }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like maybe a dupe of what is in pmtiles service now, but without the bbox buffer constant?

if (dataset.service === 'mapwithai') {
if (zoom >= 15) { // avoid firing off too many API requests
service.loadTiles(datasetID); // fetch more
if (zoom >= 14) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this intentional?

@jenningsanderson jenningsanderson merged commit f91f240 into main Apr 15, 2026
8 checks passed
@jenningsanderson jenningsanderson deleted the ml-roads-from-pmtiles branch April 15, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants