0

I am attempting to create an interactive map of my home country using react-simple-maps, I am facing an issue where the map I am rendering in is extremely small, I have tried using height/width and scale but I cannot seem to get the map to render larger than scale(8).

Minimum useable code recreation: https://codesandbox.io/s/zoom-controls-forked-g47m1?file=/src/MapChart.js

Nemanja
  • 3,295
  • 11
  • 15
Ceri Westcott
  • 300
  • 2
  • 14

1 Answers1

2

I edited your code, you can check solution here. The problem vas that scale property in your JSON map data was too small. If you want to make your map even more bigger change scale prop in ComposableMap.

Nemanja
  • 3,295
  • 11
  • 15
  • I was thinking that might have been the issue but this is the first time playing with GeoJson so i was unsure. It looks a little squished on the X axis but that is perfect, i'll tinker to get the X axis fixed. Legend – Ceri Westcott Jul 29 '21 at 14:44
  • May i ask how you figured out what scale to add to the json? thanks – Ceri Westcott Jul 29 '21 at 15:13
  • Of course, I found an JSON map data example on google for some other country (Vietnam I think) and I took scaling property from there and putted it in JSON data for your country and it was working fine. – Nemanja Jul 29 '21 at 15:45