View / add support for viewport extent constraint
This introduces a breaking change: The `extent` view option now constrains the whole viewport and not just the view center. The option `constrainOnlyCenter` was added to keep the previous behaviour. Constraining the whole viewport and not only the view center means that the center and resolution constraints must be applied with a knowledge of the viewport size.
This commit is contained in:
9
examples/extent-constrained.html
Normal file
9
examples/extent-constrained.html
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: Constrained Extent
|
||||
shortdesc: Example of a view with a constrained extent.
|
||||
docs: >
|
||||
This map has a view that is constrained in an extent. This is done using the `extent` view option. Please note that specifying `restrictOnlyCenter: true` would only apply the extent restriction to the view center.
|
||||
tags: "view, extent, constrain, restrict"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
Reference in New Issue
Block a user