Skip to content
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

Selection bind for projections #4863

Open
jheer opened this issue Apr 10, 2019 · 0 comments
Open

Selection bind for projections #4863

jheer opened this issue Apr 10, 2019 · 0 comments
Assignees
Milestone

Comments

@jheer
Copy link
Member

jheer commented Apr 10, 2019

Currently selection bind supports an option "scales", which binds an interval selection to one or more scale domains to support panning and zooming. As we work towards support for selections in the context of geographic projections, it would be valuable to have an analogous "projection" option that binds to properties of a cartographic projection. Note that is possibly related to, though distinct from, #3587.

Of course, projections are quite different from scales. I think a default .bind('projection') (no additional parameters) would add panning and zooming support, binding to the projection scale parameter (for zooming) and rotate and/or center (for panning). For a Vega example using a Mercator projection, see https://vega.github.io/vega/examples/zoomable-world-map/

A slightly complicating bit is that the proper choice of parameters might vary by projection type. For example, for an orthographic projection we would want to use rotate exclusively, but for Mercator we want rotate for x-panning and center for y-panning. Additional parameters / selection projections (in the selection context, not a geographic context, which may well prove confusing to end users!!) could limit or control these choices.

In terms of resolution to a predicate, perhaps the bound selection should return true for any points drawn within the visible (clipped) region of the map? I think this would be consistent with other notions of geographic selections so far considered?

Anyway, we can use this issue to further discuss possible designs.

@arvind arvind added this to the 4.0 milestone May 17, 2019
@kanitw kanitw modified the milestones: 4.1, 4.x Dec 4, 2019
@kanitw kanitw modified the milestones: 4.x, soon?, 5.0? (or 5.x) May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants