There are some quite important differences to make an equivalent map version of the Zoomify sample. Let's see how:
Copy the sample from the Zoomify example previously created into the usual
sandbox
directory.Change the URL to
/assets/data/1797-map-of-Dublin.jpg
.Set the
imgCenter
variable to[imgWidth / 2, imgHeight / 2];
.Remove the line code,
var crossOrigin = 'anonymous';
.Replace the
ol.layer.Tile
withol.layer.Image
.Then, change the source variable with the following code:
var source = new ol.source.ImageStatic({ attributions: [ new ol.Attribution({ html: '© <a href="https://commons.wikimedia.org/wiki/File:1797-map-of-Dublin.jpg#Summary">Wikipedia Commons</a>' }) ], url: url, imageSize: [imgWidth, imgHeight], projection: proj, imageExtent: proj.getExtent() });
Open your browser and you will see the same image you already got from the Zoomify sample, but you will get a less smooth...