-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatically rotate/zoom? #7
Comments
@Jianan-Li to set the rotation/scale programmatically you don't need this module. You can do it directly on the D3 projection itself, with https://github.com/d3/d3-geo#projection_rotate and https://github.com/d3/d3-geo#projection_scale. This module is simply aconvenience layer to control those projection parameters by means of user interaction. |
I think this is the same thing I am experiencing... |
I'm not sure what all ev.transform.k on https://github.com/vasturiano/d3-geo-zoom/blob/master/src/geoZoom.js#L51 is based on. It seems to be 'remembering' previous zooms, which I think it needs to in order to know the change, but I don't know how to influence it so it "sees" programmatic changes to zoom/scale. |
Found a solution. My specific case was programmatically resetting to the original orientation/scale as when zoom was added, so returning to the zoomIdentity makes geozoom aware of that. |
Is it possible to programmatically rotate/zoom alongside user interactions?
The text was updated successfully, but these errors were encountered: