RE: svg for world map

A couple of years ago, as an experiment for my classes, I allocated about six hours to a project that involved taking a public domain/freely licensed (public domain is so much nicer than freely licensed since the damn licenses are a real nuisance at times when one is into cherry picking the good stuff) SVG map of the US (Wikimedia commons had a pretty one with the 50 states all nicely drawn to elementary school jig saw puzzle precision). sprinkling JavaScript-pixie-dust over it to color the stuff and assign event handlers, and then hooking it up to a multivariate US census data spigot that shaded the map on any of some 90 user-selected variables. Some of my cartography friends pointed out that it wasn't a great work of cartographic elegance, but heck, the six hours spent bringing it from conception to completion, and ready for classroom presentation was far less than the time the average person takes to orient to the use of D3, Raphael or JQuery. All those things are lovely, but sometimes writing 143 characters of hybrid code in a metalanguage to avoid writing 36 characters of SVG seems a bit odd to me. But then, my perspective on such matters is often askew. 

In short, another approach, if you're comfortable with SVG and JavaScript is to roll your own. Some might call you a hippy, though, and in today's political climate that is a moniker you might want to avoid. 

Cheers
David

-----Original Message-----
From: Doug Schepers [mailto:schepers@w3.org] 
Sent: Wednesday, July 17, 2013 5:22 PM
To: vicky b
Cc: www-svg@w3.org
Subject: Re: svg for world map

Hi, Vicky-

I suggest you look at d3.js [1]. There are various tutorials out there for working with maps and coordinates [2][3].

[1] https://github.com/mbostock/d3/wiki/Gallery
[2] http://www.d3noob.org/2013/03/a-simple-d3js-map-explained.html
[3] http://www.schneidy.com/Tutorials/MapsTutorial.html

Regards-
-Doug

On 7/17/13 9:31 AM, vicky b wrote:
> HI All,
>
>    I want to develop a world map using svg and allow user to select de 
> select countries.
>
>    can anyone give   coordinates for world map?
>
>    also how to handle event on svg can anyone point me to  good 
> tutorial on this
>
> --
> /*Thanks & Regards
>   Vickyb*
>
> /

Received on Thursday, 18 July 2013 02:22:30 UTC