Kartograph Not Displaying

172 Views Asked by At

I search through stackoverflow but still I cant find the answer even thought similar questions had asked.

I am trying to display a SVG map generated by the Kartograph.py's demo. But whatever I do it just doesn't display.

Here is my code:

<!DOCTYPE html>
<html lang="en=us">
    <head>
        <title>Kartograph Demo</title>

        <script src="/js/jquery-1.10.2.min.js"></script>
        <script src="/js/raphael-2.1.0.min.js"></script>
        <script src="/js/kartograph.js"></script>


    </head>

    <body>
        <h1>Kartograph Demo</h1>

        <p>
            <div id="map"></div>

            <script>
                $(function() {
                    var mymap = $K.map('#map', 600, 0);
                    mymap.loadMap('world.svg', function() {
                        mymap.addLayer('layer_0');
                    });

                });

            </script>


        </p>
    </body>
</html>

I tried running the JS file locally and directly using their version. I tried running the newest version.

I just don't know what wrong with it.

1

There are 1 best solutions below

0
Paul Sizemore On

Did you run your local copy through a localhost web server? Make sure you are loading something like this 'http://localhost:8888/Kartograph' and not simply dragging the html document to the browser. That got me when I started.