react-simple-maps
react-simple-maps copied to clipboard
projection="geoAlbersUsa" with ZoomableGroup center={0 ,0} return error
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="" > <ZoomableGroup center={center} zoom={5} > <Geographies geography={geoDataChart}> {({ 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)} /> )} ...................
Looks like it's this old bug, https://github.com/zcreativelabs/react-simple-maps/issues/275