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 vector layer error #105

Closed
antonydellavecchia opened this issue Mar 26, 2019 · 1 comment
Closed

setFeatureState vector layer error #105

antonydellavecchia opened this issue Mar 26, 2019 · 1 comment
Assignees
Labels

Comments

@antonydellavecchia
Copy link

antonydellavecchia commented Mar 26, 2019

Pretty sure i am getting an error because the source of a vector layer is an object,
but the orignal mapbox function requires a key for it's source, this should be fixed by just change this.source to this.sourceId? also sourceLayer instead of "source-layer"? similar error for get, I changed this to my suggestions and i got my code to work.

setFeatureState(featureId, state) {
  if (this.map) {
    const params = {
      id: featureId,
      source: this.source,
      "source-layer": this.layer["source-layer"]
    };
    return this.map.setFeatureState(params, state);
  }
}
@soal soal added the bug label May 4, 2019
@soal soal self-assigned this May 4, 2019
@soal soal closed this as completed in 6c06a7a May 4, 2019
@dmikrot
Copy link

dmikrot commented May 28, 2020

@soal A similar issue is happening with GeojsonLayer, but this fix was only applied for VectorLayer.

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

No branches or pull requests

3 participants