From b7d2d80d5df7e040d74ba99fc2da5a1a9ff056cd Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 23 Jun 2012 01:58:07 +0200 Subject: [PATCH] minor changes --- examples/maps/ipv4_map_of_the_internet/html/about.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/maps/ipv4_map_of_the_internet/html/about.html b/examples/maps/ipv4_map_of_the_internet/html/about.html index 52fee0b3..afe1eb83 100644 --- a/examples/maps/ipv4_map_of_the_internet/html/about.html +++ b/examples/maps/ipv4_map_of_the_internet/html/about.html @@ -10,6 +10,6 @@

Another challenge is the fact that nation states, since they were invented long before the Internet, are represented by flags and not by icons. These flags tend to have weird aspect ratios and don't work well on a map that is essentially a square of squares. One could just crop or resize them, but in most cases, the results look surprisingly stupid.

-

Luckily, OxJS solves this problem. Its Geo module comes with a set of square flag icons. They're generated (almost) automatically, by fetching SVGs from wikipedia and applying some more or less regular transformations. The French Tricolore is easy. The Union Jack is harder. And the flag of Nepal is really hard. (But the hardest part was figuring out how to render SVGs as PNGs, in python, on Mac OS X, without installing obscure libraries that have insane dependencies. It turned out to be a one-liner: os.system('qlmanage -t -s %d -o %s %s' % (size, path, svg)). Making these icons was definitely more time-consuming than making this map.

+

Luckily, OxJS solves this problem. Its Geo module comes with a set of square flag icons. They're generated (almost) automatically, by fetching SVGs from wikipedia and applying some more or less regular transformations. The French Tricolore is easy. The Union Jack is harder. And the flag of Nepal is really hard. (But the hardest part was figuring out how to render SVGs as PNGs, in python, on Mac OS X, without installing obscure libraries that have insane dependencies. It turned out to be a one-liner: os.system('qlmanage -t -s %d -o %s %s' % (size, path, svg)). Making these icons was definitely more time-consuming than making this map.

-

Generating the images took 200 lines of Python. The map client is 1,000 lines of JavaScript. And the server backend is 5 lines of PHP. If you find bugs, or spot anything that should be done more elegantly, your feedback is appreciated.

\ No newline at end of file +

Generating the images took 200 lines of Python. The map client is 1,000 lines of JavaScript. And the server backend is 5 lines of PHP. If you find bugs, or spot anything that should be done more elegantly, your feedback is appreciated.

\ No newline at end of file