markmarkoh / datamaps

Customizable SVG map visualizations for the web in a single Javascript file using D3.js
http://datamaps.github.io
MIT License
3.78k stars 1.01k forks source link

How to use individual country files #370

Closed tanyona closed 7 years ago

tanyona commented 7 years ago

I'm just getting started with datamaps. Not sure how the individual country files are meant to be used e.g.

<script type="text/javascript" src="${pageContext.request.contextPath}/js/datamaps-0.5.8/datamaps.ken.js"></script>

var map = new Datamap({
    element: document.getElementById('container')
});

I get an error in the browser console - data.objects is undefined

tanyona commented 7 years ago

Seen from this StackOverflow question - https://stackoverflow.com/questions/40640634/creating-heatmap-of-states-in-brazil that I have to define a projection.