Skip to content

Commit 99462d3

Browse files
committed
Website updates
1 parent 2d1e92b commit 99462d3

15 files changed

+796
-32
lines changed

dist/en/main/apidoc/module-ol_View.html

Lines changed: 643 additions & 21 deletions
Large diffs are not rendered by default.

dist/en/main/apidoc/navigation.tmpl.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7730,6 +7730,16 @@
77307730
<li data-name="viewobjecteventtypes"><a href="module-ol_View.html#~ViewObjectEventTypes">ViewObjectEventTypes</a>
77317731
<li data-name="viewoptions"><a href="module-ol_View.html#~ViewOptions">ViewOptions</a>
77327732
<li data-name="viewstatelayerstateextent"><a href="module-ol_View.html#~ViewStateLayerStateExtent">ViewStateLayerStateExtent</a>
7733+
<li data-name="viewtransform"><a href="module-ol_View.html#~ViewTransform">ViewTransform</a>
7734+
</ul>
7735+
</div>
7736+
<div class="member-list" data-type="methods">
7737+
<span class="subtitle">Methods</span>
7738+
<ul>
7739+
<li data-name="getview"><a href="module-ol_View.html#.getView">getView</a>
7740+
<li data-name="withextentcenter"><a href="module-ol_View.html#.withExtentCenter">withExtentCenter</a>
7741+
<li data-name="withlowerresolutions"><a href="module-ol_View.html#.withLowerResolutions">withLowerResolutions</a>
7742+
<li data-name="withzoom"><a href="module-ol_View.html#.withZoom">withZoom</a>
77337743
</ul>
77347744
</div>
77357745
<li class="item item-module" data-longname="module:ol/webgl" data-name="ol/webgl">

dist/en/main/examples/cog.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ <h5 class="modal-title" id="tag-example-title"></h5>
119119
<div class="row-fluid">
120120
<h5 class="source-heading">main.js</h5>
121121
<pre><code id="example-js-source" class="language-js">import Map from &#x27;ol/Map.js&#x27;;
122+
import {getView, withExtentCenter, withHigherResolutions} from &#x27;ol/View.js&#x27;;
122123
import TileLayer from &#x27;ol/layer/WebGLTile.js&#x27;;
123124
import GeoTIFF from &#x27;ol/source/GeoTIFF.js&#x27;;
124125

@@ -137,7 +138,7 @@ <h5 class="source-heading">main.js</h5>
137138
source: source,
138139
}),
139140
],
140-
view: source.getView(),
141+
view: getView(source, withHigherResolutions(1), withExtentCenter()),
141142
});
142143
</code></pre>
143144
</div>

dist/en/main/examples/cog.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/cog.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/tiled-layer-rendering-in-offscreen-canvas.worker.worker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/View.d.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,45 @@ export function createRotationConstraint(options: ViewOptions): import("./rotati
2626
* @return {boolean} The animation involves no view change.
2727
*/
2828
export function isNoopAnimation(animation: Animation): boolean;
29+
/**
30+
* @typedef {function(ViewOptions):ViewOptions} ViewTransform
31+
*/
32+
/**
33+
* Adds higher resolutions.
34+
* @param {number} num The number of higher resolution levels to use.
35+
* @return {ViewTransform} A view transform.
36+
*/
37+
export function withHigherResolutions(num: number): ViewTransform;
38+
/**
39+
* Adds lower resolutions.
40+
* @param {number} num The number of lower resolution levels to use.
41+
* @return {ViewTransform} A view transform.
42+
* @api
43+
*/
44+
export function withLowerResolutions(num: number): ViewTransform;
45+
/**
46+
* Applies a center based on the extent.
47+
* @return {ViewTransform} A view transform.
48+
* @api
49+
*/
50+
export function withExtentCenter(): ViewTransform;
51+
/**
52+
* Applies a zoom level.
53+
* @param {number} z The zoom level.
54+
* @return {ViewTransform} A view transform.
55+
* @api
56+
*/
57+
export function withZoom(z: number): ViewTransform;
58+
/**
59+
* Applies a series of transforms to a view that is resolved from a source.
60+
* @param {import("./source/Source.js").default} source The source.
61+
* @param {...ViewTransform} transforms The transforms to apply.
62+
* @return {Promise<ViewOptions>} The view options.
63+
* @api
64+
*/
65+
export function getView(source: import("./source/Source.js").default, ...transforms: ViewTransform[]): Promise<ViewOptions>;
2966
export default View;
67+
export type ViewTransform = (arg0: ViewOptions) => ViewOptions;
3068
/**
3169
* An animation configuration
3270
*/

0 commit comments

Comments
 (0)