I am using D3.js for a project, and I would like to know if it is possible to change the projection of SVG object during the change of zoom ?
I would like to use it for this scenario: I am using projection called d3.geo.albersUsa() and when I do zoom on the object I want to change to d3.geo.azimuthal().
I am using D3.js for a project, and I would like to know if
Share
Yes, this is possible. Just use the usual methods to set the projection in the zoom handler. Note that it might not be a good idea to change the projection this way though. Users will probably be confused because it will look completely different when zoomed in, as opposed to the normal behaviour where zoom just magnifies. It might be a better idea to give the user a separate control to change the projection.