-
Notifications
You must be signed in to change notification settings - Fork 43
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
VisLeafletFlowMap: Invalid LatLng object: (NaN, NaN) #132
Comments
@ereid7 You can solve that by calling useEffect(() => {
if (!isHidden) {
requestAnimationFrame(() => {
childRef.current.component?.fitView();
})
}
}, [isHidden]); |
@rokotyan Thanks for the response, this resolved my issue |
Fixes Leaflet rendering errors when the parent element was hidden right before calling `fitView` or `fitToPoints` #132
Fixes Leaflet rendering errors when the parent element was hidden right before calling `fitView` or `fitToPoints` #132
Fixes Leaflet rendering errors when the parent element was hidden right before calling `fitView` or `fitToPoints` #132
This error occurs when calling
fitView
on the componentUsing firefox on mac
Instructions to reproduce:
<maptiler-key>
with maptiler kaytoggle
button in the web previewThe text was updated successfully, but these errors were encountered: