-
Notifications
You must be signed in to change notification settings - Fork 22.9k
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
d3.geom.tile #486
Comments
Still an interesting idea from all angles. I'd love to see a modular toolkit for completely bespoke map work, sort of a set "build your own slippy map" components. Some sort of middle ground between Polymaps (standard Mercator slippy map) and just hooking d3.geo.projection to d3.svg (building navigation from scratch). I'm not sure how much use generic projections would be for d3.geom.tile. I've done a fair share of "R&D" going beyond Mercator and there are some significant challenges. Interrupted projections, flexible meridians, oblique/polar situations, etc. all end up being very difficult to capture in an approachable, "simple" API. (That said, I'd love to see it done or have opportunity to work on it. Problems worthy of attack…) Need to spend some more time with the existing geo stuff in d3, but watching this ticket with anticipation :-) |
One other thing, been curious working with Polymaps, and seeing it come up again here: why implement a queue on the JavaScript side, rather than simply letting the browser to handle connections as it sees fit? |
For those of us following along at home, looks like this is progressing here: https://github.com/d3/d3-plugins/tree/master/geo/tile |
Need to cook up a demo next that shows how to determine the appropriate scale & translate for the d3.geo.tile given a (typically mercator) projection… overlaying a GeoJSON / TopoJSON on static map tiles. |
Boom! |
Exciting! @natevw regarding the javascript queue for loading images in tile-based maps, it's because:
Basically, a client-side queue allows for fine control over canceling images and allows you to throttle/pause loading when you're animating or interacting. Mine are always a bit of a hack but I think @mbostock has it down to about 5 lines now ;) |
I'd like to see something like pixymaps built-in to the d3.geom package. One possibility is that, given a rectangular display area (say, a DIV element accessed via selection.call) and a d3.geo.projection, d3.geom.tile could compute which image tiles should be visible in that area, fetch them via a queue, and render them to a canvas with a CSS transform.
I'm not 100% set on the d3.geo.projection dependency: I'm not sure exactly how coordinates get computed for projections other than spherical mercator, and d3.geom.tile should support arbitrary tile quadtrees rather than just maps. So perhaps there's another component needed which converts locations to coordinates, and d3.geom.tile could use that rather than the projection.
The text was updated successfully, but these errors were encountered: