Centroid gives incorrect values for projection albersUsa()

المشرف العام

Administrator
طاقم الإدارة
I rendered a US map using d3.js with the mercator projection. On top of the map, I placed circles using the centroid of the projected path. The placements were perfect. Also, I had implemented d3.drag() behaviour on the map which seemed perfect.Now, my client requested to use the albersUsa() projection. After changing to albersUsa():1. A lag started while click-and-drag.2. The position returned by centroid is now incorrect.

Do I need to add something else as well while changing to albersUsa()?



أكثر...
 
أعلى