Closed bnbon closed 4 years ago
Hi @bonbonio,
Great that your upgrade was largely problem free and thanks for using react-simple-maps.
Regarding the projection, the Robinson projection is part of the d3-geo-projection package. In order to reduce the size of react-simple-maps, we opted to remove that package and make it optional for those who want these other projections.
The Equal Earth projection is very similar to the Robinson projection, though it is an equal area projection, whereas Robinson is a compromise projection. Since a lot of people want to make choropleth maps, it's better that an equal area projection is the default. The Equal Earth projection is part of the core d3-geo package, so it doesn't require an additional package to be included with react-simple-maps.
If you want to use Robinson, it is possible to pass a projection from d3-geo-projection as a function to React Simple Maps. Just make sure to add d3-geo-projection as a dependency of your project.
Check out this example: https://codesandbox.io/s/custom-projection-with-react-simple-maps-f5vbf
Hi @zimrick
Thank you for such a prompt and interesting reply - that has answered my question perfectly - and is very much appreciated.
Hello,
I was using 0.12.x and updated to 2.x.x apart from a one line fix, my map worked great - but I had to remove
projection="robinson"
from theComposableMap
component; why is this?