Fix enum types

This commit is contained in:
ahocevar
2018-04-21 10:48:38 +02:00
parent 417dd85f83
commit c23a5086ae
20 changed files with 87 additions and 50 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ const BaseLayer = function(options) {
/**
* The layer type.
* @type {module:ol/LayerType~LayerType}
* @type {module:ol/LayerType}
* @protected;
*/
this.type;
@@ -81,7 +81,7 @@ inherits(BaseLayer, BaseObject);
/**
* Get the layer type (used when creating a layer renderer).
* @return {module:ol/LayerType~LayerType} The layer type.
* @return {module:ol/LayerType} The layer type.
*/
BaseLayer.prototype.getType = function() {
return this.type;
+1 -1
View File
@@ -47,7 +47,7 @@ const ImageLayer = function(opt_options) {
/**
* The layer type.
* @protected
* @type {module:ol/LayerType~LayerType}
* @type {module:ol/LayerType}
*/
this.type = LayerType.IMAGE;
+1 -1
View File
@@ -61,7 +61,7 @@ const TileLayer = function(opt_options) {
/**
* The layer type.
* @protected
* @type {module:ol/LayerType~LayerType}
* @type {module:ol/LayerType}
*/
this.type = LayerType.TILE;
+19 -3
View File
@@ -27,7 +27,7 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
* renderer when getting features from the vector source for the rendering or hit-detection.
* Recommended value: the size of the largest symbol, line width or label.
* @property {module:ol/layer/VectorRenderType~VectorRenderType|string} [renderMode='vector'] Render mode for vector layers:
* @property {module:ol/layer/VectorRenderType|string} [renderMode='vector'] Render mode for vector layers:
* * `'image'`: Vector layers are rendered as images. Great performance, but point symbols and
* texts are always rotated with the view and pixels are scaled during zoom animations.
* * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering even during
@@ -52,6 +52,22 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.
*/
/**
* @enum {string}
* Render mode for vector layers:
* * `'image'`: Vector layers are rendered as images. Great performance, but
* point symbols and texts are always rotated with the view and pixels are
* scaled during zoom animations.
* * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering
* even during animations, but slower performance.
* @api
*/
export const RenderType = {
IMAGE: 'image',
VECTOR: 'vector'
};
/**
* @enum {string}
* @private
@@ -138,7 +154,7 @@ const VectorLayer = function(opt_options) {
/**
* The layer type.
* @protected
* @type {module:ol/LayerType~LayerType}
* @type {module:ol/LayerType}
*/
this.type = LayerType.VECTOR;
@@ -258,7 +274,7 @@ VectorLayer.prototype.setStyle = function(style) {
/**
* @return {module:ol/layer/VectorRenderType~VectorRenderType|string} The render mode.
* @return {module:ol/layer/VectorRenderType|string} The render mode.
*/
VectorLayer.prototype.getRenderMode = function() {
return this.renderMode_;
+23 -3
View File
@@ -10,6 +10,26 @@ import VectorTileRenderType from '../layer/VectorTileRenderType.js';
import {assign} from '../obj.js';
/**
* @enum {string}
* Render mode for vector tiles:
* * `'image'`: Vector tiles are rendered as images. Great performance, but
* point symbols and texts are always rotated with the view and pixels are
* scaled during zoom animations.
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels
* are scaled during zoom animations. Point symbols and texts are accurately
* rendered as vectors and can stay upright on rotated views.
* * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering
* even during animations, but slower performance than the other options.
* @api
*/
export const RenderType = {
IMAGE: 'image',
HYBRID: 'hybrid',
VECTOR: 'vector'
};
/**
* @typedef {Object} Options
* @property {number} [opacity=1] Opacity (0, 1).
@@ -30,7 +50,7 @@ import {assign} from '../obj.js';
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
* @property {module:ol/layer/VectorRenderType~VectorRenderType|string} [renderMode='hybrid'] Render mode for vector tiles:
* @property {module:ol/layer/VectorTileRenderType|string} [renderMode='hybrid'] Render mode for vector tiles:
* * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts
* are always rotated with the view and pixels are scaled during zoom animations.
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
@@ -71,7 +91,7 @@ import {assign} from '../obj.js';
/**
* @classdesc
* Layer for vector tile data that is rendered client-side.
* Note that any property set in the options is set as a {@link }
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
@@ -107,7 +127,7 @@ const VectorTileLayer = function(opt_options) {
/**
* The layer type.
* @protected
* @type {module:ol/LayerType~LayerType}
* @type {module:ol/LayerType}
*/
this.type = LayerType.VECTOR_TILE;