Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
--- | ||
layout: example.html | ||
title: PinchZoom | ||
shortdesc: A basic example for a pinch zoom with a restriction to integer zooms. | ||
title: Pinch Zoom | ||
shortdesc: Restrict pinch zooming to integer zoom levels. | ||
docs: > | ||
<p>Use a pinch zoom gesture to zoom the map. | ||
After the gesture the map will zoomed to the next whole-number zoom level with an animtation.</p> | ||
By default, the `ol.interaction.PinchZoom` can leave the map at fractional zoom levels. | ||
If instead you want to constrain pinch zooming to integer zoom levels, set | ||
<code>constrainResolution: true</code> when constructing the interaction. | ||
tags: "pinch, zoom, interaction" | ||
--- | ||
<div id="map" class="map"></div> |