Andrew
Andrew

Reputation: 6860

Cities displayed in topojson visualization, but not in file itself?

I am looking at this json file: https://gist.github.com/d3noob/5193723#file-world-110m2-json. In the visualization done by github, the file seems to encode data about cities and towns. However when I look at the json file itself, this data does not seem to be in there (the only objects are land and countries, no cities), and I am not sure how to get this data into my d3 visualization. Am I misunderstanding something about this file/how topojson is encoded?

Upvotes: 0

Views: 309

Answers (1)

Lars Kotthoff
Lars Kotthoff

Reputation: 109242

The github visualisation displays the data in the JSON (orange) overlaid on Google Maps. What's in the JSON are just the orange outlines. If you want cities etc in your map, you'll have to create a separate TopoJSON file, see this tutorial for more information.

Upvotes: 2

Related Questions