Mark optional property with square brackets

This commit is contained in:
Frederic Junod
2018-03-19 10:48:34 +01:00
parent 61f944d4a9
commit 0477f6cfdf
11 changed files with 37 additions and 43 deletions

View File

@@ -22,16 +22,14 @@ import {get as getProjection} from '../proj.js';
/**
* @typedef {Object} Options
* @property {module:ol/proj~ProjectionLike} defaultDataProjection Default data projection.
* Default is `EPSG:4326`.
* @property {module:ol/proj~ProjectionLike} featureProjection Projection for features read or
* @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection.
* @property {module:ol/proj~ProjectionLike} [featureProjection] Projection for features read or
* written by the format. Options passed to read or write methods will take precedence.
* @property {string|undefined} geometryName Geometry name to use when creating features.
* @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include
* @property {string} [geometryName] Geometry name to use when creating features.
* @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include
* the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader
* will look for that field to set the geometry name. If both this field is set to `true`
* and a `geometryName` is provided, the `geometryName` will take precedence.
* Default is `false`.
*/

View File

@@ -230,13 +230,11 @@ function createStyleDefaults() {
/**
* @typedef {Object} Options
* @property {boolean|undefined} extractStyles Extract styles from the KML.
* Default is `true`.
* @property {boolean|undefined} showPointNames Show names as labels for placemarks
* which contain points. Default is `true`.
* @property {Array.<ol.style.Style>|undefined} defaultStyle Default style. The
* @property {boolean} [extractStyles=true] Extract styles from the KML.
* @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.
* @property {Array.<ol.style.Style>} [defaultStyle] Default style. The
* default default style is the same as Google Earth.
* @property {boolean|undefined} writeStyles Write styles into KML. Default is `true`.
* @property {boolean} [writeStyles=true] Write styles into KML.
*/

View File

@@ -16,10 +16,9 @@ import {get as getProjection} from '../proj.js';
/**
* @typedef {Object} Options
* @property {number|undefined} factor The factor by which the coordinates
* values will be scaled. Default is `1e5`.
* @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the
* feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`.
* @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.
* @property {module:ol/geom/GeometryLayout~GeometryLayout} [geometryLayout='XY'] Layout of the
* feature geometries created by the format reader.
*/

View File

@@ -16,9 +16,8 @@ import {get as getProjection} from '../proj.js';
/**
* @typedef {Object} Options
* @property {module:ol/proj~ProjectionLike} defaultDataProjection Default data projection.
* Default is `EPSG:4326`.
* @property {string|undefined} layerName Set the name of the TopoJSON topology
* @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection.
* @property {string} [layerName] Set the name of the TopoJSON topology
* `objects`'s children as feature property with the specified name. This means
* that when set to `'layer'`, a topology like
* ```
@@ -34,7 +33,7 @@ import {get as getProjection} from '../proj.js';
* ```
* will result in features that have a property `'layer'` set to `'example'`.
* When not set, no property will be added to features.
* @property {Array.<string>|undefined} layers Names of the TopoJSON topology's
* @property {Array.<string>} [layers] Names of the TopoJSON topology's
* `objects`'s children to read features from. If not provided, features will
* be read from all children.
*/