1

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.

1

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;
}
  • thanks a lot will do the implementation and get back to you. – user1089553 May 4 '12 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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