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 add a new country (singapore) attributes in the map? #43

Closed turbowars closed 10 years ago

turbowars commented 10 years ago

Hi,

I know for a fact that I have to modify the world.js file to add new countries. I am unable to figure out what the "arcs" attributes do? how to set attributes for a new country like singapore?

{ "type": "Polygon", "id": "AFG", "arcs": [ [0, 1, 2, 3, 4, 5] ], "properties": { "name": "Afghanistan" } }

nikonikoniko commented 10 years ago

Hi, We are also experiencing this problem and are not sure how to proceed. Countries/regions that are missing:

are there any other libraries out there we can get the arc data from?

markmarkoh commented 10 years ago

I recommend that you find another .SHP file, convert to GeoJSON and then to TopoJSON.

I have instructions for that here: http://datamaps.markmarkoh.com/using-custom-map-data-w-datamaps/

nikonikoniko commented 10 years ago

thanks!

jonathanstowell commented 9 years ago

Did you manage to be able to add the additional missing countries in the end? If so would you be able to share the arcs for those countries?

zzoi commented 9 years ago

The link is broken for the custom map data with datamaps. I have the same issue. Any help adding singapore to the map?

zzoi commented 9 years ago

I found a map with additional countries and created a custom Datamap with a TopoJSON file and it works. Following the instructions from here: http://bl.ocks.org/markmarkoh/8717334

Here is my solution. https://gist.github.com/zzoi/97b68cb3a09a7f04a8ac