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

Update dynimacaly contextmenu #134

Open
akaadream opened this issue Oct 9, 2020 · 0 comments
Open

Update dynimacaly contextmenu #134

akaadream opened this issue Oct 9, 2020 · 0 comments

Comments

@akaadream
Copy link

Hi !

In my project, i have to display geoJson layers with a defined contextmenu. But when i'm moving the map, i have to update these layers. At this moment, i need to update layer style (no problem for this one), and the contextmenu too but there is no way i can do this or maybe i didn't understood anything ^^'

The contextmenu is defined like that :

let layer = L.geoJson(zone.geometry, {
  bubblingMouseEvents: false,
  style: style,
  zone: zone,
  onEachFeature: (feature, layer) => {
    layer.bindContextMenu(contextmenu);
  }
}

And my goal is to update with a way like that :

layer.updateContextMenu(contextmenu);

I don't know if it's possible to get something like. Maybe it's already existing, but i don't know.
Sorry for that bad english, thanks in advance :)

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

No branches or pull requests

1 participant