I was just hacking around, trying to test some work I'd done and realized that you can have annotation layers with OpenLayers, just add another map, and tie them together!

So that's 2 OpenLayers.Map() instances. What makes this easy is the new Map.panTo() methods in OpenLayers 2.6 (which is in release candidate 1). So, the top map registers for 'move' and 'zoomend' events with callbacks that update the bottom map with the position/zoom of the top map.
That's it! And layers of annotation are available, along with the slippy map. OpenLayers continues to amaze.
That site with the linked maps is here.
2 comments:
Your AJAX-ed genome browser looks very cool, is it a part of GeVO? Some time ago, I stumbled upon another browser (you may already know), X:map (http://xmap.picr.man.ac.uk/), notice that it supports panning both horizontally and vertically, although there's no functionality gain there.
it's used in gevo:
http://toxic.berkeley.edu/CoGe/GeLo.pl?z=4&x=10000&ds=34465&chr=1
however, it's licensed (MIT) separately and completely independent, but the demos all use GeVO images.
i've seen XMap. and i've done a fair bit of hacking on googlemaps myself.
But, you cant beat openlayers functionality, community, and general awesome-ness. and now that the vector stuff is getting more and more impressive, i'd like to make use of that.
Post a Comment