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

projection="geoAlbersUsa" with ZoomableGroup center={0 ,0} return error #332

Open
ezequielhernancasas opened this issue Jul 21, 2023 · 1 comment

Comments

@ezequielhernancasas
Copy link

Hi, Its still appear the issue with zoom in projection="geoAlbersUsa".
return "Cannot read properties of null (reading '0')"

Example :

<ComposableMap
projection="geoAlbersUsa"
projectionConfig={{
scale: scaleChart,
}}
data-tip=""
>


{({ geographies }) =>
geographies.map((geo) => {
const centroid = geoCentroid(geo);
const cur = statesText.find((s) => s.val === geo.id);
return (
<Geography
key={geo.rsmKey}
stroke="#FFF"
geography={geo}
fill="#605D5C"
onClick={() => setCenter(centroid)}
/>
)} ...................

@DanielGaull
Copy link

Looks like it's this old bug, #275

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

2 participants