react-simple-maps icon indicating copy to clipboard operation
react-simple-maps copied to clipboard

Am I the only one whose map is not rendering right now?

Open jungsikjeong opened this issue 2 years ago • 7 comments

Am I the only one whose map is not rendering right now?

const geoUrl =
  'https://raw.githubusercontent.com/deldersveld/topojson/master/world-countries.json';

If you go to this link, 404not foun will appear.

jungsikjeong avatar Oct 03 '23 07:10 jungsikjeong

I'm having the same issue, here's another one you can use: https://unpkg.com/[email protected]/countries-110m.json

Laurens256 avatar Oct 03 '23 11:10 Laurens256

Same Issue I am facing now.

iamibrahimriaz avatar Oct 05 '23 02:10 iamibrahimriaz

same issue

ketangupta34 avatar Oct 11 '23 13:10 ketangupta34

If you want a more reliable drop-in fix, just copy the json from web archive (https://web.archive.org/web/20230917004247/https://raw.githubusercontent.com/deldersveld/topojson/master/world-countries.json) and host the file yourself.

MonliH avatar Oct 13 '23 22:10 MonliH

I couldn't find the JSON from the web archive for the url (https://raw.githubusercontent.com/deldersveld/topojson/master/countries/united-kingdom/uk-counties.json)

tandin2000 avatar Oct 26 '23 07:10 tandin2000

Is there any solution?

CroAnna avatar Nov 09 '23 20:11 CroAnna

Is there any solution?

This worked for me:

import React from "react";
import { ComposableMap, Geographies, Geography } from "react-simple-maps";

const geoUrl = "https://unpkg.com/[email protected]/countries-110m.json"; // new url works

export default function MapTest() {
  return (
    <div className="" style={{ width: "200px" }}>
      {" "}
      <ComposableMap>
        <Geographies geography={geoUrl}>
          {({ geographies }) =>
            geographies.map((geo) => (
              <Geography key={geo.rsmKey} geography={geo} />
            ))
          }
        </Geographies>
      </ComposableMap>
    </div>
  );
}

CroAnna avatar Nov 09 '23 20:11 CroAnna