Compare commits

..

14 Commits

Author SHA1 Message Date
Tim Schaub
9ec623380a Merge pull request #8419 from tschaub/release-v5.1.3
Release v5.1.3
2018-07-21 08:45:16 -07:00
Tim Schaub
28104527b0 Updates for v5.1.3 2018-07-21 09:44:10 -06:00
Tim Schaub
b50bc1febf Merge pull request #8417 from tschaub/bad-info
Minor doc updates
2018-07-21 08:34:01 -07:00
Andreas Hocevar
c046c2a1ba Merge pull request #8418 from ahocevar/classdesc-constructor-api
Set api annotation on classdesc, not constructor
2018-07-21 17:33:30 +02:00
ahocevar
bbe0a66d07 Set api annotation on classdesc, not constructor 2018-07-21 17:25:22 +02:00
Tim Schaub
d8b290966b Tracking 2018-07-21 09:11:30 -06:00
Tim Schaub
0edb39c8ab Single quote instead of backtick 2018-07-21 08:40:03 -06:00
Tim Schaub
f0ffb48633 Update concepts 2018-07-21 08:37:38 -06:00
Tim Schaub
171195a836 Remove broken link to sources 2018-07-21 08:24:44 -06:00
Tim Schaub
2767ddfdc7 Merge pull request #8414 from tschaub/release-v5.1.2
Updates for 5.1.2
2018-07-20 19:04:08 -07:00
Tim Schaub
cd85e30d08 Updates for 5.1.2 2018-07-20 20:03:15 -06:00
Tim Schaub
139fcd7bae Merge pull request #8413 from tschaub/jsdoc-fix
Remove extra curly in type
2018-07-20 19:00:34 -07:00
Tim Schaub
2a04415264 Remove extra curly in type 2018-07-20 19:57:49 -06:00
Tim Schaub
515eca797f Correct link to release notes 2018-07-20 19:44:04 -06:00
110 changed files with 562 additions and 433 deletions

View File

@@ -1,3 +1,3 @@
# 5.1.1
The 5.1.1 release is a patch to include the readme in the package. See the [5.1.0 notes](https://github.com/openlayers/openlayers/releases/tag/v5.0.3) for detail on the 5.1 release.
The 5.1.1 release is a patch to include the readme in the package. See the [5.1.0 notes](https://github.com/openlayers/openlayers/releases/tag/v5.1.0) for detail on the 5.1 release.

5
changelog/v5.1.2.md Normal file
View File

@@ -0,0 +1,5 @@
# 5.1.2
The 5.1.2 release is a patch to fix the API docs. See the [5.1.0 notes](https://github.com/openlayers/openlayers/releases/tag/v5.1.0) for detail on the 5.1 release.
* [#8413](https://github.com/openlayers/openlayers/pull/8413) - Remove extra curly in type ([@tschaub](https://github.com/tschaub))

6
changelog/v5.1.3.md Normal file
View File

@@ -0,0 +1,6 @@
# 5.1.3
The 5.1.3 release is a patch to fix the API docs and the legacy full build. See the [5.1.0 notes](https://github.com/openlayers/openlayers/releases/tag/v5.1.0) for detail on the 5.1 release.
* [#8417](https://github.com/openlayers/openlayers/pull/8417) - Minor doc updates ([@tschaub](https://github.com/tschaub))
* [#8418](https://github.com/openlayers/openlayers/pull/8418) - Set api annotation on classdesc, not constructor ([@ahocevar](https://github.com/ahocevar))

View File

@@ -4,6 +4,13 @@ var version = obj.packageInfo.version;
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-2577926-1');
</script>
<meta charset="utf-8">
<title>OpenLayers v<?js= version ?> API - <?js= title ?></title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>

View File

@@ -130,7 +130,7 @@ The `layers: [ ... ]` array is used to define the list of layers available in th
]
```
Layers in OpenLayers are defined with a type (Image, Tile or Vector) which contains a source. The source is the protocol used to get the map tiles. You can consult the list of [available layer sources here](/en/{{ latest }}/apidoc/ol.source.html)
Layers in OpenLayers are defined with a type (Image, Tile or Vector) which contains a source. The source is the protocol used to get the map tiles.
The next part of the `Map` object is the `View`. The view allows to specify the center, resolution, and rotation of the map. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.

View File

@@ -6,19 +6,26 @@ layout: doc.hbs
# Basic Concepts
## Map
The core component of OpenLayers is the map (`Map`). It is rendered to a `target` container (e.g. a `div` element on the web page that contains the map). All map properties can either be configured at construction time, or by using setter methods, e.g. `setTarget()`.
The core component of OpenLayers is the map (`ol/Map`). It is rendered to a `target` container (e.g. a `div` element on the web page that contains the map). All map properties can either be configured at construction time, or by using setter methods, e.g. `setTarget()`.
The markup below could be used to create a `<div>` that contains your map.
```xml
<div id="map" style="width: 100%, height: 400px"></div>
<script>
```
The script below constructs a map that is rendered in the `<div>` above, using the `map` id of the element as a selector.
```js
import Map from 'ol/Map';
var map = new Map({target: 'map'});
</script>
```
## View
`Map` is not responsible for things like center, zoom level and projection of the map. Instead, these are properties of a `View` instance.
The map is not responsible for things like center, zoom level and projection of the map. Instead, these are properties of a `ol/View` instance.
```js
import View from 'ol/View';
@@ -35,7 +42,8 @@ The `zoom` option is a convenient way to specify the map resolution. The availab
## Source
To get remote data for a layer, OpenLayers uses `source/Source` subclasses. These are available for free and commercial map tile services like OpenStreetMap or Bing, for OGC sources like WMS or WMTS, and for vector data in formats like GeoJSON or KML.
To get remote data for a layer, OpenLayers uses `ol/source/Source` subclasses. These are available for free and commercial map tile services like OpenStreetMap or Bing, for OGC sources like WMS or WMTS, and for vector data in formats like GeoJSON or KML.
```js
import OSM from 'ol/source/OSM';
@@ -44,15 +52,13 @@ To get remote data for a layer, OpenLayers uses `source/Source` subclasses. Thes
```
## Layer
A layer is a visual representation of data from a `source`. OpenLayers has four basic types of layers: `layer/Tile`, `layer/Image`, `layer/Vector` and `layer/VectorTile`.
`layer/Tile` is for layer sources that provide pre-rendered, tiled images in grids that are organized by zoom levels for specific resolutions.
A layer is a visual representation of data from a `source`. OpenLayers has four basic types of layers:
`layer/Image` is for server rendered images that are available for arbitrary extents and resolutions.
`layer/Vector` is for vector data that is rendered client-side.
`layer/VectorTile` is for tiled vector data that is rendered client-side.
* `ol/layer/Tile` - Renders sources that provide tiled images in grids that are organized by zoom levels for specific resolutions.
* `ol/layer/Image` - Renders sources that provide map images at arbitrary extents and resolutions.
* `ol/layer/Vector` - Renders vector data client-side.
* `ol/layer/VectorTile` - Renders data that is provided as vector tiles.
```js
import TileLayer from 'ol/layer/Tile';
@@ -63,12 +69,9 @@ A layer is a visual representation of data from a `source`. OpenLayers has four
## Putting it all together
The above snippets can be combined into a single script that renders a map with a single tile layer:
The above snippets can be conflated to a self contained map configuration with view and layers:
```xml
<div id="map" style="width: 100%, height: 400px"></div>
<script>
```js
import Map from 'ol/Map';
import View from 'ol/View';
import OSM from 'ol/source/OSM';
@@ -76,7 +79,7 @@ The above snippets can be conflated to a self contained map configuration with v
new Map({
layers: [
new TileLayer({source: new ol.source.OSM()})
new TileLayer({source: new OSM()})
],
view: new View({
center: [0, 0],
@@ -84,5 +87,4 @@ The above snippets can be conflated to a self contained map configuration with v
}),
target: 'map'
});
</script>
```

View File

@@ -12,9 +12,9 @@ The view in any Proj4js supported coordinate reference system is possible and pr
# Usage
The API usage is very simple. Just specify proper projection (e.g. using [EPSG](https://epsg.io) code) on `ol/View`:
```js
import {Map, View} from `ol`;
import TileLayer from `ol/layer/Tile`;
import TileWMS from `ol/source/TileWMS`;
import {Map, View} from 'ol';
import TileLayer from 'ol/layer/Tile';
import TileWMS from 'ol/source/TileWMS';
var map = new Map({
target: 'map',

View File

@@ -1,6 +1,13 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-2577926-1');
</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">

View File

@@ -1,6 +1,6 @@
{
"name": "ol",
"version": "5.1.1",
"version": "5.1.3",
"description": "OpenLayers mapping library",
"keywords": [
"map",

View File

@@ -4,6 +4,7 @@
import {UNDEFINED} from './functions.js';
/**
* @classdesc
* Objects that need to clean up after themselves.
*/
class Disposable {

View File

@@ -53,7 +53,6 @@ import Style from './style/Style.js';
* @api
*/
class Feature extends BaseObject {
/**
* @param {module:ol/geom/Geometry|Object.<string, *>=} opt_geometryOrProperties
* You may pass a Geometry object directly, or an object literal containing

View File

@@ -7,6 +7,7 @@ import Spatial from '../filter/Spatial.js';
* @classdesc
* Represents a `<Contains>` operator to test whether a geometry-valued property
* contains a given geometry.
* @api
*/
class Contains extends Spatial {
@@ -15,7 +16,6 @@ class Contains extends Spatial {
* @param {!module:ol/geom/Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @api
*/
constructor(geometryName, geometry, opt_srsName) {

View File

@@ -6,6 +6,7 @@ import Comparison from '../filter/Comparison.js';
/**
* @classdesc
* Represents a `<During>` comparison operator.
* @api
*/
class During extends Comparison {
@@ -13,7 +14,6 @@ class During extends Comparison {
* @param {!string} propertyName Name of the context property to compare.
* @param {!string} begin The begin date in ISO-8601 format.
* @param {!string} end The end date in ISO-8601 format.
* @api
*/
constructor(propertyName, begin, end) {
super('During', propertyName);

View File

@@ -6,6 +6,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
/**
* @classdesc
* Represents a `<PropertyIsEqualTo>` comparison operator.
* @api
*/
class EqualTo extends ComparisonBinary {
@@ -13,7 +14,6 @@ class EqualTo extends ComparisonBinary {
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @api
*/
constructor(propertyName, expression, opt_matchCase) {
super('PropertyIsEqualTo', propertyName, expression, opt_matchCase);

View File

@@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
/**
* @classdesc
* Represents a `<PropertyIsGreaterThan>` comparison operator.
* @api
*/
class GreaterThan extends ComparisonBinary {
/**
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @api
*/
constructor(propertyName, expression) {
super('PropertyIsGreaterThan', propertyName, expression);

View File

@@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
/**
* @classdesc
* Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
* @api
*/
class GreaterThanOrEqualTo extends ComparisonBinary {
/**
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @api
*/
constructor(propertyName, expression) {
super('PropertyIsGreaterThanOrEqualTo', propertyName, expression);

View File

@@ -7,6 +7,7 @@ import Spatial from '../filter/Spatial.js';
* @classdesc
* Represents a `<Intersects>` operator to test whether a geometry-valued property
* intersects a given geometry.
* @api
*/
class Intersects extends Spatial {

View File

@@ -6,6 +6,7 @@ import Comparison from '../filter/Comparison.js';
/**
* @classdesc
* Represents a `<PropertyIsBetween>` comparison operator.
* @api
*/
class IsBetween extends Comparison {
@@ -13,7 +14,6 @@ class IsBetween extends Comparison {
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} lowerBoundary The lower bound of the range.
* @param {!number} upperBoundary The upper bound of the range.
* @api
*/
constructor(propertyName, lowerBoundary, upperBoundary) {
super('PropertyIsBetween', propertyName);

View File

@@ -6,6 +6,7 @@ import Comparison from '../filter/Comparison.js';
/**
* @classdesc
* Represents a `<PropertyIsLike>` comparison operator.
* @api
*/
class IsLike extends Comparison {
@@ -20,7 +21,6 @@ class IsLike extends Comparison {
* @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive?
* @api
*/
constructor(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
super('PropertyIsLike', propertyName);

View File

@@ -6,12 +6,12 @@ import Comparison from '../filter/Comparison.js';
/**
* @classdesc
* Represents a `<PropertyIsNull>` comparison operator.
* @api
*/
class IsNull extends Comparison {
/**
* @param {!string} propertyName Name of the context property to compare.
* @api
*/
constructor(propertyName) {
super('PropertyIsNull', propertyName);

View File

@@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
/**
* @classdesc
* Represents a `<PropertyIsLessThan>` comparison operator.
* @api
*/
class LessThan extends ComparisonBinary {
/**
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @api
*/
constructor(propertyName, expression) {
super('PropertyIsLessThan', propertyName, expression);

View File

@@ -6,13 +6,13 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
/**
* @classdesc
* Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.
* @api
*/
class LessThanOrEqualTo extends ComparisonBinary {
/**
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @api
*/
constructor(propertyName, expression) {
super('PropertyIsLessThanOrEqualTo', propertyName, expression);

View File

@@ -6,12 +6,12 @@ import Filter from '../filter/Filter.js';
/**
* @classdesc
* Represents a logical `<Not>` operator for a filter condition.
* @api
*/
class Not extends Filter {
/**
* @param {!module:ol/format/filter/Filter} condition Filter condition.
* @api
*/
constructor(condition) {

View File

@@ -6,6 +6,7 @@ import ComparisonBinary from '../filter/ComparisonBinary.js';
/**
* @classdesc
* Represents a `<PropertyIsNotEqualTo>` comparison operator.
* @api
*/
class NotEqualTo extends ComparisonBinary {
@@ -13,7 +14,6 @@ class NotEqualTo extends ComparisonBinary {
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @api
*/
constructor(propertyName, expression, opt_matchCase) {
super('PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);

View File

@@ -6,12 +6,12 @@ import LogicalNary from '../filter/LogicalNary.js';
/**
* @classdesc
* Represents a logical `<Or>` operator between two ore more filter conditions.
* @api
*/
class Or extends LogicalNary {
/**
* @param {...module:ol/format/filter/Filter} conditions Conditions.
* @api
*/
constructor(conditions) {
const params = ['Or'].concat(Array.prototype.slice.call(arguments));

View File

@@ -7,6 +7,7 @@ import Spatial from '../filter/Spatial.js';
* @classdesc
* Represents a `<Within>` operator to test whether a geometry-valued property
* is within a given geometry.
* @api
*/
class Within extends Spatial {
@@ -15,7 +16,6 @@ class Within extends Spatial {
* @param {!module:ol/geom/Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @api
*/
constructor(geometryName, geometry, opt_srsName) {
super('Within', geometryName, geometry, opt_srsName);

View File

@@ -15,12 +15,12 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js';
/**
* @classdesc
* Allows the user to zoom by double-clicking on the map.
* @api
*/
class DoubleClickZoom extends Interaction {
/**
* @param {module:ol/interaction/DoubleClickZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {
super({

View File

@@ -83,13 +83,13 @@ class DragAndDropEvent extends Event {
/**
* @classdesc
* Handles input of vector data by drag and drop.
* @api
*
* @fires module:ol/interaction/DragAndDrop~DragAndDropEvent
*/
class DragAndDrop extends Interaction {
/**
* @param {module:ol/interaction/DragAndDrop~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -107,11 +107,11 @@ class DragBoxEvent extends Event {
* This interaction is only supported for mouse devices.
*
* @fires module:ol/interaction/DragBox~DragBoxEvent
* @api
*/
class DragBox extends PointerInteraction {
/**
* @param {module:ol/interaction/DragBox~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {
@@ -137,7 +137,7 @@ class DragBox extends PointerInteraction {
/**
* Function to execute just before `onboxend` is fired
* @type {{function(this:module:ol/interaction/DragBox, module:ol/MapBrowserEvent)}}
* @type {function(this:module:ol/interaction/DragBox, module:ol/MapBrowserEvent)}
* @private
*/
this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : UNDEFINED;

View File

@@ -21,11 +21,11 @@ import PointerInteraction, {centroid as centroidFromPointers} from '../interacti
/**
* @classdesc
* Allows the user to pan the map by dragging the map.
* @api
*/
class DragPan extends PointerInteraction {
/**
* @param {module:ol/interaction/DragPan~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -26,12 +26,12 @@ import PointerInteraction from '../interaction/Pointer.js';
* it to when the alt and shift keys are held down.
*
* This interaction is only supported for mouse devices.
* @api
*/
class DragRotate extends PointerInteraction {
/**
* @param {module:ol/interaction/DragRotate~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -27,12 +27,12 @@ import PointerInteraction from '../interaction/Pointer.js';
* This interaction is only supported for mouse devices.
*
* And this interaction is not included in the default interactions.
* @api
*/
class DragRotateAndZoom extends PointerInteraction {
/**
* @param {module:ol/interaction/DragRotateAndZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -28,11 +28,11 @@ import DragBox from '../interaction/DragBox.js';
*
* To change the style of the box, use CSS and the `.ol-dragzoom` selector, or
* your custom one configured with `className`.
* @api
*/
class DragZoom extends DragBox {
/**
* @param {module:ol/interaction/DragZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};

View File

@@ -154,11 +154,11 @@ class DrawEvent extends Event {
* Interaction for drawing feature geometries.
*
* @fires module:ol/interaction/Draw~DrawEvent
* @api
*/
class Draw extends PointerInteraction {
/**
* @param {module:ol/interaction/Draw~Options} options Options.
* @api
*/
constructor(options) {

View File

@@ -77,11 +77,11 @@ class ExtentInteractionEvent extends Event {
* This interaction is only supported for mouse devices.
*
* @fires module:ol/interaction/Extent~Event
* @api
*/
class ExtentInteraction extends PointerInteraction {
/**
* @param {module:ol/interaction/Extent~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -29,11 +29,11 @@ import {clamp} from '../math.js';
* by a keyboard event not a button element event.
* Although interactions do not have a DOM element, some of them do render
* vectors and so are visible on the screen.
* @api
*/
class Interaction extends BaseObject {
/**
* @param {module:ol/interaction/Interaction~InteractionOptions} options Options.
* @api
*/
constructor(options) {
super();

View File

@@ -32,11 +32,11 @@ import Interaction, {pan} from '../interaction/Interaction.js';
* element, focus will have to be on, and returned to, this element if the keys
* are to function.
* See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.
* @api
*/
class KeyboardPan extends Interaction {
/**
* @param {module:ol/interaction/KeyboardPan~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -28,11 +28,11 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js';
* element, focus will have to be on, and returned to, this element if the keys
* are to function.
* See also {@link moudle:ol/interaction/KeyboardPan~KeyboardPan}.
* @api
*/
class KeyboardZoom extends Interaction {
/**
* @param {module:ol/interaction/KeyboardZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -149,11 +149,11 @@ export class ModifyEvent extends Event {
* key is pressed. To configure the interaction with a different condition
* for deletion, use the `deleteCondition` option.
* @fires module:ol/interaction/Modify~ModifyEvent
* @api
*/
class Modify extends PointerInteraction {
/**
* @param {module:ol/interaction/Modify~Options} options Options.
* @api
*/
constructor(options) {

View File

@@ -46,11 +46,11 @@ export const Mode = {
/**
* @classdesc
* Allows the user to zoom the map by scrolling the mouse wheel.
* @api
*/
class MouseWheelZoom extends Interaction {
/**
* @param {module:ol/interaction/MouseWheelZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -20,11 +20,11 @@ import {disable} from '../rotationconstraint.js';
* @classdesc
* Allows the user to rotate the map by twisting with two fingers
* on a touch screen.
* @api
*/
class PinchRotate extends PointerInteraction {
/**
* @param {module:ol/interaction/PinchRotate~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -19,11 +19,11 @@ import PointerInteraction, {centroid as centroidFromPointers} from '../interacti
* @classdesc
* Allows the user to zoom the map by pinching with two fingers
* on a touch screen.
* @api
*/
class PinchZoom extends PointerInteraction {
/**
* @param {module:ol/interaction/PinchZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -73,11 +73,11 @@ const handleMoveEvent = UNDEFINED;
* started. During a drag sequence the `handleDragEvent` user function is
* called on `move` events. The drag sequence ends when the `handleUpEvent`
* user function is called and returns `false`.
* @api
*/
class PointerInteraction extends Interaction {
/**
* @param {module:ol/interaction/Pointer~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -152,11 +152,11 @@ class SelectEvent extends Event {
* Selected features are added to an internal unmanaged layer.
*
* @fires SelectEvent
* @api
*/
class Select extends Interaction {
/**
* @param {module:ol/interaction/Select~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -62,11 +62,12 @@ import RBush from '../structs/RBush.js';
* var snap = new Snap({
* source: source
* });
*
* @api
*/
class Snap extends PointerInteraction {
/**
* @param {module:ol/interaction/Snap~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {

View File

@@ -91,11 +91,11 @@ export class TranslateEvent extends Event {
* Interaction for translating (moving) features.
*
* @fires module:ol/interaction/Translate~TranslateEvent
* @api
*/
class Translate extends PointerInteraction {
/**
* @param {module:ol/interaction/Translate~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {
super({

View File

@@ -22,7 +22,6 @@ import {assign} from '../obj.js';
*/
class BaseLayer extends BaseObject {
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -31,9 +30,12 @@ class BaseLayer extends BaseObject {
* the options is set as a {@link module:ol/Object} property on the layer object, so
* is observable, and has get/set accessors.
*
* @param {module:ol/layer/Base~Options} options Layer options.
* @api
*/
class BaseLayer extends BaseObject {
/**
* @param {module:ol/layer/Base~Options} options Layer options.
*/
constructor(options) {
super();

View File

@@ -40,16 +40,18 @@ const Property = {
};
class LayerGroup extends BaseLayer {
/**
* @classdesc
* A {@link module:ol/Collection~Collection} of layers that are handled together.
*
* A generic `change` event is triggered when the group/Collection changes.
*
* @param {module:ol/layer/Group~Options=} opt_options Layer options.
* @api
*/
class LayerGroup extends BaseLayer {
/**
* @param {module:ol/layer/Group~Options=} opt_options Layer options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -59,7 +59,6 @@ const Property = {
const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
class Heatmap extends VectorLayer {
/**
* @classdesc
* Layer for rendering vector data as a heatmap.
@@ -68,9 +67,12 @@ class Heatmap extends VectorLayer {
* options means that `title` is observable, and has get/set accessors.
*
* @fires module:ol/render/Event~RenderEvent
* @param {module:ol/layer/Heatmap~Options=} opt_options Options.
* @api
*/
class Heatmap extends VectorLayer {
/**
* @param {module:ol/layer/Heatmap~Options=} opt_options Options.
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};

View File

@@ -25,8 +25,6 @@ import Layer from '../layer/Layer.js';
*/
class ImageLayer extends Layer {
/**
* @classdesc
* Server-rendered images that are available for arbitrary extents and
@@ -36,9 +34,13 @@ class ImageLayer extends Layer {
* options means that `title` is observable, and has get/set accessors.
*
* @fires module:ol/render/Event~RenderEvent
* @param {module:ol/layer/Image~Options=} opt_options Layer options.
* @api
*/
class ImageLayer extends Layer {
/**
* @param {module:ol/layer/Image~Options=} opt_options Layer options.
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};
super(options);

View File

@@ -43,8 +43,6 @@ import SourceState from '../source/State.js';
* @property {number} minResolution
*/
class Layer extends BaseLayer {
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -61,8 +59,10 @@ class Layer extends BaseLayer {
* A generic `change` event is fired when the state of the source changes.
*
* @fires module:ol/render/Event~RenderEvent
*/
class Layer extends BaseLayer {
/**
* @param {module:ol/layer/Layer~Options} options Layer options.
* @api
*/
constructor(options) {

View File

@@ -29,8 +29,6 @@ import {assign} from '../obj.js';
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
*/
class TileLayer extends Layer {
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
@@ -39,9 +37,12 @@ class TileLayer extends Layer {
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
* @api
*/
class TileLayer extends Layer {
/**
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};

View File

@@ -77,7 +77,6 @@ const Property = {
};
class VectorLayer extends Layer {
/**
* @classdesc
* Vector data that is rendered client-side.
@@ -85,9 +84,12 @@ class VectorLayer extends Layer {
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @param {module:ol/layer/Vector~Options=} opt_options Options.
* @api
*/
class VectorLayer extends Layer {
/**
* @param {module:ol/layer/Vector~Options=} opt_options Options.
*/
constructor(opt_options) {
const options = opt_options ?
opt_options : /** @type {module:ol/layer/Vector~Options} */ ({});

View File

@@ -86,7 +86,6 @@ export const RenderType = {
*/
class VectorTileLayer extends VectorLayer {
/**
* @classdesc
* Layer for vector tile data that is rendered client-side.
@@ -97,6 +96,10 @@ class VectorTileLayer extends VectorLayer {
* @param {module:ol/layer/VectorTile~Options=} opt_options Options.
* @api
*/
class VectorTileLayer extends VectorLayer {
/**
* @param {module:ol/layer/VectorTile~Options=} opt_options Options.
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};

View File

@@ -3,6 +3,7 @@
*/
/**
* @classdesc
* Context for drawing geometries. A vector context is available on render
* events and does not need to be constructed directly.
* @api

View File

@@ -16,7 +16,6 @@ import VectorContext from '../VectorContext.js';
import {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';
import {create as createTransform, compose as composeTransform} from '../../transform.js';
class CanvasImmediateRenderer extends VectorContext {
/**
* @classdesc
* A concrete subclass of {@link module:ol/render/VectorContext} that implements
@@ -25,7 +24,9 @@ class CanvasImmediateRenderer extends VectorContext {
* provided to application code as vectorContext member of the
* {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and
* render events emitted by layers and maps.
*
*/
class CanvasImmediateRenderer extends VectorContext {
/**
* @param {CanvasRenderingContext2D} context Context.
* @param {number} pixelRatio Pixel ratio.
* @param {module:ol/extent~Extent} extent Extent.

View File

@@ -13,11 +13,15 @@ import {layerRendererConstructors} from './Map.js';
import IntermediateCanvasRenderer from './IntermediateCanvas.js';
import {create as createTransform, compose as composeTransform} from '../../transform.js';
/**
* @classdesc
* Canvas renderer for image layers.
* @api
*/
class CanvasImageLayerRenderer extends IntermediateCanvasRenderer {
/**
* @param {module:ol/layer/Image|module:ol/layer/Vector} imageLayer Image or vector layer.
* @api
*/
constructor(imageLayer) {

View File

@@ -19,12 +19,15 @@ import SourceState from '../../source/State.js';
*/
export const layerRendererConstructors = [];
/**
* @classdesc
* Canvas map renderer.
* @api
*/
class CanvasMapRenderer extends MapRenderer {
/**
* @param {module:ol/PluggableMap} map Map.
* @api
*/
constructor(map) {
super(map);

View File

@@ -11,12 +11,16 @@ import {containsExtent, createEmpty, equals, getIntersection, isEmpty} from '../
import IntermediateCanvasRenderer from '../canvas/IntermediateCanvas.js';
import {create as createTransform, compose as composeTransform} from '../../transform.js';
/**
* @classdesc
* Canvas renderer for tile layers.
* @api
*/
class CanvasTileLayerRenderer extends IntermediateCanvasRenderer {
/**
* @param {module:ol/layer/Tile|module:ol/layer/VectorTile} tileLayer Tile layer.
* @param {boolean=} opt_noContext Skip the context creation.
* @api
*/
constructor(tileLayer, opt_noContext) {

View File

@@ -15,11 +15,15 @@ import CanvasReplayGroup from '../../render/canvas/ReplayGroup.js';
import CanvasLayerRenderer from '../canvas/Layer.js';
import {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';
/**
* @classdesc
* Canvas renderer for vector layers.
* @api
*/
class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
/**
* @param {module:ol/layer/Vector} vectorLayer Vector layer.
* @api
*/
constructor(vectorLayer) {

View File

@@ -47,11 +47,15 @@ const VECTOR_REPLAYS = {
};
/**
* @classdesc
* Canvas renderer for vector tile layers.
* @api
*/
class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
/**
* @param {module:ol/layer/VectorTile} layer VectorTile layer.
* @api
*/
constructor(layer) {

View File

@@ -21,12 +21,16 @@ import {
import {CLAMP_TO_EDGE} from '../../webgl.js';
import {createTexture} from '../../webgl/Context.js';
/**
* @classdesc
* WebGL renderer for image layers.
* @api
*/
class WebGLImageLayerRenderer extends WebGLLayerRenderer {
/**
* @param {module:ol/renderer/webgl/Map} mapRenderer Map renderer.
* @param {module:ol/layer/Image} imageLayer Tile layer.
* @api
*/
constructor(mapRenderer, imageLayer) {

View File

@@ -37,11 +37,15 @@ import ContextEventType from '../../webgl/ContextEventType.js';
const WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
/**
* @classdesc
* WebGL map renderer.
* @api
*/
class WebGLMapRenderer extends MapRenderer {
/**
* @param {module:ol/PluggableMap} map Map.
* @api
*/
constructor(map) {
super(map);

View File

@@ -24,12 +24,16 @@ import {
import {COLOR_BUFFER_BIT, BLEND, ARRAY_BUFFER, FLOAT, LINEAR, TRIANGLE_STRIP} from '../../webgl.js';
import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @classdesc
* WebGL renderer for tile layers.
* @api
*/
class WebGLTileLayerRenderer extends WebGLLayerRenderer {
/**
* @param {module:ol/renderer/webgl/Map} mapRenderer Map renderer.
* @param {module:ol/layer/Tile} tileLayer Tile layer.
* @api
*/
constructor(mapRenderer, tileLayer) {

View File

@@ -10,12 +10,17 @@ import {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance,
import WebGLLayerRenderer from '../webgl/Layer.js';
import {apply as applyTransform} from '../../transform.js';
/**
* @classdesc
* WebGL renderer for vector layers.
* @api
*/
class WebGLVectorLayerRenderer extends WebGLLayerRenderer {
/**
* @param {module:ol/renderer/webgl/Map} mapRenderer Map renderer.
* @param {module:ol/layer/Vector} vectorLayer Vector layer.
* @api
*/
constructor(mapRenderer, vectorLayer) {

View File

@@ -17,12 +17,13 @@ import Triangulation from '../reproj/Triangulation.js';
*/
class ReprojImage extends ImageBase {
/**
* @classdesc
* Class encapsulating single reprojected image.
* See {@link module:ol/source/Image~ImageSource}.
*
*/
class ReprojImage extends ImageBase {
/**
* @param {module:ol/proj/Projection} sourceProj Source projection (of the data).
* @param {module:ol/proj/Projection} targetProj Target projection.
* @param {module:ol/extent~Extent} targetExtent Target extent.

View File

@@ -18,12 +18,14 @@ import Triangulation from '../reproj/Triangulation.js';
*/
class ReprojTile extends Tile {
/**
* @classdesc
* Class encapsulating single reprojected tile.
* See {@link module:ol/source/TileImage~TileImage}.
*
*/
class ReprojTile extends Tile {
/**
* @param {module:ol/proj/Projection} sourceProj Source projection.
* @param {module:ol/tilegrid/TileGrid} sourceTileGrid Source tile grid.
* @param {module:ol/proj/Projection} targetProj Target projection.

View File

@@ -44,14 +44,16 @@ const TOS_ATTRIBUTION = '<a class="ol-attribution-bing-tos" ' +
* To disable the opacity transition, pass `transition: 0`.
*/
class BingMaps extends TileImage {
/**
* @classdesc
* Layer source for Bing Maps tile data.
*
* @param {module:ol/source/BingMaps~Options=} options Bing Maps options.
* @api
*/
class BingMaps extends TileImage {
/**
* @param {module:ol/source/BingMaps~Options=} options Bing Maps options.
*/
constructor(options) {
const hidpi = options.hidpi !== undefined ? options.hidpi : false;

View File

@@ -31,14 +31,15 @@ import XYZ from '../source/XYZ.js';
*/
class CartoDB extends XYZ {
/**
* @classdesc
* Layer source for the CartoDB Maps API.
*
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
* @api
*/
class CartoDB extends XYZ {
/**
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
*/
constructor(options) {
super({
attributions: options.attributions,

View File

@@ -36,16 +36,17 @@ import VectorSource from '../source/Vector.js';
*/
class Cluster extends VectorSource {
/**
* @classdesc
* Layer source to cluster vector data. Works out of the box with point
* geometries. For other geometry types, or if not all geometries should be
* considered for clustering, a custom `geometryFunction` can be defined.
*
* @param {module:ol/source/Cluster~Options=} options Cluster options.
* @api
*/
class Cluster extends VectorSource {
/**
* @param {module:ol/source/Cluster~Options=} options Cluster options.
*/
constructor(options) {
super({
attributions: options.attributions,

View File

@@ -41,13 +41,13 @@ const ImageSourceEventType = {
};
class ImageSourceEvent extends Event {
/**
* @classdesc
* Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this
* type.
*
*/
class ImageSourceEvent extends Event {
/**
* @param {string} type Type.
* @param {module:ol/Image} image The image.
*/
@@ -77,16 +77,17 @@ class ImageSourceEvent extends Event {
*/
class ImageSource extends Source {
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Base class for sources providing a single image.
*
* @param {module:ol/source/Image~Options} options Single image source options.
* @api
*/
class ImageSource extends Source {
/**
* @param {module:ol/source/Image~Options} options Single image source options.
*/
constructor(options) {
super({
attributions: options.attributions,

View File

@@ -39,7 +39,6 @@ import {appendParams} from '../uri.js';
*/
class ImageArcGISRest extends ImageSource {
/**
* @classdesc
* Source for data from ArcGIS Rest services providing single, untiled images.
@@ -50,9 +49,12 @@ class ImageArcGISRest extends ImageSource {
* {@link module:ol/source/TileArcGISRest} data source.
*
* @fires ol/source/Image~ImageSourceEvent
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
* @api
*/
class ImageArcGISRest extends ImageSource {
/**
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -42,14 +42,15 @@ import ImageSource from '../source/Image.js';
*/
class ImageCanvasSource extends ImageSource {
/**
* @classdesc
* Base class for image sources where a canvas element is the image.
*
* @param {module:ol/source/ImageCanvas~Options=} options ImageCanvas options.
* @api
*/
class ImageCanvasSource extends ImageSource {
/**
* @param {module:ol/source/ImageCanvas~Options=} options ImageCanvas options.
*/
constructor(options) {
super({

View File

@@ -32,15 +32,17 @@ import {appendParams} from '../uri.js';
*/
class ImageMapGuide extends ImageSource {
/**
* @classdesc
* Source for images from Mapguide servers
*
* @fires ol/source/Image~ImageSourceEvent
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
* @api
*/
class ImageMapGuide extends ImageSource {
/**
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
*/
constructor(options) {
super({

View File

@@ -28,14 +28,15 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
*/
class Static extends ImageSource {
/**
* @classdesc
* A layer source for displaying a single, static image.
*
* @param {module:ol/source/ImageStatic~Options=} options ImageStatic options.
* @api
*/
class Static extends ImageSource {
/**
* @param {module:ol/source/ImageStatic~Options=} options ImageStatic options.
*/
constructor(options) {
const imageExtent = options.imageExtent;

View File

@@ -51,15 +51,17 @@ const GETFEATUREINFO_IMAGE_SIZE = [101, 101];
*/
class ImageWMS extends ImageSource {
/**
* @classdesc
* Source for WMS servers providing single, untiled images.
*
* @fires ol/source/Image~ImageSourceEvent
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
* @api
*/
class ImageWMS extends ImageSource {
/**
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -41,15 +41,15 @@ export const ATTRIBUTION = '&copy; ' +
*/
class OSM extends XYZ {
/**
* @classdesc
* Layer source for the OpenStreetMap tile server.
*
* @param {module:ol/source/OSM~Options=} [opt_options] Open Street Map options.
* @api
*/
class OSM extends XYZ {
/**
* @param {module:ol/source/OSM~Options=} [opt_options] Open Street Map options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -72,13 +72,13 @@ const RasterOperationType = {
};
class RasterSourceEvent extends Event {
/**
* @classdesc
* Events emitted by {@link module:ol/source/Raster} instances are instances of this
* type.
*
*/
class RasterSourceEvent extends Event {
/**
* @param {string} type Type.
* @param {module:ol/PluggableMap~FrameState} frameState The frame state.
* @param {Object} data An object made available to operations.
@@ -133,7 +133,6 @@ class RasterSourceEvent extends Event {
*/
class RasterSource extends ImageSource {
/**
* @classdesc
* A source that transforms data from any number of input sources using an
@@ -141,9 +140,12 @@ class RasterSource extends ImageSource {
* output pixel values.
*
* @fires ol/source/Raster~RasterSourceEvent
* @param {module:ol/source/Raster~Options=} options Options.
* @api
*/
class RasterSource extends ImageSource {
/**
* @param {module:ol/source/Raster~Options=} options Options.
*/
constructor(options) {
super({});

View File

@@ -37,7 +37,6 @@ import SourceState from '../source/State.js';
*/
class Source extends BaseObject {
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -45,10 +44,12 @@ class Source extends BaseObject {
* Base class for {@link module:ol/layer/Layer~Layer} sources.
*
* A generic `change` event is triggered when the state of the source changes.
*
* @param {module:ol/source/Source~Options} options Source options.
* @api
*/
class Source extends BaseObject {
/**
* @param {module:ol/source/Source~Options} options Source options.
*/
constructor(options) {
super();

View File

@@ -109,15 +109,15 @@ const ProviderConfig = {
*/
class Stamen extends XYZ {
/**
* @classdesc
* Layer source for the Stamen tile server.
*
* @param {module:ol/source/Stamen~Options=} options Stamen options.
* @api
*/
class Stamen extends XYZ {
/**
* @param {module:ol/source/Stamen~Options=} options Stamen options.
*/
constructor(options) {
const i = options.layer.indexOf('-');
const provider = i == -1 ? options.layer : options.layer.slice(0, i);

View File

@@ -27,16 +27,17 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
*/
class TileSource extends Source {
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Base class for sources providing images divided into a tile grid.
*
* @param {module:ol/source/Tile~Options=} options SourceTile source options.
* @api
*/
class TileSource extends Source {
/**
* @param {module:ol/source/Tile~Options=} options SourceTile source options.
*/
constructor(options) {
super({
@@ -307,12 +308,12 @@ TileSource.prototype.useTile = UNDEFINED;
* @classdesc
* Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this
* type.
*
*/
export class TileSourceEvent extends Event {
/**
* @param {string} type Type.
* @param {module:ol/Tile} tile The tile.
*/
export class TileSourceEvent extends Event {
constructor(type, tile) {
super(type);

View File

@@ -51,7 +51,6 @@ import {appendParams} from '../uri.js';
*/
class TileArcGISRest extends TileImage {
/**
* @classdesc
* Layer source for tile data from ArcGIS Rest services. Map and Image
@@ -59,10 +58,12 @@ class TileArcGISRest extends TileImage {
*
* For cached ArcGIS services, better performance is available using the
* {@link module:ol/source/XYZ~XYZ} data source.
*
* @param {module:ol/source/TileArcGISRest~Options=} opt_options Tile ArcGIS Rest options.
* @api
*/
class TileArcGISRest extends TileImage {
/**
* @param {module:ol/source/TileArcGISRest~Options=} opt_options Tile ArcGIS Rest options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -80,7 +80,6 @@ class LabeledTile extends Tile {
*/
class TileDebug extends TileSource {
/**
* @classdesc
* A pseudo tile source, which does not fetch tiles from a server, but renders
@@ -88,10 +87,12 @@ class TileDebug extends TileSource {
* each tile. See examples/canvas-tiles for an example.
*
* Uses Canvas context2d, so requires Canvas support.
*
* @param {module:ol/source/TileDebug~Options=} options Debug tile options.
* @api
*/
class TileDebug extends TileSource {
/**
* @param {module:ol/source/TileDebug~Options=} options Debug tile options.
*/
constructor(options) {
super({

View File

@@ -54,15 +54,17 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
*/
class TileImage extends UrlTile {
/**
* @classdesc
* Base class for sources providing images divided into a tile grid.
*
* @fires module:ol/source/Tile~TileSourceEvent
* @param {module:ol/source/TileImage~Options=} options Image tile options.
* @api
*/
class TileImage extends UrlTile {
/**
* @param {module:ol/source/TileImage~Options=} options Image tile options.
*/
constructor(options) {
super({

View File

@@ -44,14 +44,15 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
*/
class TileJSON extends TileImage {
/**
* @classdesc
* Layer source for tile data in TileJSON format.
*
* @param {module:ol/source/TileJSON~Options=} options TileJSON options.
* @api
*/
class TileJSON extends TileImage {
/**
* @param {module:ol/source/TileJSON~Options=} options TileJSON options.
*/
constructor(options) {
super({
attributions: options.attributions,

View File

@@ -71,14 +71,15 @@ import {appendParams} from '../uri.js';
*/
class TileWMS extends TileImage {
/**
* @classdesc
* Layer source for tile data from WMS servers.
*
* @param {module:ol/source/TileWMS~Options=} [opt_options] Tile WMS options.
* @api
*/
class TileWMS extends TileImage {
/**
* @param {module:ol/source/TileWMS~Options=} [opt_options] Tile WMS options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -17,6 +17,8 @@ import {getKeyZXY} from '../tilecoord.js';
import {createXYZ, extentFromProjection} from '../tilegrid.js';
export class CustomTile extends Tile {
/**
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
* @param {module:ol/TileState} state State.
@@ -25,8 +27,6 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
* @param {boolean} preemptive Load the tile when visible (before it's needed).
* @param {boolean} jsonp Load the tile as a script.
*/
export class CustomTile extends Tile {
constructor(tileCoord, state, src, extent, preemptive, jsonp) {
super(tileCoord, state);
@@ -267,15 +267,15 @@ CustomTile.prototype.load = function() {
*/
class UTFGrid extends TileSource {
/**
* @classdesc
* Layer source for UTFGrid interaction data loaded from TileJSON format.
*
* @param {module:ol/source/UTFGrid~Options=} options Source options.
* @api
*/
class UTFGrid extends TileSource {
/**
* @param {module:ol/source/UTFGrid~Options=} options Source options.
*/
constructor(options) {
super({
projection: getProjection('EPSG:3857'),

View File

@@ -27,12 +27,14 @@ import {getKeyZXY} from '../tilecoord.js';
*/
class UrlTile extends TileSource {
/**
* @classdesc
* Base class for sources providing tiles divided into a tile grid over http.
*
* @fires module:ol/source/TileEvent
*/
class UrlTile extends TileSource {
/**
* @param {module:ol/source/UrlTile~Options=} options Image tile options.
*/
constructor(options) {

View File

@@ -35,12 +35,13 @@ import RBush from '../structs/RBush.js';
* @classdesc
* Events emitted by {@link module:ol/source/Vector} instances are instances of this
* type.
*
* @param {string} type Type.
* @param {module:ol/Feature=} opt_feature Feature.
*/
export class VectorSourceEvent extends Event {
/**
* @param {string} type Type.
* @param {module:ol/Feature=} opt_feature Feature.
*/
constructor(type, opt_feature) {
super(type);
@@ -147,8 +148,6 @@ export class VectorSourceEvent extends Event {
*/
class VectorSource extends Source {
/**
* @classdesc
* Provides a source of features for vector layers. Vector features provided
@@ -156,9 +155,12 @@ class VectorSource extends Source {
* vector data that is optimized for rendering.
*
* @fires ol/source/Vector~VectorSourceEvent
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
* @api
*/
class VectorSource extends Source {
/**
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -58,8 +58,6 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
*/
class VectorTile extends UrlTile {
/**
* @classdesc
* Class for layer sources providing vector data divided into a tile grid, to be
@@ -71,9 +69,12 @@ class VectorTile extends UrlTile {
* editing.
*
* @fires module:ol/source/Tile~TileSourceEvent
* @param {module:ol/source/VectorTile~Options=} options Vector tile options.
* @api
*/
class VectorTile extends UrlTile {
/**
* @param {module:ol/source/VectorTile~Options=} options Vector tile options.
*/
constructor(options) {
const projection = options.projection || 'EPSG:3857';

View File

@@ -56,15 +56,15 @@ import {appendParams} from '../uri.js';
*/
class WMTS extends TileImage {
/**
* @classdesc
* Layer source for tile data from WMTS servers.
*
* @param {module:ol/source/WMTS~Options=} options WMTS options.
* @api
*/
class WMTS extends TileImage {
/**
* @param {module:ol/source/WMTS~Options=} options WMTS options.
*/
constructor(options) {
// TODO: add support for TileMatrixLimits

View File

@@ -44,8 +44,6 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
*/
class XYZ extends TileImage {
/**
* @classdesc
* Layer source for tile data with URLs in a set XYZ format that are
@@ -62,10 +60,12 @@ class XYZ extends TileImage {
* coordinate[1] + '/' + coordinate[2] + '.png';
* }
*
*
* @param {module:ol/source/XYZ~Options=} opt_options XYZ options.
* @api
*/
class XYZ extends TileImage {
/**
* @param {module:ol/source/XYZ~Options=} opt_options XYZ options.
*/
constructor(opt_options) {
const options = opt_options || {};
const projection = options.projection !== undefined ?

View File

@@ -23,6 +23,8 @@ const TierSizeCalculation = {
};
export class CustomTile extends ImageTile {
/**
* @param {module:ol/tilegrid/TileGrid} tileGrid TileGrid that the tile belongs to.
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
@@ -32,8 +34,6 @@ const TierSizeCalculation = {
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
* @param {module:ol/Tile~Options=} opt_options Tile options.
*/
export class CustomTile extends ImageTile {
constructor(tileGrid, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
super(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options);
@@ -115,16 +115,17 @@ CustomTile.prototype.getImage = function() {
*/
class Zoomify extends TileImage {
/**
* @classdesc
* Layer source for tile data in Zoomify format (both Zoomify and Internet
* Imaging Protocol are supported).
*
* @param {module:ol/source/Zoomify~Options=} opt_options Options.
* @api
*/
class Zoomify extends TileImage {
/**
* @param {module:ol/source/Zoomify~Options=} opt_options Options.
*/
constructor(opt_options) {
const options = opt_options || {};

View File

@@ -17,6 +17,7 @@ import EventType from '../events/EventType.js';
/**
* @classdesc
* Implements a Least-Recently-Used cache where the keys do not conflict with
* Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
* items from the cache is the responsibility of the user.

View File

@@ -10,12 +10,13 @@
* @property {?} data
*/
/**
* @classdesc
* Creates an empty linked list structure.
*/
class LinkedList {
/**
* Creates an empty linked list structure.
*
* @param {boolean=} opt_circular The last item is connected to the first one,
* and the first item to the last one. Default is true.
*/

View File

@@ -12,6 +12,7 @@ export const DROP = Infinity;
/**
* @classdesc
* Priority queue.
*
* The implementation is inspired from the Closure Library's Heap class and

View File

@@ -16,13 +16,13 @@ import {isEmpty} from '../obj.js';
*/
/**
* @classdesc
* Wrapper around the RBush by Vladimir Agafonkin.
* See https://github.com/mourner/rbush.
*
* @template T
*/
class RBush {
/**
* @param {number=} opt_maxEntries Max entries.
*/

View File

@@ -21,9 +21,9 @@ import {createCanvasContext2D} from '../dom.js';
* @property {HTMLCanvasElement} image
*/
class Atlas {
/**
* @classesc
* This class facilitates the creation of image atlases.
*
* Images added to an atlas will be rendered onto a single
@@ -38,6 +38,16 @@ class Atlas {
* edges overlap when being rendered). To avoid this we add a
* padding around each image.
*/
class Atlas {
/**
* @param {number} size The size in pixels of the sprite image.
* @param {number} space The space in pixels between images.
* Because texture coordinates are float values, the edges of
* images might not be completely correct (in a way that the
* edges overlap when being rendered). To avoid this we add a
* padding around each image.
*/
constructor(size, space) {
/**

View File

@@ -41,8 +41,8 @@ const INITIAL_ATLAS_SIZE = 256;
const MAX_ATLAS_SIZE = -1;
class AtlasManager {
/**
* @classdesc
* Manages the creation of image atlases.
*
* Images added to this manager will be inserted into an atlas, which
@@ -53,8 +53,10 @@ class AtlasManager {
*
* If an application uses many images or very large images, it is recommended
* to set a higher `size` value to avoid the creation of too many atlases.
*
* @api
*/
class AtlasManager {
/**
* @param {module:ol/style/AtlasManager~Options=} opt_options Options.
*/
constructor(opt_options) {

View File

@@ -20,14 +20,15 @@ import RegularShape from '../style/RegularShape.js';
*/
class CircleStyle extends RegularShape {
/**
* @classdesc
* Set circle style for vector features.
*
* @param {module:ol/style/Circle~Options=} opt_options Options.
* @api
*/
class CircleStyle extends RegularShape {
/**
* @param {module:ol/style/Circle~Options=} opt_options Options.
*/
constructor(opt_options) {
const options = opt_options || {};

Some files were not shown because too many files have changed in this diff Show More