Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 http://webcache.googleusercontent.com/search?q=cache:ZJcQP6qOvBwJ:https://github.com/simplegeo/polymaps/issues/91+&cd=1&hl=en&ct=clnk&gl=in and
http://webcache.googleusercontent.com/search?q=cache:ZJcQP6qOvBwJ:https://github.com/simplegeo/polymaps/issues/91+&cd=1&hl=en&ct=clnk&gl=in but could not understand.

Thanks for your time.

share|improve this question
add comment

1 Answer 1

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 http://polymaps.org/docs/geoJson.html#po.geoJson -

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

map.add(po.geoJson()
    .url("...")
    .id("roads"));

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
add comment

Your Answer

 
discard

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.