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.03k stars 424 forks source link

Map is not Rendering only in Safari #346

Open kennethbigler opened 8 months ago

kennethbigler commented 8 months 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 7 months 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 7 months ago

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