zcreativelabs / react-simple-maps

Beautiful React SVG maps with d3-geo and topojson using a declarative api.
https://www.react-simple-maps.io/
MIT License
3.11k stars 426 forks source link

Map is not Rendering only in Safari #346

Open kennethbigler opened 1 year ago

kennethbigler commented 1 year ago

Here is my implementation: https://github.com/kennethbigler/react-home/blob/main/src/components/resume/travel-map/WorldMap.tsx

This renders fine in Chrome, but will not render in Safari on Mac or Mobile. This is a regression as it used to work fine for Safari with no code changes.

HarryHung commented 1 year ago

The answer solved the issue for me on Safari: https://stackoverflow.com/questions/64449042/svg-using-react-simple-maps-not-displaying-on-mobile

by adding a property of style={{width: "100%"}} to <ComposableMap>, the issue now seems to be resolved! This SHOULD NOT replace the width="1200" property

kennethbigler commented 1 year ago

This fix worked for me, although I still thing it is an issue that should be fixed :)