zcreativelabs / react-simple-maps

Beautiful React SVG maps with d3-geo and topojson using a declarative api.
https://www.react-simple-maps.io/
MIT License
3.03k stars 424 forks source link

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

Open jungsikjeong opened 9 months ago

jungsikjeong commented 9 months ago

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.

Laurens256 commented 9 months ago

I'm having the same issue, here's another one you can use: https://unpkg.com/world-atlas@2.0.2/countries-110m.json

iamibrahimriaz commented 9 months ago

Same Issue I am facing now.

ketangupta34 commented 8 months ago

same issue

MonliH commented 8 months ago

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.

tandin2000 commented 8 months ago

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)

CroAnna commented 7 months ago

Is there any solution?

CroAnna commented 7 months ago

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/world-atlas@2.0.2/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>
  );
}