question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Caledonia doesn't work

See original GitHub issue

Hello,

I try to use Datamaps to display the New Caledonia map, following the tutorial here: https://github.com/markmarkoh/datamaps/blob/master/README.md#getting-started

Here is my index.html:

<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="./datamaps.ncl.js"></script>
<div id="container" style="position: relative; width: 500px; height: 300px;"></div>
<script>
    var map = new Datamap({element: document.getElementById('container')});
</script>

./datamaps.ncl.js being this file: https://github.com/markmarkoh/datamaps/blob/master/dist/datamaps.ncl.js

Unfortunately, I’ve got this error message in the console:

TypeError: data.objects is undefined
datamaps.ncl.js:172:9

What am I doing wrong? Thanks in advance.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
qntscommented, Jun 17, 2018

Hi @djcaesar9114, I finally found the solution. You need to set a projection similar to this https://github.com/markmarkoh/datamaps/issues/281

Also here is a working example for your map: http://jsbin.com/bocisozigo/edit?html,output

1reaction
qntscommented, Jun 13, 2018

I’m creating a Taiwan map and I got the same problem 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

New Caledonia Says 'Non' to Independence
The vote on the Pacific island territory comes as France's president has prioritized shoring up the country's international profile, ...
Read more >
New Caledonia says it won't be 'trojan horse' for big ... - Reuters
The pro-independence president of New Caledonia, a French overseas territory, said he didn't want New Caledonia to be used as a "trojan ...
Read more >
New Caledonia Says It Won't Be 'Trojan Horse' for Big Powers ...
By Kirsty Needham. SUVA (Reuters) - The pro-independence president of New Caledonia, a French overseas territory, said he didn't want New ...
Read more >
New Caledonia might break from France in third ... - NPR
Many voters in the French territory of New Caledonia go to the polls this Sunday to vote on a referendum on independence.
Read more >
New Caledonia rejects independence from France for second ...
But a significantly improved “yes” vote, up from 43% last referendum and now approaching the simple majority needed for secession, has given a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found