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

[bug] when using this.heat.setOptions change the radius #10

Closed
yeatszhang opened this issue Mar 1, 2016 · 3 comments · Fixed by #15
Closed

[bug] when using this.heat.setOptions change the radius #10

yeatszhang opened this issue Mar 1, 2016 · 3 comments · Fixed by #15

Comments

@yeatszhang
Copy link

I need to change the radius of heat layer but there is not a api. So i use this.heat object change it directly.
But it doesn't work. Is there any suggestions or support ?
Thanks for your lib, it helps a lot.

bug

@jgravois
Copy link
Contributor

jgravois commented Mar 8, 2016

it is already possible to set your own radius directly in the layer constructor (as shown in this sample), so am i correct to assume you're attempting to modify the value on the fly after the layer has already been instantiated?

if so, i'll need to look into exposing something similar to L.heatlayer.setOptions().

@jgravois
Copy link
Contributor

sorry it took so long, but i finally got around to creating a PR to expose setOptions() directly to this plugin.

that said, i couldn't reproduce the problem you initially reported. the code below was already enough to refresh the display of a heatmap with a new radius.

heatLayer.heat.setOptions({
  radius: 10
});

@yeatszhang
Copy link
Author

Thanks for you support. That's what I need! 😄

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 a pull request may close this issue.

2 participants