Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m thankful

Final updates to Seadragon Ajax and Zoom.it

Live Labs moved to Bing this past November (announcement), and we shared that we would be handing our projects off to other teams at Microsoft (details). Here are the final updates!

--

Seadragon Ajax has now been fully transitioned to the Expression Gallery. The downloadable zip there has not just the full library and button images, but also the raw source code for you to modify as needed!

Before handing it off, we were able to fix some key bugs, add some cool new features, and generally polish the experience! We shipped some of these updates in November, and the rest this past month. Here are the highlights:




  • The rare but annoying tile flickering in Chrome was fixed.

                                                                                                                                    




  • The pan constraint was improved and tightened; Config.visibilityRatio now defaults to 0.8 instead of 0.5 (even a value of 1.0 will now work!).

                                                                                                                                    




  • The pan constraint now takes place while the user drags the mouse instead of only after. You can revert to the old behavior by setting the new Config.constrainDuringPan flag to false.

                    

                                                                                                                                    




  • Zooming was changed to be logarithmic; zooming in now has the same "springiness" as zooming out. You can revert to the old behavior by setting the new Config.logarithmicZoom flag to false.

                                                                                                                                    




  • The Viewport class now has several new methods for getting the constrained pan and zoom values, like getMinZoom() and getMaxZoom().

                                                                                                                                    




  • The Viewer class now exposes the container element passed to its constructor via the new container property.

                                                                                                                                    




  • The Viewer class now exposes the MouseTracker instance powering its pan/zoom interactions via the new tracker property. This lets you more easily tweak the default mouse navigation without having to re-implement it yourself.

                                                                                                                                    




  • The Viewer.openDzi() method now accepts a JSON object with the DZI's info. The format matches the DZI object returned by the Zoom.it API; see the API's JavaScript quickstart for an example of this in action.

                                                                                                                                    




  • The Viewer class now has a new showMessage() method that makes it easy to show horizontally- and vertically-centered messages inside the viewer, just like the default "Loading..." and error messages.

                                                                                                                                    




  • The code is now built via the Microsoft Ajax Minifier, resulting in code size savings of over 40%! (It was previously 84 KB; now it's 48 KB.)



These updates make up the new and likely final v0.8.9. Not all of these changes have made it into the documentation on the Expression Gallery website, but the documentation in the zip is fully up-to-date.

From this point on, we highly recommend hosting Seadragon Ajax yourself via the Expression Gallery download. The version hosted on Seadragon.com will continue to work, but we have retired the Seadragon.com domain, so it may go offline in the future.

--

Zoom.it has been handed over to the Silverlight team, but we were able to push out some exciting new features to the Zoom.it API beforehand! Here are the highlights:




  • There is now a new /v1/dzi endpoint in addition to the existing /v1/content endpoint; instead of returning the full content info, it returns only the streamlined DZI info! Like /v1/content, you can query /v1/dzi by ID or by by URL. In both cases:

                    

                                                                                                                                    


  • If the DZI is ready, the response will be a 301 Redirect to the actual DZI file, but the info will be in the response body.

  • If the DZI failed, the response will be a 404 Not Found.

  • If the DZI is still being made, the response will also be a 404 Not Found, but there will be an additional Retry-After header (in the non-RESTful case, this translates to a new retryAfter property).



                                                                                                                                

An easy way to think about this is that you're requesting the DZI directly. If the DZI is ready, we redirect you to it. If conversion failed, it doesn't exist. If we're still converting, it still doesn't exist, but only temporarily, so we tell you to try again soon.
                

                                                                                                                                

Here are two non-RESTful examples to illustrate all of this: /v1/content/h?format=xml vs. /v1/dzi/h?format=xml, and /v1/content/dff?format=xml vs. /v1/dzi/dff?format=xml. (You may have to view source on those if your browser doesn't render XML.)
                

                                                                                                                                
This new endpoint is great lightweight option if you just want to know whether your DZI is ready or not. It's especially useful when combined with the next two features...

                

                                                                                                                                





  • Zoom.it now supports webpage thumbnailing: instead of rendering the entire webpage, you can ask it to render just the first 1024x768 pixels! To use this feature, just wrap your URL with zoomit://thumbnail/?url=<url>.


                    

                                                                                                                                     


    If you wanted to thumbnail en.wikipedia.org/wiki/Microsoft, for example, you would send a URL of zoomit://thumbnail/?url=http://en.wikipedia.org/wiki/Microsoft. Here's such an API request, and here's the resulting image.


                    

                                                                                                                                    


    (You can compare this with the regular URL: API request and resulting image.)


                    

                                                                                                                                    


    Zoom.it is optimized for doing this thumbnailing very quickly — on the order of seconds. For example, we disable JavaScript (so the page loads quicker), and we use 1024px tiles with no overlap (resulting in only one tile per level).


                    

                                                                                                                                    

    Since the resulting image is both fast and closer to what a user would see in their browser window, this is a great candidate for search and browse scenarios. And that leads to our last feature...

                                                                                                                                    





  • Zoom.it now has a batch API: you can now submit multiple URLs in one request and get back their corresponding content or DZI infos in one response!


                    

                                                                                                                                    


    To make a batch request by ID, simply specify multiple comma-separated IDs, e.g. /v1/content/h,dff,zoom?format=xml. To make a batch request by URL, change your GET request to POST, and move your ?url= parameters to the request body:


                    

                                                                                                                                    

    <strong>POST</strong> /v1/content/?format=xml HTTP/1.1
    Content-Type: <a href="http://en.wikipedia.org/wiki/Percent-encoding#The_application.2Fx-www-form-urlencoded_type" target="_blank">application/x-www-form-urlencoded</a>

    <strong>url=&lt;url1&gt;&amp;url=&lt;url2&gt;&amp;url=&lt;url3&gt;&amp;...</strong>


                                                                                                                                    


    We can't provide a link to an example request by URL here, since links use GET. You can create a simple HTML form instead:


                    

                                                                                                                                    

    &lt;form action="http://api.zoom.it/v1/content/" method="POST"&gt;
    &lt;input name="url" value="<strong>{url1}</strong>" /&gt;
    &lt;input name="url" value="<strong>{url2}</strong>" /&gt;
    &lt;input name="url" value="<strong>{url3}</strong>" /&gt;
    &lt;input type="submit" value="Make request" /&gt;
    &lt;/form&gt;


                                                                                                                                    


    Note that this API works with the /v1/dzi endpoint and thumbnail URLs, too. In all cases, the batch response is a 200 OK with a responses collection/array as its body, where each element in the collection/array is a non-RESTful response object.


                    

                                                                                                                                    


    Since the batch API requires POST and JSONP is limited to GET, we implemented cross-domain Ajax support via the recent CORS standard; this allows JavaScript clients to use XMLHttpRequest or XDomainRequest to POST to our domain.


                    

                                                                                                                                    


    This batch API is thus a great option for all clients, and it should make apps much more efficient when dealing with multiple images.




  • We hope you enjoy these new features, and we'd love to hear what you think. We unfortunately weren't able to document these features more formally, so if you have any questions, don't hesitate to ask.

    --

    Going forward, both Seadragon Ajax and Zoom.it will continue to be available for the foreseeable future through the Expression and Silverlight teams, but this is likely the last update to each from our side.

    We thank you again for your support throughout the years. All the best!
    Reply