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

Mapbox vector tiles #346

Open
dcooley opened this issue Oct 19, 2021 · 3 comments
Open

Mapbox vector tiles #346

dcooley opened this issue Oct 19, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@dcooley
Copy link
Collaborator

dcooley commented Oct 19, 2021

https://deck.gl/docs/api-reference/geo-layers/mvt-layer

@dcooley dcooley added the enhancement New feature or request label Oct 19, 2021
dcooley added a commit that referenced this issue Oct 21, 2021
@dwachsmuth
Copy link

Hi @dcooley, I was wondering if there was a timeline for this feature showing up in a build? I'd love to kick the tires on it with some gigantic polygon datasets!

@dcooley
Copy link
Collaborator Author

dcooley commented Jan 12, 2022

The problem I am having with this is coming up with a clean way to pass in the colours / line widths / etc into the function. All the other layers that have a data argument map colours to a variable. Whereas for MVT you colour based on one of the JSON objects inside the MVT layer. Which in JS can also be a function, as per the example for getLineWidth

So this kind of fell of my radar because I couldn't come up with anything. I don't suppose you have any ideas?

@mpadge
Copy link
Contributor

mpadge commented Dec 21, 2022

@dcooley I've been playing around with this, and it seems that the MVT layer is intended to use the external tile server specified in data as read only. You have to create and serve tiles elsewhere, and then plug the resultant URL in as the data parameter. deck.gl will then use the data specified in the tiles as expected. Both the deck.gl and mapbox libraries are hard-coded to accept data parameters as nothing other than URLs to tile servers.

The only way for this to all work without externally hosted tiles would be to use something like https://github.com/felt/tippecanoe to generate local tiles, then spin up a local server, and insert the URL from that. But that's never going to be viable here.

Short of that, the MVT layer is just a way of getting data from an external tile server and using that to constuct a deck.gl layer. From my understanding of it, locally-specified data can by definition not be used for MVT here.


Update

Implementation in rdeck described here, in which data is indeed just a URL to a tile server holding the data to be rendered. That would still be a nifty enhancement here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants