Merge pull request #2847 from elemoine/zoomify-example
Constrain center in zoomify example
This commit is contained in:
@@ -45,6 +45,9 @@ var map = new ol.Map({
|
|||||||
view: new ol.View({
|
view: new ol.View({
|
||||||
projection: proj,
|
projection: proj,
|
||||||
center: imgCenter,
|
center: imgCenter,
|
||||||
zoom: 0
|
zoom: 0,
|
||||||
|
// constrain the center: center cannot be set outside
|
||||||
|
// this extent
|
||||||
|
extent: [0, -imgHeight, imgWidth, 0]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user