AlexisGado
Posts: 3
Joined: Mon Nov 29, 2021 3:11 pm

Error crashes highmaps when unmounting before mappoint series has loaded

Hello !

The title sums up most of my understanding of the problem.
I tried to make a small stackblitz to show it. (try to toggle on then off quickly and it will crash)
https://stackblitz.com/edit/react-ts-wj ... =index.tsx
It took me several hours to isolate the issue and I hope it is not due to a misuse of the library.

Have a good day,

Alexis G.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Error crashes highmaps when unmounting before mappoint series has loaded

Hello Alexis!

Thanks for contacting us with your question!

The problem is not on your side. It's not a wrapper problem either, it's a Highmaps bug. The workaround for this is to turn off the animation for the chart.

I will report a bug on GitHub and post a link to a thread here for reference.

Workaround: https://stackblitz.com/edit/react-ts-us ... =index.tsx

Let me know if this helps.
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
AlexisGado
Posts: 3
Joined: Mon Nov 29, 2021 3:11 pm

Re: Error crashes highmaps when unmounting before mappoint series has loaded

Thank you very much for your answer !
I couldn't find a workaround apart from waiting 2s after every map display.

I also noticed that if the mappoint series is initially in the options of the map, the bug does not appear.
See https://stackblitz.com/edit/react-ts-w ... =index.tsx

Regards,

Alexis
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Error crashes highmaps when unmounting before mappoint series has loaded

I'm glad I could help!

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Maps”