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 am actually working on a project which involves polymaps and D3. I was wondering if you could help me on this.

I have 4 locations and I would like to draw a polyline from one location to other 3 location with different widht and color of the polyine. I was wondering if you guys could give me a starting point or maybe a sample code. I think this will be possible by D3.

I also do not understand the locationPoint method, passing in {lat: 0, lon: 0}. or coordinatePoint, passing in {row: 0.5, column: 0.5, zoom: 0},

Also I did try this link and but could not understand.

Thanks for your time.

share|improve this question
up vote 1 down vote accepted

I'm not certain I understand the entirety of your question. I do not think you need D3 for the task you describe.

You could define your polyline directly in GeoJSON, and provide it as a GeoJSON file using an URL. Take a look at the .url and .geoJson methods at -

As for the styling, you should be able to style your polyline using css. In Polymaps, assign an id to the layer:


then, provide a style in the map css file:

#roads path {
  stroke: rgb(255,0,0);
  fill: none;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
share|improve this answer
thanks a lot will do the implementation and get back to you. – user1089553 May 4 '12 at 5:27

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.