bugfix: Localize map rather than external sourcing

This commit is contained in:
rzmk 2022-08-10 16:50:47 -04:00
parent c3e0c1d197
commit 70cbb04c2c
2 changed files with 11293 additions and 4 deletions

11292
public/map.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -9,9 +9,6 @@ import {
Sphere,
} from "react-simple-maps";
const geoUrl =
"https://raw.githubusercontent.com/zcreativelabs/react-simple-maps/master/topojson-maps/world-110m.json";
const Map = ({ latitude, longitude }) => {
// Icon alignment offset fix
const newLong = String(Number(longitude) - 2.7);
@ -21,7 +18,7 @@ const Map = ({ latitude, longitude }) => {
<ComposableMap projection="geoEqualEarth" width={2400}>
<Graticule stroke="rgba(255, 255, 255, 0.5)" />
<Sphere stroke="#FF5533" strokeWidth={2} />
<Geographies geography={geoUrl}>
<Geographies geography="/map.json">
{({ geographies }) =>
geographies.map((geo) => (
<Geography