Skip to content

Conversation

@cboettig
Copy link
Contributor

@cboettig cboettig commented Jan 1, 2025

Thanks for this amazing package, really nice work and a very slick implementation! I really appreciate how you've managed to provide a quite native-R feeling interface while also letting us just drop back on list construction to access any edge case abilities in maplibre. Your documentation is impressive as well. 🌐

Here's a small tweak to resolve #8, adding support for PMTiles in the maplibre backend. By adding pmtiles.js, the existing utilities can work with pmtiles in much the same way as the vector tiles already included, e.g.:

maplibre(center=c(-72.9, 41.3), zoom=10) |>
  add_fill_layer(
    id = "redlines",
    source = list(type = "vector",
                           url = "pmtiles://https://data.source.coop/cboettig/us-boundaries/mappinginequality.pmtiles"),
    source_layer = "mappinginequality",
    fill_color = list("get", "fill")
  )

I know that #8 discusses the potential of pmtiles support for mapbox as well, but as this makes no changes to the R code base, I don't think this creates any divergence in the existing API. Thanks for considering this!

@walkerke
Copy link
Owner

walkerke commented Jan 3, 2025

Thank you, I'll take a look at this!

@walkerke
Copy link
Owner

walkerke commented Jan 7, 2025

This works great, thank you @cboettig!

@walkerke walkerke merged commit c19db0e into walkerke:main Jan 7, 2025
@walkerke walkerke mentioned this pull request Mar 16, 2025
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.

PMTiles source integration?

2 participants