Comments (10)
Interesting application. I'm confident you could do this in Polymaps, but getting reasonable performance if 200+ layers are visible simultaneously may be tricky.
Are all the layers visible at the same time? The first thing you could experiment with is toggling the visibility of each layer when the map moves, so that if the layer is not visible with the viewport, you hide the layer and Polymaps won't draw any of the tiles (even though the tiles are invisible with about:blank).
The next thing I would try is to customize the layer implementation (see nypl.image
in the "transform" example) to use a blank <svg:g>
element rather than an image with the "about:blank" URL. I'm not quite sure how the browser handles displaying an image with the "about:blank" URL, so I'm guessing that an empty group element will be displayed more efficiently than an image.
Lastly, you could write your own layer implementation from scratch, perhaps as a wrapper on top of po.layer
to get the lazy-loading you desire. Or perhaps we could figure out a way for the tile.element
to be null for sparse tilesets.
from polymaps.
Thanks, turning off the visibility worked a treat when layers are off-screen, and performance is fine when zooming out and viewing all layers at once. I'll give you a sneak preview once I've uploaded the 5GB of tiles! I've also just committed an optimisation to allow null
URLs instead of using about:blank
as this seems slightly faster in Firefox: 5aa2717
Edit: added link to commit.
from polymaps.
Good stuff. I pulled your commit into my personal fork. It'll make the official release in a few weeks.
from polymaps.
Okay, sneak preview is finally up: http://www.jasondavies.com/voynich/
The source code is on GitHub too: http://github.com/jasondavies/voynich
I originally had code to show everything on one map as discussed above (see the commit history if you're interested). However, I personally prefer using a navigation menu to browse between scans, so this is turned off for now.
from polymaps.
Nice! My thought, if you still wanted to have all the scans visible simultaneously, is to implement them as a single layer. You could use my Hilbert curve code to figure out how to determine which scan to display based on the tile coordinates: http://bl.ocks.org/597287
from polymaps.
You could still use bookmarks for navigation, which would move the map center, rather than replacing the layer.
from polymaps.
Yes, I'm still planning to put it all in one map. Still need to figure out the Mercator conversion and I should have it working.
from polymaps.
I'd prefer to have each scan as a separate layer so that I can move flush with each other as they have varying widths. My experiments with this were encouraging.
from polymaps.
You can make them flush in a single layer even if they have varying widths, though that would certainly make the tile coordinate layout more challenging. The only thing you couldn't do, as a single layer, would be to have overlapping scans.
from polymaps.
Ah, interesting. I may also want to scale layers though as I think I can get the original scan resolutions, so I can have a uniform zoom scale for all scans. I think that would need separate layers?
I know separate layers will work anyway, sounds easier than using a custom tile coordinate layout :-)
from polymaps.
Related Issues (20)
- Upgrade polymaps.org to 2.5.1 -- Currently examples breaking in IE9/Firefox HOT 2
- 'show' event is called with bad data the first time
- How to disable wrap-around? HOT 9
- Load function should be called with layer as context
- Polymaps has stopped working in Firefox HOT 3
- Maps start jumping in Chrome when dragging
- Custom Coordinate systems or Projects? HOT 2
- Round up in fractional zooming
- Examples don't work in firefox HOT 4
- [enhancement] Add missing bower.json. HOT 1
- SOURCE CODE FOR IMAGE MAP USED IN NEWSPAPER HOT 1
- Attaching event listeners to geoJson layer HOT 1
- Navigation image viewport
- Overlays
- Examples on http://polymaps.org/ex/ not resizing. HOT 3
- how to add custom icons on locations and toolip on those
- Integrating polyMaps with angular2 webpack
- Using Polymaps with Mapbox
- Examples on website no longer work because of CORS
- Is polymaps dead ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polymaps.