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

Full example of custom maps #36

Closed raubreywhite closed 8 years ago

raubreywhite commented 10 years ago

Hi,

I'm really struggling to follow your custom maps documentation. If you could include a fully working example of a custom map, that would be amazing.

Thanks

markmarkoh commented 10 years ago

There is an example here: http://datamaps.github.io/old.html#map_custom

In that example, I have a custom set of TopoJSON data describing the UK geography.

If you only have GeoJSON files, or files from a map editing program like .shp files, you'll want to checkout Bostock's (creator of d3.js) blog "Let's make a map".

You'll most likely want a custom transform too, depending on your data.

setProjection, dataUrl and scope are going to need to be used and set properly to get the map to show.

If you can get an example available for me to see, I should be able to help out.

DanDvoracek commented 8 years ago

What is the uk map in this directory? https://github.com/markmarkoh/datamaps/tree/master/dist

I tried all the combinations (UK, GB, GBR,...) and none of them have shown UK only when using the datamap.all.min.js.. Any idea? (Referring to your USA only example...)

Thanks,