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

setFeatureState with pmtiles #18

Closed
marcosci opened this issue Jul 11, 2024 · 3 comments
Closed

setFeatureState with pmtiles #18

marcosci opened this issue Jul 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@marcosci
Copy link

Hey Majid!

Me again. Do you have any idea how to use mapbox.setFeatureState with pmtiles?
I am trying to create a hover effect for polygons and I get the following error:

Error: The sourceLayer parameter must be provided for vector source types.

Cheers
Marco

@marcosci
Copy link
Author

marcosci commented Jul 11, 2024

Ah, I figured out the source of this. Somehow generateId or promoteId have no effect on pmtiles sources. Is that something that can be fixed?

I updated our stackblitz:

https://stackblitz.com/~/github.com/marcosci/pmtiles_debug?file=src/routes/%2Bpage.svelte&view=editor

If you look at the console you can see that the feature id is still undefined.

@am2222
Copy link
Owner

am2222 commented Jul 11, 2024

Hi @marcosci let me debug it a bit! I suspect it should be related to the promoteId declaration

am2222 pushed a commit that referenced this issue Jul 12, 2024
am2222 added a commit that referenced this issue Jul 12, 2024
am2222 pushed a commit that referenced this issue Jul 12, 2024
am2222 added a commit that referenced this issue Jul 12, 2024
@am2222
Copy link
Owner

am2222 commented Jul 12, 2024

@marcosci the issue should be fixed in the latest version!

@am2222 am2222 self-assigned this Jul 15, 2024
@am2222 am2222 added the bug Something isn't working label Jul 15, 2024
@am2222 am2222 closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants