openseadragon / bookmark-url

An OpenSeadragon plugin for updating the zoom/pan in the page URL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bookmark URL

An OpenSeadragon plugin for updating the zoom/pan (and optionally the sequence "page") in the web page URL.

Usage

Create your OpenSeadragon viewer and then:

viewer.bookmarkUrl(); or viewer.bookmarkUrl({ trackPage: true });

It'll take the viewer to wherever the web page's hash parameters point, and it'll update the page URL with hash parameters. The optional trackPage parameter adds the active "page" of an OSD sequence to the hash parameters.

You can watch for the bookmark-url-change event on the viewer to be notified when the URL changes (the url property of the event is the new URL).

See demo.html for an example. You can also see it in the wild here: https://minecraft.greener.ca/byblos/map/overworld/

Sponsored By

Thanks to @jason-green-io for the generous support!

About

An OpenSeadragon plugin for updating the zoom/pan in the page URL.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 72.1%Language:HTML 27.9%