Closed cquex closed 3 years ago
You only need to adjust the "Scale" and "center" property of the ComposableMap component.
Something like below:
<ComposableMap
height={550}
projectionConfig={{
scale: 1550,
center: [105, 16]
}}
projection="geoMercator"
data-tip=""
>
...
</ComposableMap>
Hi, Im having an issue creating my map. I create my json file on https://mapshaper.org/ with the country that i want:
Then i just download it and load on my Geographies component:
`import React from "react"; import {geoCentroid} from "d3-geo"; import { ComposableMap, Geographies, Geography, Marker, Annotation, } from "react-simple-maps";
import geoUrl2 from "./data/guatemala.json";
const geoUrl = "https://raw.githubusercontent.com/zcreativelabs/react-simple-maps/master/topojson-maps/world-110m.json";
const Map2 = () => { return (
); };
export default Map2;`
In my webpage the map looks :
I think is something with the projection, the scale and the rotation. How i know which configuration is the best for my map ?