react-simple-maps icon indicating copy to clipboard operation
react-simple-maps copied to clipboard

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

Open ezequielhernancasas opened this issue 1 year ago • 1 comments

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)} /> )} ...................

ezequielhernancasas avatar Jul 21 '23 14:07 ezequielhernancasas

Looks like it's this old bug, https://github.com/zcreativelabs/react-simple-maps/issues/275

DanielGaull avatar Jul 21 '23 18:07 DanielGaull