Fork me on GitHub

OpenSeadragon 5.0.0

example: openstreetmap tile support

OpenStreetMap is a popular tile source used in many online geographic mapping specifications. You can read more about it here and details about the tile set here.

OpenSeadragon supports OpenStreetMap tiles thanks to Rainer Simon.

Inline Configuration for OSM

Inline configuration couldn't be much simpler for using OpenStreetMaps as a tile source.

Example Inline Configuration for OSM

Configuration is done via the tileSources option (or programmatically). Because of its rich levels and depth, we slow down the zoomPerScroll option a little, wrap horizontally, and hide the navigator. Also we set a lower minimum zoom image ratio to allow the user to pull back just a little further.

OpenSeadragon({
    ...
    showNavigator:      false,
    wrapHorizontal:     true,
    zoomPerScroll:      1.2,
    minZoomImageRatio:  0.5,
    tileSources:   [{
        type: 'openstreetmaps'
    }]
    ...
});