htmld3.jsgeomap

d3.geomap Not Working


I have been trying to get the documentation from http://d3-geomap.github.io/ to work but somehow it's not i can't find my mistake. Here is my Code:

<!DOCTYPE html>

<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link href="d3-geomap/css/d3.geomap.css" rel="stylesheet">
    <script src="d3-geomap/vendor/d3.geomap.dependencies.min.js"></script>
    <script src="d3-geomap/js/d3.geomap.min.js"></script>
</head>
<body>
    <div id="map"></div>

<script>
var map = d3.geomap()
.geofile('d3-geomap/topojson/world/countries.json');

d3.select('#map')
.call(map.draw, map);
</script>

My HTML File is in the root folder.


Solution

  • Okay if anyone else has the same problem as me - I solved it.

    The thing is that windows has some security issues and it blocks some type of code. I couldn't find out the real reason but if u want it to work, just host it on a virtual web server (e.g. www.xampp.com) that did the job for me.