October 21, 2024
Chicago 12, Melborne City, USA
javascript

Browser-based “one dimensional” pan/zoom for large image


I would like to display a very large PNG image (height about 1 million pixels, width only a few hundred pixels) in the browser in such a way that users can pan and zoom it. The image would be too much to handle for the browser. So I want to cut it into smaller tiles. Basically like OpenStreetMap, Apple/Google Maps etc. do.

The special thing here is that the image must only be zoomed and scrolled along the Y-axis. The X-axis should always remain the same, i.e. its scaling must not change and it must not be panned. (The image is will be "compressed" vertically when zooming out.)

I don’t necessarily want to reinvent the wheel (i.e. roll my own implementation with a canvas element and JavaScript) and wonder if there is a ready-made solution for this problem somewhere. With Leaflet and OpenSeadragon I have not found any option to restrict zoom and pan to one axis.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video