Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create polyline on the click of the mouse. I have 4 circles 3 with radius 2 (Lets name it as B,C,D) and 1 with radius 8 (Lets name it as A). Now when I click on the circle A, poly line should be made which connects A to B, A to C & A to D.

I have the lat and long of A,B,C,D. Also the polyline from Circle A to B,C,D should be of different width and maybe color.

I have looked into the following suggestions

  1. Polymaps + D3+ Polyline with different width and color (This one is asked by me but could not get the right output, my apologies for duplication, since I really need to get an answer for this ASAP )

  2. how we create line between two cordinates on polymap?


But could not get much help, I would appreciate if you can give me some advise or code anything to start in the right direction



As suggested by your post I have made this js but does not seem to work was wondering if you can have a look at it and let me know the mistake

{// JavaScript Document

 var po = org.polymaps;
 var svg = n$("#map").add("svg:svg");
 var map =
.center({lat: 33.787, lon: -118.195})
+ "/1a1b06b230af4efdbb989ea99e9841af" //
+ "/998/256/{Z}/{X}/{Y}.png")
.hosts(["a.", "b.", "c.", ""])));

var map =;
var layer = po.geoJson();
var featAtoB ={ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [[-118.195, 33.768],[-117.914, 33.768]]},
  "properties": {"prop0": "value0"}
{ "type": "Feature",
  "geometry": {
   "type": "LineString",
   "coordinates": [
      [-118.195, 33.768],[-117.914, 33.768]

   "properties": {
     "prop0": "value0",
     "prop1": {"this": "that"}


share|improve this question
And How do I do that ? I did try to look around but did not find the place to accept – user1089553 May 28 '12 at 8:55
Please refer to the How do I ask, section of the FAQ, as well as other sections, as these will help you format your questions in a way to invite better answers, and also to give proper credit for a good answer. – Get Spatial May 28 '12 at 8:59
I would add that the one of the questions you referenced here, is one you asked. It basically asks the same as this question. It would be more concise to revise one of these questions with more detail and clarity, and remove the other, to avoid duplicates. – Get Spatial May 28 '12 at 9:01
you should check out How does accepting an answer work? – Aragon May 28 '12 at 9:02
I guess I did most of the edits as suggested by you guys, thanks for helping me. – user1089553 May 28 '12 at 9:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.