Merge pull request #5450 from probins/typedefs

Remove sub-namespaces from all remaining typedefs
This commit is contained in:
Andreas Hocevar
2016-06-14 17:32:10 +02:00
committed by GitHub
50 changed files with 496 additions and 493 deletions
+23
View File
@@ -10,6 +10,29 @@ Users compiling their code with the library and using types in the `ol.raster` n
* `ol.raster.Operation` to `ol.RasterOperation` * `ol.raster.Operation` to `ol.RasterOperation`
* `ol.raster.OperationType` to `ol.RasterOperationType` * `ol.raster.OperationType` to `ol.RasterOperationType`
#### All typedefs now in ol namespace
Users compiling their code with the library should note that the following typedefs have been renamed; your code may need changing if you use these:
* ol.events.ConditionType to ol.EventsConditionType
* ol.events.EventTargetLike to ol.EventTargetLike
* ol.events.Key to ol.EventsKey
* ol.events.ListenerFunctionType to ol.EventsListenerFunctionType
* ol.interaction.DragBoxEndConditionType to ol.DragBoxEndConditionType
* ol.interaction.DrawGeometryFunctionType to ol.DrawGeometryFunctionType
* ol.interaction.SegmentDataType to ol.ModifySegmentDataType
* ol.interaction.SelectFilterFunction to ol.SelectFilterFunction
* ol.interaction.SnapResultType to ol.SnapResultType
* ol.interaction.SnapSegmentDataType to ol.SnapSegmentDataType
* ol.proj.ProjectionLike to ol.ProjectionLike
* ol.style.AtlasBlock to ol.AtlasBlock
* ol.style.AtlasInfo to ol.AtlasInfo
* ol.style.AtlasManagerInfo to ol.AtlasManagerInfo
* ol.style.CircleRenderOptions to ol.CircleRenderOptions
* ol.style.ImageOptions to ol.StyleImageOptions
* ol.style.GeometryFunction to ol.StyleGeometryFunction
* ol.style.RegularShapeRenderOptions to ol.RegularShapeRenderOptions
* ol.style.StyleFunction to ol.StyleFunction
### v3.16.0 ### v3.16.0
#### Rendering change for tile sources #### Rendering change for tile sources
+100 -100
View File
@@ -40,7 +40,7 @@ olx.DeviceOrientationOptions.prototype.tracking;
/** /**
* @typedef {{tracking: (boolean|undefined), * @typedef {{tracking: (boolean|undefined),
* trackingOptions: (GeolocationPositionOptions|undefined), * trackingOptions: (GeolocationPositionOptions|undefined),
* projection: ol.proj.ProjectionLike}} * projection: ol.ProjectionLike}}
*/ */
olx.GeolocationOptions; olx.GeolocationOptions;
@@ -64,7 +64,7 @@ olx.GeolocationOptions.prototype.trackingOptions;
/** /**
* The projection the position is reported in. * The projection the position is reported in.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.GeolocationOptions.prototype.projection; olx.GeolocationOptions.prototype.projection;
@@ -507,7 +507,7 @@ olx.ProjectionOptions.prototype.getPointResolution;
* maxResolution: (number|undefined), * maxResolution: (number|undefined),
* minZoom: (number|undefined), * minZoom: (number|undefined),
* maxZoom: (number|undefined), * maxZoom: (number|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* resolution: (number|undefined), * resolution: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* rotation: (number|undefined), * rotation: (number|undefined),
@@ -607,7 +607,7 @@ olx.ViewOptions.prototype.minZoom;
/** /**
* The projection. Default is `EPSG:3857` (Spherical Mercator). * The projection. Default is `EPSG:3857` (Spherical Mercator).
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.ViewOptions.prototype.projection; olx.ViewOptions.prototype.projection;
@@ -1105,7 +1105,7 @@ olx.control.FullScreenOptions.prototype.source;
/** /**
* @typedef {{className: (string|undefined), * @typedef {{className: (string|undefined),
* coordinateFormat: (ol.CoordinateFormatType|undefined), * coordinateFormat: (ol.CoordinateFormatType|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* render: (function(ol.MapEvent)|undefined), * render: (function(ol.MapEvent)|undefined),
* target: (Element|undefined), * target: (Element|undefined),
* undefinedHTML: (string|undefined)}} * undefinedHTML: (string|undefined)}}
@@ -1131,7 +1131,7 @@ olx.control.MousePositionOptions.prototype.coordinateFormat;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.control.MousePositionOptions.prototype.projection; olx.control.MousePositionOptions.prototype.projection;
@@ -1576,8 +1576,8 @@ olx.format;
/** /**
* @typedef {{dataProjection: ol.proj.ProjectionLike, * @typedef {{dataProjection: ol.ProjectionLike,
* featureProjection: ol.proj.ProjectionLike, * featureProjection: ol.ProjectionLike,
* rightHanded: (boolean|undefined)}} * rightHanded: (boolean|undefined)}}
*/ */
olx.format.ReadOptions; olx.format.ReadOptions;
@@ -1589,7 +1589,7 @@ olx.format.ReadOptions;
* the format is assigned (where set). If the projection can not be derived from * the format is assigned (where set). If the projection can not be derived from
* the data and if no `defaultDataProjection` is set for a format, the features * the data and if no `defaultDataProjection` is set for a format, the features
* will not be reprojected. * will not be reprojected.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.format.ReadOptions.prototype.dataProjection; olx.format.ReadOptions.prototype.dataProjection;
@@ -1598,15 +1598,15 @@ olx.format.ReadOptions.prototype.dataProjection;
/** /**
* Projection of the feature geometries created by the format reader. If not * Projection of the feature geometries created by the format reader. If not
* provided, features will be returned in the `dataProjection`. * provided, features will be returned in the `dataProjection`.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.format.ReadOptions.prototype.featureProjection; olx.format.ReadOptions.prototype.featureProjection;
/** /**
* @typedef {{dataProjection: ol.proj.ProjectionLike, * @typedef {{dataProjection: ol.ProjectionLike,
* featureProjection: ol.proj.ProjectionLike, * featureProjection: ol.ProjectionLike,
* rightHanded: (boolean|undefined), * rightHanded: (boolean|undefined),
* decimals: (number|undefined)}} * decimals: (number|undefined)}}
*/ */
@@ -1618,7 +1618,7 @@ olx.format.WriteOptions;
* `defaultDataProjection` of the format is assigned (where set). If no * `defaultDataProjection` of the format is assigned (where set). If no
* `defaultDataProjection` is set for a format, the features will be returned * `defaultDataProjection` is set for a format, the features will be returned
* in the `featureProjection`. * in the `featureProjection`.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.format.WriteOptions.prototype.dataProjection; olx.format.WriteOptions.prototype.dataProjection;
@@ -1628,7 +1628,7 @@ olx.format.WriteOptions.prototype.dataProjection;
* Projection of the feature geometries that will be serialized by the format * Projection of the feature geometries that will be serialized by the format
* writer. If not provided, geometries are assumed to be in the * writer. If not provided, geometries are assumed to be in the
* `dataProjection` if that is set; in other words, they are not transformed. * `dataProjection` if that is set; in other words, they are not transformed.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.format.WriteOptions.prototype.featureProjection; olx.format.WriteOptions.prototype.featureProjection;
@@ -1665,7 +1665,7 @@ olx.format.WriteOptions.prototype.decimals;
/** /**
* @typedef {{defaultDataProjection: ol.proj.ProjectionLike, * @typedef {{defaultDataProjection: ol.ProjectionLike,
* geometryName: (string|undefined)}} * geometryName: (string|undefined)}}
*/ */
olx.format.GeoJSONOptions; olx.format.GeoJSONOptions;
@@ -1673,7 +1673,7 @@ olx.format.GeoJSONOptions;
/** /**
* Default data projection. Default is `EPSG:4326`. * Default data projection. Default is `EPSG:4326`.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.format.GeoJSONOptions.prototype.defaultDataProjection; olx.format.GeoJSONOptions.prototype.defaultDataProjection;
@@ -1777,14 +1777,14 @@ olx.format.PolylineOptions.prototype.geometryLayout;
/** /**
* @typedef {{defaultDataProjection: ol.proj.ProjectionLike}} * @typedef {{defaultDataProjection: ol.ProjectionLike}}
*/ */
olx.format.TopoJSONOptions; olx.format.TopoJSONOptions;
/** /**
* Default data projection. Default is `EPSG:4326`. * Default data projection. Default is `EPSG:4326`.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api stable * @api stable
*/ */
olx.format.TopoJSONOptions.prototype.defaultDataProjection; olx.format.TopoJSONOptions.prototype.defaultDataProjection;
@@ -2356,7 +2356,7 @@ olx.interaction.DoubleClickZoomOptions.prototype.delta;
/** /**
* @typedef {{formatConstructors: (Array.<function(new: ol.format.Feature)>|undefined), * @typedef {{formatConstructors: (Array.<function(new: ol.format.Feature)>|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* target: (Element|undefined)}} * target: (Element|undefined)}}
*/ */
olx.interaction.DragAndDropOptions; olx.interaction.DragAndDropOptions;
@@ -2372,7 +2372,7 @@ olx.interaction.DragAndDropOptions.prototype.formatConstructors;
/** /**
* Target projection. By default, the map's view's projection is used. * Target projection. By default, the map's view's projection is used.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.interaction.DragAndDropOptions.prototype.projection; olx.interaction.DragAndDropOptions.prototype.projection;
@@ -2388,8 +2388,8 @@ olx.interaction.DragAndDropOptions.prototype.target;
/** /**
* @typedef {{className: (string|undefined), * @typedef {{className: (string|undefined),
* condition: (ol.events.ConditionType|undefined), * condition: (ol.EventsConditionType|undefined),
* boxEndCondition: (ol.interaction.DragBoxEndConditionType|undefined)}} * boxEndCondition: (ol.DragBoxEndConditionType|undefined)}}
*/ */
olx.interaction.DragBoxOptions; olx.interaction.DragBoxOptions;
@@ -2406,7 +2406,7 @@ olx.interaction.DragBoxOptions.prototype.className;
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.always}. * Default is {@link ol.events.condition.always}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DragBoxOptions.prototype.condition; olx.interaction.DragBoxOptions.prototype.condition;
@@ -2425,7 +2425,7 @@ olx.interaction.DragBoxOptions.prototype.condition;
* ol.DRAG_BOX_HYSTERESIS_PIXELS_SQUARED; * ol.DRAG_BOX_HYSTERESIS_PIXELS_SQUARED;
* } * }
* ``` * ```
* @type {ol.interaction.DragBoxEndConditionType|undefined} * @type {ol.DragBoxEndConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DragBoxOptions.prototype.boxEndCondition; olx.interaction.DragBoxOptions.prototype.boxEndCondition;
@@ -2446,7 +2446,7 @@ olx.interaction.DragPanOptions.prototype.kinetic;
/** /**
* @typedef {{condition: (ol.events.ConditionType|undefined), * @typedef {{condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined)}} * duration: (number|undefined)}}
*/ */
olx.interaction.DragRotateAndZoomOptions; olx.interaction.DragRotateAndZoomOptions;
@@ -2456,7 +2456,7 @@ olx.interaction.DragRotateAndZoomOptions;
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.shiftKeyOnly}. * Default is {@link ol.events.condition.shiftKeyOnly}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DragRotateAndZoomOptions.prototype.condition; olx.interaction.DragRotateAndZoomOptions.prototype.condition;
@@ -2471,7 +2471,7 @@ olx.interaction.DragRotateAndZoomOptions.prototype.duration;
/** /**
* @typedef {{condition: (ol.events.ConditionType|undefined), * @typedef {{condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined)}} * duration: (number|undefined)}}
*/ */
olx.interaction.DragRotateOptions; olx.interaction.DragRotateOptions;
@@ -2481,7 +2481,7 @@ olx.interaction.DragRotateOptions;
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.altShiftKeysOnly}. * Default is {@link ol.events.condition.altShiftKeysOnly}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DragRotateOptions.prototype.condition; olx.interaction.DragRotateOptions.prototype.condition;
@@ -2497,7 +2497,7 @@ olx.interaction.DragRotateOptions.prototype.duration;
/** /**
* @typedef {{className: (string|undefined), * @typedef {{className: (string|undefined),
* condition: (ol.events.ConditionType|undefined), * condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined), * duration: (number|undefined),
* out: (boolean|undefined)}} * out: (boolean|undefined)}}
*/ */
@@ -2516,7 +2516,7 @@ olx.interaction.DragZoomOptions.prototype.className;
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.shiftKeyOnly}. * Default is {@link ol.events.condition.shiftKeyOnly}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DragZoomOptions.prototype.condition; olx.interaction.DragZoomOptions.prototype.condition;
@@ -2546,12 +2546,12 @@ olx.interaction.DragZoomOptions.prototype.out;
* type: ol.geom.GeometryType, * type: ol.geom.GeometryType,
* maxPoints: (number|undefined), * maxPoints: (number|undefined),
* minPoints: (number|undefined), * minPoints: (number|undefined),
* finishCondition: (ol.events.ConditionType|undefined), * finishCondition: (ol.EventsConditionType|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined), * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
* geometryFunction: (ol.interaction.DrawGeometryFunctionType|undefined), * geometryFunction: (ol.DrawGeometryFunctionType|undefined),
* geometryName: (string|undefined), * geometryName: (string|undefined),
* condition: (ol.events.ConditionType|undefined), * condition: (ol.EventsConditionType|undefined),
* freehandCondition: (ol.events.ConditionType|undefined), * freehandCondition: (ol.EventsConditionType|undefined),
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
olx.interaction.DrawOptions; olx.interaction.DrawOptions;
@@ -2623,7 +2623,7 @@ olx.interaction.DrawOptions.prototype.minPoints;
/** /**
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether the drawing can be finished. * to indicate whether the drawing can be finished.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.finishCondition; olx.interaction.DrawOptions.prototype.finishCondition;
@@ -2631,7 +2631,7 @@ olx.interaction.DrawOptions.prototype.finishCondition;
/** /**
* Style for sketch features. * Style for sketch features.
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.style; olx.interaction.DrawOptions.prototype.style;
@@ -2639,7 +2639,7 @@ olx.interaction.DrawOptions.prototype.style;
/** /**
* Function that is called when a geometry's coordinates are updated. * Function that is called when a geometry's coordinates are updated.
* @type {ol.interaction.DrawGeometryFunctionType|undefined} * @type {ol.DrawGeometryFunctionType|undefined}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.geometryFunction; olx.interaction.DrawOptions.prototype.geometryFunction;
@@ -2658,7 +2658,7 @@ olx.interaction.DrawOptions.prototype.geometryName;
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a * By default {@link ol.events.condition.noModifierKeys}, i.e. a click, adds a
* vertex or deactivates freehand drawing. * vertex or deactivates freehand drawing.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.condition; olx.interaction.DrawOptions.prototype.condition;
@@ -2670,7 +2670,7 @@ olx.interaction.DrawOptions.prototype.condition;
* indicate whether that event should be handled. The default is * indicate whether that event should be handled. The default is
* {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key * {@link ol.events.condition.shiftKeyOnly}, meaning that the Shift key
* activates freehand drawing. * activates freehand drawing.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.DrawOptions.prototype.freehandCondition; olx.interaction.DrawOptions.prototype.freehandCondition;
@@ -2715,7 +2715,7 @@ olx.interaction.TranslateOptions.prototype.layers;
/** /**
* @typedef {{condition: (ol.events.ConditionType|undefined), * @typedef {{condition: (ol.EventsConditionType|undefined),
* duration: (number|undefined), * duration: (number|undefined),
* pixelDelta: (number|undefined)}} * pixelDelta: (number|undefined)}}
*/ */
@@ -2727,7 +2727,7 @@ olx.interaction.KeyboardPanOptions;
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.noModifierKeys} and * Default is {@link ol.events.condition.noModifierKeys} and
* {@link ol.events.condition.targetNotEditable}. * {@link ol.events.condition.targetNotEditable}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.KeyboardPanOptions.prototype.condition; olx.interaction.KeyboardPanOptions.prototype.condition;
@@ -2751,7 +2751,7 @@ olx.interaction.KeyboardPanOptions.prototype.pixelDelta;
/** /**
* @typedef {{duration: (number|undefined), * @typedef {{duration: (number|undefined),
* condition: (ol.events.ConditionType|undefined), * condition: (ol.EventsConditionType|undefined),
* delta: (number|undefined)}} * delta: (number|undefined)}}
*/ */
olx.interaction.KeyboardZoomOptions; olx.interaction.KeyboardZoomOptions;
@@ -2769,7 +2769,7 @@ olx.interaction.KeyboardZoomOptions.prototype.duration;
* A function that takes an {@link ol.MapBrowserEvent} and returns a boolean * A function that takes an {@link ol.MapBrowserEvent} and returns a boolean
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* Default is {@link ol.events.condition.targetNotEditable}. * Default is {@link ol.events.condition.targetNotEditable}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.KeyboardZoomOptions.prototype.condition; olx.interaction.KeyboardZoomOptions.prototype.condition;
@@ -2784,10 +2784,10 @@ olx.interaction.KeyboardZoomOptions.prototype.delta;
/** /**
* @typedef {{condition: (ol.events.ConditionType|undefined), * @typedef {{condition: (ol.EventsConditionType|undefined),
* deleteCondition: (ol.events.ConditionType|undefined), * deleteCondition: (ol.EventsConditionType|undefined),
* pixelTolerance: (number|undefined), * pixelTolerance: (number|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined), * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
* features: ol.Collection.<ol.Feature>, * features: ol.Collection.<ol.Feature>,
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
@@ -2799,7 +2799,7 @@ olx.interaction.ModifyOptions;
* to indicate whether that event will be considered to add or move a vertex * to indicate whether that event will be considered to add or move a vertex
* to the sketch. * to the sketch.
* Default is {@link ol.events.condition.primaryAction}. * Default is {@link ol.events.condition.primaryAction}.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.ModifyOptions.prototype.condition; olx.interaction.ModifyOptions.prototype.condition;
@@ -2810,7 +2810,7 @@ olx.interaction.ModifyOptions.prototype.condition;
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, {@link ol.events.condition.singleClick} with * By default, {@link ol.events.condition.singleClick} with
* {@link ol.events.condition.noModifierKeys} results in a vertex deletion. * {@link ol.events.condition.noModifierKeys} results in a vertex deletion.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.ModifyOptions.prototype.deleteCondition; olx.interaction.ModifyOptions.prototype.deleteCondition;
@@ -2828,7 +2828,7 @@ olx.interaction.ModifyOptions.prototype.pixelTolerance;
/** /**
* Style used for the features being modified. By default the default edit * Style used for the features being modified. By default the default edit
* style is used (see {@link ol.style}). * style is used (see {@link ol.style}).
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api * @api
*/ */
olx.interaction.ModifyOptions.prototype.style; olx.interaction.ModifyOptions.prototype.style;
@@ -2971,15 +2971,15 @@ olx.interaction.PointerOptions.prototype.handleUpEvent;
/** /**
* @typedef {{addCondition: (ol.events.ConditionType|undefined), * @typedef {{addCondition: (ol.EventsConditionType|undefined),
* condition: (ol.events.ConditionType|undefined), * condition: (ol.EventsConditionType|undefined),
* layers: (undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean), * layers: (undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined), * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
* removeCondition: (ol.events.ConditionType|undefined), * removeCondition: (ol.EventsConditionType|undefined),
* toggleCondition: (ol.events.ConditionType|undefined), * toggleCondition: (ol.EventsConditionType|undefined),
* multi: (boolean|undefined), * multi: (boolean|undefined),
* features: (ol.Collection.<ol.Feature>|undefined), * features: (ol.Collection.<ol.Feature>|undefined),
* filter: (ol.interaction.SelectFilterFunction|undefined), * filter: (ol.SelectFilterFunction|undefined),
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
olx.interaction.SelectOptions; olx.interaction.SelectOptions;
@@ -2990,7 +2990,7 @@ olx.interaction.SelectOptions;
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, this is {@link ol.events.condition.never}. Use this if you want * By default, this is {@link ol.events.condition.never}. Use this if you want
* to use different events for add and remove instead of `toggle`. * to use different events for add and remove instead of `toggle`.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.addCondition; olx.interaction.SelectOptions.prototype.addCondition;
@@ -3005,7 +3005,7 @@ olx.interaction.SelectOptions.prototype.addCondition;
* feature removes all from the selection. * feature removes all from the selection.
* See `toggle`, `add`, `remove` options for adding/removing extra features to/ * See `toggle`, `add`, `remove` options for adding/removing extra features to/
* from the selection. * from the selection.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.condition; olx.interaction.SelectOptions.prototype.condition;
@@ -3026,7 +3026,7 @@ olx.interaction.SelectOptions.prototype.layers;
/** /**
* Style for the selected features. By default the default edit style is used * Style for the selected features. By default the default edit style is used
* (see {@link ol.style}). * (see {@link ol.style}).
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.style; olx.interaction.SelectOptions.prototype.style;
@@ -3037,7 +3037,7 @@ olx.interaction.SelectOptions.prototype.style;
* to indicate whether that event should be handled. * to indicate whether that event should be handled.
* By default, this is {@link ol.events.condition.never}. Use this if you want * By default, this is {@link ol.events.condition.never}. Use this if you want
* to use different events for add and remove instead of `toggle`. * to use different events for add and remove instead of `toggle`.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.removeCondition; olx.interaction.SelectOptions.prototype.removeCondition;
@@ -3052,7 +3052,7 @@ olx.interaction.SelectOptions.prototype.removeCondition;
* not currently selected, and removes it if it is. * not currently selected, and removes it if it is.
* See `add` and `remove` if you want to use different events instead of a * See `add` and `remove` if you want to use different events instead of a
* toggle. * toggle.
* @type {ol.events.ConditionType|undefined} * @type {ol.EventsConditionType|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.toggleCondition; olx.interaction.SelectOptions.prototype.toggleCondition;
@@ -3080,7 +3080,7 @@ olx.interaction.SelectOptions.prototype.features;
/** /**
* A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and * A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and
* returns `true` if the feature may be selected or `false` otherwise. * returns `true` if the feature may be selected or `false` otherwise.
* @type {ol.interaction.SelectFilterFunction|undefined} * @type {ol.SelectFilterFunction|undefined}
* @api * @api
*/ */
olx.interaction.SelectOptions.prototype.filter; olx.interaction.SelectOptions.prototype.filter;
@@ -3636,7 +3636,7 @@ olx.layer.TileOptions.prototype.useInterimTilesOnError;
* renderBuffer: (number|undefined), * renderBuffer: (number|undefined),
* source: (ol.source.Vector|undefined), * source: (ol.source.Vector|undefined),
* map: (ol.Map|undefined), * map: (ol.Map|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined), * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
* updateWhileAnimating: (boolean|undefined), * updateWhileAnimating: (boolean|undefined),
* updateWhileInteracting: (boolean|undefined), * updateWhileInteracting: (boolean|undefined),
* visible: (boolean|undefined)}} * visible: (boolean|undefined)}}
@@ -3720,7 +3720,7 @@ olx.layer.VectorOptions.prototype.source;
/** /**
* Layer style. See {@link ol.style} for default style which will be used if * Layer style. See {@link ol.style} for default style which will be used if
* this is not defined. * this is not defined.
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api stable * @api stable
*/ */
olx.layer.VectorOptions.prototype.style; olx.layer.VectorOptions.prototype.style;
@@ -3764,7 +3764,7 @@ olx.layer.VectorOptions.prototype.visible;
* renderMode: (ol.layer.VectorTileRenderType|string|undefined), * renderMode: (ol.layer.VectorTileRenderType|string|undefined),
* renderOrder: (function(ol.Feature, ol.Feature):number|undefined), * renderOrder: (function(ol.Feature, ol.Feature):number|undefined),
* source: (ol.source.VectorTile|undefined), * source: (ol.source.VectorTile|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined), * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
* updateWhileAnimating: (boolean|undefined), * updateWhileAnimating: (boolean|undefined),
* updateWhileInteracting: (boolean|undefined), * updateWhileInteracting: (boolean|undefined),
* visible: (boolean|undefined)}} * visible: (boolean|undefined)}}
@@ -3865,7 +3865,7 @@ olx.layer.VectorTileOptions.prototype.source;
/** /**
* Layer style. See {@link ol.style} for default style which will be used if * Layer style. See {@link ol.style} for default style which will be used if
* this is not defined. * this is not defined.
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api stable * @api stable
*/ */
olx.layer.VectorTileOptions.prototype.style; olx.layer.VectorTileOptions.prototype.style;
@@ -4030,7 +4030,7 @@ olx.source.BingMapsOptions.prototype.wrapX;
* format: (ol.format.Feature|undefined), * format: (ol.format.Feature|undefined),
* geometryFunction: (undefined|function(ol.Feature):ol.geom.Point), * geometryFunction: (undefined|function(ol.Feature):ol.geom.Point),
* logo: (string|undefined), * logo: (string|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* source: ol.source.Vector, * source: ol.source.Vector,
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
@@ -4098,7 +4098,7 @@ olx.source.ClusterOptions.prototype.logo;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ClusterOptions.prototype.projection; olx.source.ClusterOptions.prototype.projection;
@@ -4175,7 +4175,7 @@ olx.source.TileUTFGridOptions.prototype.url;
* crossOrigin: (null|string|undefined), * crossOrigin: (null|string|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined), * reprojectionErrorThreshold: (number|undefined),
* state: (ol.source.State|undefined), * state: (ol.source.State|undefined),
* tileClass: (function(new: ol.ImageTile, ol.TileCoord, * tileClass: (function(new: ol.ImageTile, ol.TileCoord,
@@ -4238,7 +4238,7 @@ olx.source.TileImageOptions.prototype.opaque;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.TileImageOptions.prototype.projection; olx.source.TileImageOptions.prototype.projection;
@@ -4345,7 +4345,7 @@ olx.source.TileImageOptions.prototype.wrapX;
* cacheSize: (number|undefined), * cacheSize: (number|undefined),
* format: (ol.format.Feature|undefined), * format: (ol.format.Feature|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* state: (ol.source.State|undefined), * state: (ol.source.State|undefined),
* tileClass: (function(new: ol.VectorTile, ol.TileCoord, * tileClass: (function(new: ol.VectorTile, ol.TileCoord,
* ol.TileState, string, ol.format.Feature, * ol.TileState, string, ol.format.Feature,
@@ -4396,7 +4396,7 @@ olx.source.VectorTileOptions.prototype.logo;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.VectorTileOptions.prototype.projection; olx.source.VectorTileOptions.prototype.projection;
@@ -4499,7 +4499,7 @@ olx.source.VectorTileOptions.prototype.wrapX;
* metersPerUnit: (number|undefined), * metersPerUnit: (number|undefined),
* hidpi: (boolean|undefined), * hidpi: (boolean|undefined),
* useOverlay: (boolean|undefined), * useOverlay: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* ratio: (number|undefined), * ratio: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
@@ -4551,7 +4551,7 @@ olx.source.ImageMapGuideOptions.prototype.useOverlay;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ImageMapGuideOptions.prototype.projection; olx.source.ImageMapGuideOptions.prototype.projection;
@@ -4648,7 +4648,7 @@ olx.source.MapQuestOptions.prototype.url;
/** /**
* @typedef {{projection: ol.proj.ProjectionLike, * @typedef {{projection: ol.ProjectionLike,
* tileGrid: (ol.tilegrid.TileGrid|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined),
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
@@ -4657,7 +4657,7 @@ olx.source.TileDebugOptions;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.TileDebugOptions.prototype.projection; olx.source.TileDebugOptions.prototype.projection;
@@ -4784,7 +4784,7 @@ olx.source.OSMOptions.prototype.wrapX;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
* params: Object.<string,*>, * params: Object.<string,*>,
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* ratio: (number|undefined), * ratio: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* url: (string|undefined)}} * url: (string|undefined)}}
@@ -4844,7 +4844,7 @@ olx.source.ImageArcGISRestOptions.prototype.params;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ImageArcGISRestOptions.prototype.projection; olx.source.ImageArcGISRestOptions.prototype.projection;
@@ -4880,7 +4880,7 @@ olx.source.ImageArcGISRestOptions.prototype.url;
* @typedef {{attributions: (ol.AttributionLike|undefined), * @typedef {{attributions: (ol.AttributionLike|undefined),
* canvasFunction: ol.CanvasFunctionType, * canvasFunction: ol.CanvasFunctionType,
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* ratio: (number|undefined), * ratio: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* state: (ol.source.State|undefined)}} * state: (ol.source.State|undefined)}}
@@ -4921,7 +4921,7 @@ olx.source.ImageCanvasOptions.prototype.logo;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ImageCanvasOptions.prototype.projection; olx.source.ImageCanvasOptions.prototype.projection;
@@ -4957,11 +4957,11 @@ olx.source.ImageCanvasOptions.prototype.state;
/** /**
* @typedef {{attributions: (ol.AttributionLike|undefined), * @typedef {{attributions: (ol.AttributionLike|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* ratio: (number|undefined), * ratio: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* source: ol.source.Vector, * source: ol.source.Vector,
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined)}} * style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined)}}
*/ */
olx.source.ImageVectorOptions; olx.source.ImageVectorOptions;
@@ -4984,7 +4984,7 @@ olx.source.ImageVectorOptions.prototype.logo;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ImageVectorOptions.prototype.projection; olx.source.ImageVectorOptions.prototype.projection;
@@ -5020,7 +5020,7 @@ olx.source.ImageVectorOptions.prototype.source;
/** /**
* Style to use when rendering features to the canvas. * Style to use when rendering features to the canvas.
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* @api * @api
*/ */
olx.source.ImageVectorOptions.prototype.style; olx.source.ImageVectorOptions.prototype.style;
@@ -5093,7 +5093,7 @@ olx.source.RasterOptions.prototype.operationType;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
* params: Object.<string,*>, * params: Object.<string,*>,
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* ratio: (number|undefined), * ratio: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* url: (string|undefined)}} * url: (string|undefined)}}
@@ -5167,7 +5167,7 @@ olx.source.ImageWMSOptions.prototype.params;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ImageWMSOptions.prototype.projection; olx.source.ImageWMSOptions.prototype.projection;
@@ -5288,7 +5288,7 @@ olx.source.StamenOptions.prototype.url;
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
* imageSize: (ol.Size|undefined), * imageSize: (ol.Size|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* url: string}} * url: string}}
*/ */
olx.source.ImageStaticOptions; olx.source.ImageStaticOptions;
@@ -5341,7 +5341,7 @@ olx.source.ImageStaticOptions.prototype.logo;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.ImageStaticOptions.prototype.projection; olx.source.ImageStaticOptions.prototype.projection;
@@ -5371,7 +5371,7 @@ olx.source.ImageStaticOptions.prototype.url;
* params: (Object.<string, *>|undefined), * params: (Object.<string, *>|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined), * reprojectionErrorThreshold: (number|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined), * url: (string|undefined),
@@ -5445,7 +5445,7 @@ olx.source.TileArcGISRestOptions.prototype.tileGrid;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.TileArcGISRestOptions.prototype.projection; olx.source.TileArcGISRestOptions.prototype.projection;
@@ -5599,7 +5599,7 @@ olx.source.TileJSONOptions.prototype.wrapX;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined),
* maxZoom: (number|undefined), * maxZoom: (number|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined), * reprojectionErrorThreshold: (number|undefined),
* serverType: (ol.source.wms.ServerType|string|undefined), * serverType: (ol.source.wms.ServerType|string|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined),
@@ -5702,7 +5702,7 @@ olx.source.TileWMSOptions.prototype.maxZoom;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.TileWMSOptions.prototype.projection; olx.source.TileWMSOptions.prototype.projection;
@@ -5892,7 +5892,7 @@ olx.source.VectorOptions.prototype.wrapX;
* crossOrigin: (string|null|undefined), * crossOrigin: (string|null|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* tileGrid: ol.tilegrid.WMTS, * tileGrid: ol.tilegrid.WMTS,
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined), * reprojectionErrorThreshold: (number|undefined),
* requestEncoding: (ol.source.WMTSRequestEncoding|string|undefined), * requestEncoding: (ol.source.WMTSRequestEncoding|string|undefined),
* layer: string, * layer: string,
@@ -5960,7 +5960,7 @@ olx.source.WMTSOptions.prototype.tileGrid;
/** /**
* Projection. * Projection.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.WMTSOptions.prototype.projection; olx.source.WMTSOptions.prototype.projection;
@@ -6107,7 +6107,7 @@ olx.source.WMTSOptions.prototype.wrapX;
* crossOrigin: (null|string|undefined), * crossOrigin: (null|string|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined), * reprojectionErrorThreshold: (number|undefined),
* maxZoom: (number|undefined), * maxZoom: (number|undefined),
* minZoom: (number|undefined), * minZoom: (number|undefined),
@@ -6169,7 +6169,7 @@ olx.source.XYZOptions.prototype.opaque;
/** /**
* Projection. Default is `EPSG:3857`. * Projection. Default is `EPSG:3857`.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.XYZOptions.prototype.projection; olx.source.XYZOptions.prototype.projection;
@@ -6279,7 +6279,7 @@ olx.source.XYZOptions.prototype.wrapX;
* cacheSize: (number|undefined), * cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined), * crossOrigin: (null|string|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* maxZoom: (number|undefined), * maxZoom: (number|undefined),
* minZoom: (number|undefined), * minZoom: (number|undefined),
* wrapX: (boolean|undefined), * wrapX: (boolean|undefined),
@@ -6328,7 +6328,7 @@ olx.source.CartoDBOptions.prototype.logo;
/** /**
* Projection. Default is `EPSG:3857`. * Projection. Default is `EPSG:3857`.
* @type {ol.proj.ProjectionLike} * @type {ol.ProjectionLike}
* @api * @api
*/ */
olx.source.CartoDBOptions.prototype.projection; olx.source.CartoDBOptions.prototype.projection;
@@ -7017,7 +7017,7 @@ olx.style.TextOptions.prototype.stroke;
/** /**
* @typedef {{geometry: (undefined|string|ol.geom.Geometry|ol.style.GeometryFunction), * @typedef {{geometry: (undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction),
* fill: (ol.style.Fill|undefined), * fill: (ol.style.Fill|undefined),
* image: (ol.style.Image|undefined), * image: (ol.style.Image|undefined),
* stroke: (ol.style.Stroke|undefined), * stroke: (ol.style.Stroke|undefined),
@@ -7030,7 +7030,7 @@ olx.style.StyleOptions;
/** /**
* Feature property or geometry or function returning a geometry to render for * Feature property or geometry or function returning a geometry to render for
* this style. * this style.
* @type {undefined|string|ol.geom.Geometry|ol.style.GeometryFunction} * @type {undefined|string|ol.geom.Geometry|ol.StyleGeometryFunction}
* @api * @api
*/ */
olx.style.StyleOptions.prototype.geometry; olx.style.StyleOptions.prototype.geometry;
+1 -1
View File
@@ -60,7 +60,7 @@ ol.control.Control = function(options) {
/** /**
* @protected * @protected
* @type {!Array.<ol.events.Key>} * @type {!Array.<ol.EventsKey>}
*/ */
this.listenerKeys = []; this.listenerKeys = [];
+1 -1
View File
@@ -58,7 +58,7 @@ ol.control.ZoomSlider = function(opt_options) {
this.dragging_; this.dragging_;
/** /**
* @type {!Array.<ol.events.Key>} * @type {!Array.<ol.EventsKey>}
* @private * @private
*/ */
this.dragListenerKeys_ = []; this.dragListenerKeys_ = [];
+1 -1
View File
@@ -83,7 +83,7 @@ ol.DeviceOrientation = function(opt_options) {
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.listenerKey_ = null; this.listenerKey_ = null;
+21 -22
View File
@@ -3,7 +3,6 @@ goog.provide('ol.events.EventType');
goog.provide('ol.events.KeyCode'); goog.provide('ol.events.KeyCode');
goog.require('ol.object'); goog.require('ol.object');
goog.require('ol.events.EventTargetLike');
/** /**
@@ -63,8 +62,8 @@ ol.events.LISTENER_MAP_PROP_ = 'olm_' + ((Math.random() * 1e4) | 0);
/** /**
* @param {ol.events.Key} listenerObj Listener object. * @param {ol.EventsKey} listenerObj Listener object.
* @return {ol.events.ListenerFunctionType} Bound listener. * @return {ol.EventsListenerFunctionType} Bound listener.
*/ */
ol.events.bindListener_ = function(listenerObj) { ol.events.bindListener_ = function(listenerObj) {
var boundListener = function(evt) { var boundListener = function(evt) {
@@ -81,15 +80,15 @@ ol.events.bindListener_ = function(listenerObj) {
/** /**
* Finds the matching {@link ol.events.Key} in the given listener * Finds the matching {@link ol.EventsKey} in the given listener
* array. * array.
* *
* @param {!Array<!ol.events.Key>} listeners Array of listeners. * @param {!Array<!ol.EventsKey>} listeners Array of listeners.
* @param {!Function} listener The listener function. * @param {!Function} listener The listener function.
* @param {Object=} opt_this The `this` value inside the listener. * @param {Object=} opt_this The `this` value inside the listener.
* @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching * @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching
* listener, for {@link ol.events.unlistenByKey}. * listener, for {@link ol.events.unlistenByKey}.
* @return {ol.events.Key|undefined} The matching listener object. * @return {ol.EventsKey|undefined} The matching listener object.
* @private * @private
*/ */
ol.events.findListener_ = function(listeners, listener, opt_this, ol.events.findListener_ = function(listeners, listener, opt_this,
@@ -110,9 +109,9 @@ ol.events.findListener_ = function(listeners, listener, opt_this,
/** /**
* @param {ol.events.EventTargetLike} target Target. * @param {ol.EventTargetLike} target Target.
* @param {string} type Type. * @param {string} type Type.
* @return {Array.<ol.events.Key>|undefined} Listeners. * @return {Array.<ol.EventsKey>|undefined} Listeners.
*/ */
ol.events.getListeners = function(target, type) { ol.events.getListeners = function(target, type) {
var listenerMap = target[ol.events.LISTENER_MAP_PROP_]; var listenerMap = target[ol.events.LISTENER_MAP_PROP_];
@@ -123,8 +122,8 @@ ol.events.getListeners = function(target, type) {
/** /**
* Get the lookup of listeners. If one does not exist on the target, it is * Get the lookup of listeners. If one does not exist on the target, it is
* created. * created.
* @param {ol.events.EventTargetLike} target Target. * @param {ol.EventTargetLike} target Target.
* @return {!Object.<string, Array.<ol.events.Key>>} Map of * @return {!Object.<string, Array.<ol.EventsKey>>} Map of
* listeners by event type. * listeners by event type.
* @private * @private
*/ */
@@ -141,7 +140,7 @@ ol.events.getListenerMap_ = function(target) {
* Clean up all listener objects of the given type. All properties on the * Clean up all listener objects of the given type. All properties on the
* listener objects will be removed, and if no listeners remain in the listener * listener objects will be removed, and if no listeners remain in the listener
* map, it will be removed from the target. * map, it will be removed from the target.
* @param {ol.events.EventTargetLike} target Target. * @param {ol.EventTargetLike} target Target.
* @param {string} type Type. * @param {string} type Type.
* @private * @private
*/ */
@@ -171,13 +170,13 @@ ol.events.removeListeners_ = function(target, type) {
* This function efficiently binds a `listener` to a `this` object, and returns * This function efficiently binds a `listener` to a `this` object, and returns
* a key for use with {@link ol.events.unlistenByKey}. * a key for use with {@link ol.events.unlistenByKey}.
* *
* @param {ol.events.EventTargetLike} target Event target. * @param {ol.EventTargetLike} target Event target.
* @param {string} type Event type. * @param {string} type Event type.
* @param {ol.events.ListenerFunctionType} listener Listener. * @param {ol.EventsListenerFunctionType} listener Listener.
* @param {Object=} opt_this Object referenced by the `this` keyword in the * @param {Object=} opt_this Object referenced by the `this` keyword in the
* listener. Default is the `target`. * listener. Default is the `target`.
* @param {boolean=} opt_once If true, add the listener as one-off listener. * @param {boolean=} opt_once If true, add the listener as one-off listener.
* @return {ol.events.Key} Unique key for the listener. * @return {ol.EventsKey} Unique key for the listener.
*/ */
ol.events.listen = function(target, type, listener, opt_this, opt_once) { ol.events.listen = function(target, type, listener, opt_this, opt_once) {
var listenerMap = ol.events.getListenerMap_(target); var listenerMap = ol.events.getListenerMap_(target);
@@ -193,7 +192,7 @@ ol.events.listen = function(target, type, listener, opt_this, opt_once) {
listenerObj.callOnce = false; listenerObj.callOnce = false;
} }
} else { } else {
listenerObj = /** @type {ol.events.Key} */ ({ listenerObj = /** @type {ol.EventsKey} */ ({
bindTo: opt_this, bindTo: opt_this,
callOnce: !!opt_once, callOnce: !!opt_once,
listener: listener, listener: listener,
@@ -221,12 +220,12 @@ ol.events.listen = function(target, type, listener, opt_this, opt_once) {
* function, the self-unregistering listener will be turned into a permanent * function, the self-unregistering listener will be turned into a permanent
* listener. * listener.
* *
* @param {ol.events.EventTargetLike} target Event target. * @param {ol.EventTargetLike} target Event target.
* @param {string} type Event type. * @param {string} type Event type.
* @param {ol.events.ListenerFunctionType} listener Listener. * @param {ol.EventsListenerFunctionType} listener Listener.
* @param {Object=} opt_this Object referenced by the `this` keyword in the * @param {Object=} opt_this Object referenced by the `this` keyword in the
* listener. Default is the `target`. * listener. Default is the `target`.
* @return {ol.events.Key} Key for unlistenByKey. * @return {ol.EventsKey} Key for unlistenByKey.
*/ */
ol.events.listenOnce = function(target, type, listener, opt_this) { ol.events.listenOnce = function(target, type, listener, opt_this) {
return ol.events.listen(target, type, listener, opt_this, true); return ol.events.listen(target, type, listener, opt_this, true);
@@ -240,9 +239,9 @@ ol.events.listenOnce = function(target, type, listener, opt_this) {
* To return a listener, this function needs to be called with the exact same * To return a listener, this function needs to be called with the exact same
* arguments that were used for a previous {@link ol.events.listen} call. * arguments that were used for a previous {@link ol.events.listen} call.
* *
* @param {ol.events.EventTargetLike} target Event target. * @param {ol.EventTargetLike} target Event target.
* @param {string} type Event type. * @param {string} type Event type.
* @param {ol.events.ListenerFunctionType} listener Listener. * @param {ol.EventsListenerFunctionType} listener Listener.
* @param {Object=} opt_this Object referenced by the `this` keyword in the * @param {Object=} opt_this Object referenced by the `this` keyword in the
* listener. Default is the `target`. * listener. Default is the `target`.
*/ */
@@ -265,7 +264,7 @@ ol.events.unlisten = function(target, type, listener, opt_this) {
* The argument passed to this function is the key returned from * The argument passed to this function is the key returned from
* {@link ol.events.listen} or {@link ol.events.listenOnce}. * {@link ol.events.listen} or {@link ol.events.listenOnce}.
* *
* @param {ol.events.Key} key The key. * @param {ol.EventsKey} key The key.
*/ */
ol.events.unlistenByKey = function(key) { ol.events.unlistenByKey = function(key) {
if (key && key.target) { if (key && key.target) {
@@ -289,7 +288,7 @@ ol.events.unlistenByKey = function(key) {
* Unregisters all event listeners on an event target. Inspired by * Unregisters all event listeners on an event target. Inspired by
* {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html} * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
* *
* @param {ol.events.EventTargetLike} target Target. * @param {ol.EventTargetLike} target Target.
*/ */
ol.events.unlistenAll = function(target) { ol.events.unlistenAll = function(target) {
var listenerMap = ol.events.getListenerMap_(target); var listenerMap = ol.events.getListenerMap_(target);
+5 -4
View File
@@ -5,6 +5,7 @@ goog.require('ol.Disposable');
goog.require('ol.events'); goog.require('ol.events');
goog.require('ol.events.Event'); goog.require('ol.events.Event');
/** /**
* @classdesc * @classdesc
* A simplified implementation of the W3C DOM Level 2 EventTarget interface. * A simplified implementation of the W3C DOM Level 2 EventTarget interface.
@@ -41,7 +42,7 @@ ol.events.EventTarget = function() {
/** /**
* @private * @private
* @type {!Object.<string, Array.<ol.events.ListenerFunctionType>>} * @type {!Object.<string, Array.<ol.EventsListenerFunctionType>>}
*/ */
this.listeners_ = {}; this.listeners_ = {};
@@ -51,7 +52,7 @@ ol.inherits(ol.events.EventTarget, ol.Disposable);
/** /**
* @param {string} type Type. * @param {string} type Type.
* @param {ol.events.ListenerFunctionType} listener Listener. * @param {ol.EventsListenerFunctionType} listener Listener.
*/ */
ol.events.EventTarget.prototype.addEventListener = function(type, listener) { ol.events.EventTarget.prototype.addEventListener = function(type, listener) {
var listeners = this.listeners_[type]; var listeners = this.listeners_[type];
@@ -116,7 +117,7 @@ ol.events.EventTarget.prototype.disposeInternal = function() {
* order that they will be called in. * order that they will be called in.
* *
* @param {string} type Type. * @param {string} type Type.
* @return {Array.<ol.events.ListenerFunctionType>} Listeners. * @return {Array.<ol.EventsListenerFunctionType>} Listeners.
*/ */
ol.events.EventTarget.prototype.getListeners = function(type) { ol.events.EventTarget.prototype.getListeners = function(type) {
return this.listeners_[type]; return this.listeners_[type];
@@ -137,7 +138,7 @@ ol.events.EventTarget.prototype.hasListener = function(opt_type) {
/** /**
* @param {string} type Type. * @param {string} type Type.
* @param {ol.events.ListenerFunctionType} listener Listener. * @param {ol.EventsListenerFunctionType} listener Listener.
*/ */
ol.events.EventTarget.prototype.removeEventListener = function(type, listener) { ol.events.EventTarget.prototype.removeEventListener = function(type, listener) {
var listeners = this.listeners_[type]; var listeners = this.listeners_[type];
+1 -1
View File
@@ -86,7 +86,7 @@ ol.Feature = function(opt_geometryOrProperties) {
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.geometryChangeKey_ = null; this.geometryChangeKey_ = null;
+1 -3
View File
@@ -18,8 +18,6 @@ goog.provide('ol.format.ogc.filter.IsNull');
goog.provide('ol.format.ogc.filter.IsBetween'); goog.provide('ol.format.ogc.filter.IsBetween');
goog.provide('ol.format.ogc.filter.IsLike'); goog.provide('ol.format.ogc.filter.IsLike');
goog.require('ol.Extent');
/** /**
* Create a logical `<And>` operator between two filter conditions. * Create a logical `<And>` operator between two filter conditions.
@@ -365,7 +363,7 @@ ol.format.ogc.filter.Bbox = function(geometryName, extent, opt_srsName) {
/** /**
* @public * @public
* @type {!ol.Extent} * @type {ol.Extent}
*/ */
this.extent = extent; this.extent = extent;
+2 -3
View File
@@ -6,7 +6,6 @@ goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.GeometryType'); goog.require('ol.geom.GeometryType');
goog.require('ol.geom.SimpleGeometry'); goog.require('ol.geom.SimpleGeometry');
goog.require('ol.geom.flat.deflate'); goog.require('ol.geom.flat.deflate');
goog.require('ol.proj');
/** /**
@@ -244,9 +243,9 @@ ol.geom.Circle.prototype.setRadius = function(radius) {
* correspond to the shape that would be obtained by transforming every point * correspond to the shape that would be obtained by transforming every point
* of the original circle. * of the original circle.
* *
* @param {ol.proj.ProjectionLike} source The current projection. Can be a * @param {ol.ProjectionLike} source The current projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link ol.proj.Projection} object.
* @param {ol.proj.ProjectionLike} destination The desired projection. Can be a * @param {ol.ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link ol.proj.Projection} object.
* @return {ol.geom.Circle} This geometry. Note that original geometry is * @return {ol.geom.Circle} This geometry. Note that original geometry is
* modified in place. * modified in place.
+2 -2
View File
@@ -251,9 +251,9 @@ ol.geom.Geometry.prototype.translate = goog.abstractMethod;
* If you do not want the geometry modified in place, first `clone()` it and * If you do not want the geometry modified in place, first `clone()` it and
* then use this function on the clone. * then use this function on the clone.
* *
* @param {ol.proj.ProjectionLike} source The current projection. Can be a * @param {ol.ProjectionLike} source The current projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link ol.proj.Projection} object.
* @param {ol.proj.ProjectionLike} destination The desired projection. Can be a * @param {ol.ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link ol.proj.Projection} object. * string identifier or a {@link ol.proj.Projection} object.
* @return {ol.geom.Geometry} This geometry. Note that original geometry is * @return {ol.geom.Geometry} This geometry. Note that original geometry is
* modified in place. * modified in place.
+1 -1
View File
@@ -49,7 +49,7 @@ ol.Image = function(extent, resolution, pixelRatio, attributions, src,
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.imageListenerKeys_ = null; this.imageListenerKeys_ = null;
+1 -1
View File
@@ -46,7 +46,7 @@ ol.ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction) {
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.imageListenerKeys_ = null; this.imageListenerKeys_ = null;
+1 -1
View File
@@ -46,7 +46,7 @@ ol.interaction.DragAndDrop = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.dropListenKeys_ = null; this.dropListenKeys_ = null;
+2 -2
View File
@@ -120,14 +120,14 @@ ol.interaction.DragBox = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.always; options.condition : ol.events.condition.always;
/** /**
* @private * @private
* @type {ol.interaction.DragBoxEndConditionType} * @type {ol.DragBoxEndConditionType}
*/ */
this.boxEndCondition_ = options.boxEndCondition ? this.boxEndCondition_ = options.boxEndCondition ?
options.boxEndCondition : ol.interaction.DragBox.defaultBoxEndCondition; options.boxEndCondition : ol.interaction.DragBox.defaultBoxEndCondition;
+1 -1
View File
@@ -48,7 +48,7 @@ ol.interaction.DragPan = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.noModifierKeys; options.condition : ol.events.condition.noModifierKeys;
@@ -34,7 +34,7 @@ ol.interaction.DragRotateAndZoom = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.shiftKeyOnly; options.condition : ol.events.condition.shiftKeyOnly;
+1 -1
View File
@@ -33,7 +33,7 @@ ol.interaction.DragRotate = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.altShiftKeysOnly; options.condition : ol.events.condition.altShiftKeysOnly;
+6 -6
View File
@@ -161,7 +161,7 @@ ol.interaction.Draw = function(options) {
/** /**
* A function to decide if a potential finish coordinate is permissable * A function to decide if a potential finish coordinate is permissable
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.finishCondition_ = options.finishCondition ? options.finishCondition : ol.functions.TRUE; this.finishCondition_ = options.finishCondition ? options.finishCondition : ol.functions.TRUE;
@@ -213,7 +213,7 @@ ol.interaction.Draw = function(options) {
} }
/** /**
* @type {ol.interaction.DrawGeometryFunctionType} * @type {ol.DrawGeometryFunctionType}
* @private * @private
*/ */
this.geometryFunction_ = geometryFunction; this.geometryFunction_ = geometryFunction;
@@ -294,14 +294,14 @@ ol.interaction.Draw = function(options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.noModifierKeys; options.condition : ol.events.condition.noModifierKeys;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.freehandCondition_ = options.freehandCondition ? this.freehandCondition_ = options.freehandCondition ?
options.freehandCondition : ol.events.condition.shiftKeyOnly; options.freehandCondition : ol.events.condition.shiftKeyOnly;
@@ -315,7 +315,7 @@ ol.inherits(ol.interaction.Draw, ol.interaction.Pointer);
/** /**
* @return {ol.style.StyleFunction} Styles. * @return {ol.StyleFunction} Styles.
*/ */
ol.interaction.Draw.getDefaultStyleFunction = function() { ol.interaction.Draw.getDefaultStyleFunction = function() {
var styles = ol.style.createDefaultEditingStyles(); var styles = ol.style.createDefaultEditingStyles();
@@ -795,7 +795,7 @@ ol.interaction.Draw.prototype.updateState_ = function() {
* @param {number=} opt_angle Angle of the first point in radians. 0 means East. * @param {number=} opt_angle Angle of the first point in radians. 0 means East.
* Default is the angle defined by the heading from the center of the * Default is the angle defined by the heading from the center of the
* regular polygon to the current pointer position. * regular polygon to the current pointer position.
* @return {ol.interaction.DrawGeometryFunctionType} Function that draws a * @return {ol.DrawGeometryFunctionType} Function that draws a
* polygon. * polygon.
* @api * @api
*/ */
+1 -1
View File
@@ -46,7 +46,7 @@ ol.interaction.KeyboardPan = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition !== undefined ? this.condition_ = options.condition !== undefined ?
options.condition : this.defaultCondition_; options.condition : this.defaultCondition_;
@@ -33,7 +33,7 @@ ol.interaction.KeyboardZoom = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? options.condition : this.condition_ = options.condition ? options.condition :
ol.events.condition.targetNotEditable; ol.events.condition.targetNotEditable;
+18 -18
View File
@@ -103,7 +103,7 @@ ol.interaction.Modify = function(options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.primaryAction; options.condition : ol.events.condition.primaryAction;
@@ -120,7 +120,7 @@ ol.interaction.Modify = function(options) {
}; };
/** /**
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
* @private * @private
*/ */
this.deleteCondition_ = options.deleteCondition ? this.deleteCondition_ = options.deleteCondition ?
@@ -162,7 +162,7 @@ ol.interaction.Modify = function(options) {
/** /**
* Segment RTree for each layer * Segment RTree for each layer
* @type {ol.structs.RBush.<ol.interaction.SegmentDataType>} * @type {ol.structs.RBush.<ol.ModifySegmentDataType>}
* @private * @private
*/ */
this.rBush_ = new ol.structs.RBush(); this.rBush_ = new ol.structs.RBush();
@@ -302,10 +302,10 @@ ol.interaction.Modify.prototype.removeFeature_ = function(feature) {
*/ */
ol.interaction.Modify.prototype.removeFeatureSegmentData_ = function(feature) { ol.interaction.Modify.prototype.removeFeatureSegmentData_ = function(feature) {
var rBush = this.rBush_; var rBush = this.rBush_;
var /** @type {Array.<ol.interaction.SegmentDataType>} */ nodesToRemove = []; var /** @type {Array.<ol.ModifySegmentDataType>} */ nodesToRemove = [];
rBush.forEach( rBush.forEach(
/** /**
* @param {ol.interaction.SegmentDataType} node RTree node. * @param {ol.ModifySegmentDataType} node RTree node.
*/ */
function(node) { function(node) {
if (feature === node.feature) { if (feature === node.feature) {
@@ -369,7 +369,7 @@ ol.interaction.Modify.prototype.handleFeatureRemove_ = function(evt) {
*/ */
ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) { ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates(); var coordinates = geometry.getCoordinates();
var segmentData = /** @type {ol.interaction.SegmentDataType} */ ({ var segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
segment: [coordinates, coordinates] segment: [coordinates, coordinates]
@@ -388,7 +388,7 @@ ol.interaction.Modify.prototype.writeMultiPointGeometry_ = function(feature, geo
var coordinates, i, ii, segmentData; var coordinates, i, ii, segmentData;
for (i = 0, ii = points.length; i < ii; ++i) { for (i = 0, ii = points.length; i < ii; ++i) {
coordinates = points[i]; coordinates = points[i];
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({ segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
depth: [i], depth: [i],
@@ -410,7 +410,7 @@ ol.interaction.Modify.prototype.writeLineStringGeometry_ = function(feature, geo
var i, ii, segment, segmentData; var i, ii, segment, segmentData;
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({ segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
index: i, index: i,
@@ -433,7 +433,7 @@ ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ = function(feature
coordinates = lines[j]; coordinates = lines[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({ segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
depth: [j], depth: [j],
@@ -458,7 +458,7 @@ ol.interaction.Modify.prototype.writePolygonGeometry_ = function(feature, geomet
coordinates = rings[j]; coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({ segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
depth: [j], depth: [j],
@@ -485,7 +485,7 @@ ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ = function(feature, g
coordinates = rings[j]; coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({ segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
depth: [j, k], depth: [j, k],
@@ -533,8 +533,8 @@ ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ = function(coordina
/** /**
* @param {ol.interaction.SegmentDataType} a The first segment data. * @param {ol.ModifySegmentDataType} a The first segment data.
* @param {ol.interaction.SegmentDataType} b The second segment data. * @param {ol.ModifySegmentDataType} b The second segment data.
* @return {number} The difference in indexes. * @return {number} The difference in indexes.
* @private * @private
*/ */
@@ -808,7 +808,7 @@ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {
/** /**
* @param {ol.interaction.SegmentDataType} segmentData Segment data. * @param {ol.ModifySegmentDataType} segmentData Segment data.
* @param {ol.Coordinate} vertex Vertex. * @param {ol.Coordinate} vertex Vertex.
* @private * @private
*/ */
@@ -859,7 +859,7 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
rTree.remove(segmentData); rTree.remove(segmentData);
goog.asserts.assert(index !== undefined, 'index should be defined'); goog.asserts.assert(index !== undefined, 'index should be defined');
this.updateSegmentIndices_(geometry, index, depth, 1); this.updateSegmentIndices_(geometry, index, depth, 1);
var newSegmentData = /** @type {ol.interaction.SegmentDataType} */ ({ var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
segment: [segment[0], vertex], segment: [segment[0], vertex],
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
@@ -870,7 +870,7 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
newSegmentData); newSegmentData);
this.dragSegments_.push([newSegmentData, 1]); this.dragSegments_.push([newSegmentData, 1]);
var newSegmentData2 = /** @type {ol.interaction.SegmentDataType} */ ({ var newSegmentData2 = /** @type {ol.ModifySegmentDataType} */ ({
segment: [vertex, segment[1]], segment: [vertex, segment[1]],
feature: feature, feature: feature,
geometry: geometry, geometry: geometry,
@@ -998,7 +998,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
if (left !== undefined && right !== undefined) { if (left !== undefined && right !== undefined) {
goog.asserts.assert(newIndex >= 0, 'newIndex should be larger than 0'); goog.asserts.assert(newIndex >= 0, 'newIndex should be larger than 0');
var newSegmentData = /** @type {ol.interaction.SegmentDataType} */ ({ var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
depth: segmentData.depth, depth: segmentData.depth,
feature: segmentData.feature, feature: segmentData.feature,
geometry: segmentData.geometry, geometry: segmentData.geometry,
@@ -1053,7 +1053,7 @@ ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
/** /**
* @return {ol.style.StyleFunction} Styles. * @return {ol.StyleFunction} Styles.
*/ */
ol.interaction.Modify.getDefaultStyleFunction = function() { ol.interaction.Modify.getDefaultStyleFunction = function() {
var style = ol.style.createDefaultEditingStyles(); var style = ol.style.createDefaultEditingStyles();
+6 -6
View File
@@ -99,28 +99,28 @@ ol.interaction.Select = function(opt_options) {
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.condition_ = options.condition ? this.condition_ = options.condition ?
options.condition : ol.events.condition.singleClick; options.condition : ol.events.condition.singleClick;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.addCondition_ = options.addCondition ? this.addCondition_ = options.addCondition ?
options.addCondition : ol.events.condition.never; options.addCondition : ol.events.condition.never;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.removeCondition_ = options.removeCondition ? this.removeCondition_ = options.removeCondition ?
options.removeCondition : ol.events.condition.never; options.removeCondition : ol.events.condition.never;
/** /**
* @private * @private
* @type {ol.events.ConditionType} * @type {ol.EventsConditionType}
*/ */
this.toggleCondition_ = options.toggleCondition ? this.toggleCondition_ = options.toggleCondition ?
options.toggleCondition : ol.events.condition.shiftKeyOnly; options.toggleCondition : ol.events.condition.shiftKeyOnly;
@@ -133,7 +133,7 @@ ol.interaction.Select = function(opt_options) {
/** /**
* @private * @private
* @type {ol.interaction.SelectFilterFunction} * @type {ol.SelectFilterFunction}
*/ */
this.filter_ = options.filter ? options.filter : this.filter_ = options.filter ? options.filter :
ol.functions.TRUE; ol.functions.TRUE;
@@ -355,7 +355,7 @@ ol.interaction.Select.prototype.setMap = function(map) {
/** /**
* @return {ol.style.StyleFunction} Styles. * @return {ol.StyleFunction} Styles.
*/ */
ol.interaction.Select.getDefaultStyleFunction = function() { ol.interaction.Select.getDefaultStyleFunction = function() {
var styles = ol.style.createDefaultEditingStyles(); var styles = ol.style.createDefaultEditingStyles();
+15 -15
View File
@@ -80,19 +80,19 @@ ol.interaction.Snap = function(opt_options) {
this.features_ = options.features ? options.features : null; this.features_ = options.features ? options.features : null;
/** /**
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
* @private * @private
*/ */
this.featuresListenerKeys_ = []; this.featuresListenerKeys_ = [];
/** /**
* @type {Object.<number, ol.events.Key>} * @type {Object.<number, ol.EventsKey>}
* @private * @private
*/ */
this.geometryChangeListenerKeys_ = {}; this.geometryChangeListenerKeys_ = {};
/** /**
* @type {Object.<number, ol.events.Key>} * @type {Object.<number, ol.EventsKey>}
* @private * @private
*/ */
this.geometryModifyListenerKeys_ = {}; this.geometryModifyListenerKeys_ = {};
@@ -129,7 +129,7 @@ ol.interaction.Snap = function(opt_options) {
options.pixelTolerance : 10; options.pixelTolerance : 10;
/** /**
* @type {function(ol.interaction.SnapSegmentDataType, ol.interaction.SnapSegmentDataType): number} * @type {function(ol.SnapSegmentDataType, ol.SnapSegmentDataType): number}
* @private * @private
*/ */
this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this); this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
@@ -137,7 +137,7 @@ ol.interaction.Snap = function(opt_options) {
/** /**
* Segment RTree for each layer * Segment RTree for each layer
* @type {ol.structs.RBush.<ol.interaction.SnapSegmentDataType>} * @type {ol.structs.RBush.<ol.SnapSegmentDataType>}
* @private * @private
*/ */
this.rBush_ = new ol.structs.RBush(); this.rBush_ = new ol.structs.RBush();
@@ -377,7 +377,7 @@ ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE;
* @param {ol.Pixel} pixel Pixel * @param {ol.Pixel} pixel Pixel
* @param {ol.Coordinate} pixelCoordinate Coordinate * @param {ol.Coordinate} pixelCoordinate Coordinate
* @param {ol.Map} map Map. * @param {ol.Map} map Map.
* @return {ol.interaction.SnapResultType} Snap result * @return {ol.SnapResultType} Snap result
*/ */
ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) { ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
@@ -436,7 +436,7 @@ ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])]; vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];
} }
} }
return /** @type {ol.interaction.SnapResultType} */ ({ return /** @type {ol.SnapResultType} */ ({
snapped: snapped, snapped: snapped,
vertex: vertex, vertex: vertex,
vertexPixel: vertexPixel vertexPixel: vertexPixel
@@ -478,7 +478,7 @@ ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geome
var i, ii, segment, segmentData; var i, ii, segment, segmentData;
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature, feature: feature,
segment: segment segment: segment
}); });
@@ -499,7 +499,7 @@ ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature,
coordinates = lines[j]; coordinates = lines[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature, feature: feature,
segment: segment segment: segment
}); });
@@ -519,7 +519,7 @@ ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geome
var coordinates, i, ii, segmentData; var coordinates, i, ii, segmentData;
for (i = 0, ii = points.length; i < ii; ++i) { for (i = 0, ii = points.length; i < ii; ++i) {
coordinates = points[i]; coordinates = points[i];
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature, feature: feature,
segment: [coordinates, coordinates] segment: [coordinates, coordinates]
}); });
@@ -542,7 +542,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo
coordinates = rings[j]; coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature, feature: feature,
segment: segment segment: segment
}); });
@@ -560,7 +560,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo
*/ */
ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) { ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates(); var coordinates = geometry.getCoordinates();
var segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ var segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature, feature: feature,
segment: [coordinates, coordinates] segment: [coordinates, coordinates]
}); });
@@ -580,7 +580,7 @@ ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry
coordinates = rings[j]; coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2); segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature, feature: feature,
segment: segment segment: segment
}); });
@@ -625,8 +625,8 @@ ol.interaction.Snap.handleUpEvent_ = function(evt) {
/** /**
* Sort segments by distance, helper function * Sort segments by distance, helper function
* @param {ol.interaction.SnapSegmentDataType} a The first segment data. * @param {ol.SnapSegmentDataType} a The first segment data.
* @param {ol.interaction.SnapSegmentDataType} b The second segment data. * @param {ol.SnapSegmentDataType} b The second segment data.
* @return {number} The difference in distance. * @return {number} The difference in distance.
* @this {ol.interaction.Snap} * @this {ol.interaction.Snap}
*/ */
+3 -3
View File
@@ -41,19 +41,19 @@ ol.layer.Layer = function(options) {
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.mapPrecomposeKey_ = null; this.mapPrecomposeKey_ = null;
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.mapRenderKey_ = null; this.mapRenderKey_ = null;
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.sourceChangeKey_ = null; this.sourceChangeKey_ = null;
+2 -2
View File
@@ -46,13 +46,13 @@ ol.layer.Group = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.layersListenerKeys_ = []; this.layersListenerKeys_ = [];
/** /**
* @private * @private
* @type {Object.<string, Array.<ol.events.Key>>} * @type {Object.<string, Array.<ol.EventsKey>>}
*/ */
this.listenerKeys_ = {}; this.listenerKeys_ = {};
+5 -5
View File
@@ -55,14 +55,14 @@ ol.layer.Vector = function(opt_options) {
/** /**
* User provided style. * User provided style.
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
* @private * @private
*/ */
this.style_ = null; this.style_ = null;
/** /**
* Style function for use within the library. * Style function for use within the library.
* @type {ol.style.StyleFunction|undefined} * @type {ol.StyleFunction|undefined}
* @private * @private
*/ */
this.styleFunction_ = undefined; this.styleFunction_ = undefined;
@@ -117,7 +117,7 @@ ol.layer.Vector.prototype.getSource;
/** /**
* Get the style for features. This returns whatever was passed to the `style` * Get the style for features. This returns whatever was passed to the `style`
* option at construction or to the `setStyle` method. * option at construction or to the `setStyle` method.
* @return {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction} * @return {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
* Layer style. * Layer style.
* @api stable * @api stable
*/ */
@@ -128,7 +128,7 @@ ol.layer.Vector.prototype.getStyle = function() {
/** /**
* Get the style function. * Get the style function.
* @return {ol.style.StyleFunction|undefined} Layer style function. * @return {ol.StyleFunction|undefined} Layer style function.
* @api stable * @api stable
*/ */
ol.layer.Vector.prototype.getStyleFunction = function() { ol.layer.Vector.prototype.getStyleFunction = function() {
@@ -174,7 +174,7 @@ ol.layer.Vector.prototype.setRenderOrder = function(renderOrder) {
* it is `null` the layer has no style (a `null` style), so only features * it is `null` the layer has no style (a `null` style), so only features
* that have their own styles will be rendered in the layer. See * that have their own styles will be rendered in the layer. See
* {@link ol.style} for information on the default style. * {@link ol.style} for information on the default style.
* @param {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|null|undefined} * @param {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|null|undefined}
* style Layer style. * style Layer style.
* @api stable * @api stable
*/ */
+3 -3
View File
@@ -235,13 +235,13 @@ ol.Map = function(options) {
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.viewPropertyListenerKey_ = null; this.viewPropertyListenerKey_ = null;
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.layerGroupPropertyListenerKeys_ = null; this.layerGroupPropertyListenerKeys_ = null;
@@ -307,7 +307,7 @@ ol.Map = function(options) {
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.keyHandlerKeys_ = null; this.keyHandlerKeys_ = null;
+3 -3
View File
@@ -145,7 +145,7 @@ ol.MapBrowserEventHandler = function(map) {
this.dragging_ = false; this.dragging_ = false;
/** /**
* @type {!Array.<ol.events.Key>} * @type {!Array.<ol.EventsKey>}
* @private * @private
*/ */
this.dragListenerKeys_ = []; this.dragListenerKeys_ = [];
@@ -191,7 +191,7 @@ ol.MapBrowserEventHandler = function(map) {
this.documentPointerEventHandler_ = null; this.documentPointerEventHandler_ = null;
/** /**
* @type {?ol.events.Key} * @type {?ol.EventsKey}
* @private * @private
*/ */
this.pointerdownListenerKey_ = ol.events.listen(this.pointerEventHandler_, this.pointerdownListenerKey_ = ol.events.listen(this.pointerEventHandler_,
@@ -199,7 +199,7 @@ ol.MapBrowserEventHandler = function(map) {
this.handlePointerDown_, this); this.handlePointerDown_, this);
/** /**
* @type {?ol.events.Key} * @type {?ol.EventsKey}
* @private * @private
*/ */
this.relayedListenerKey_ = ol.events.listen(this.pointerEventHandler_, this.relayedListenerKey_ = ol.events.listen(this.pointerEventHandler_,
+5 -5
View File
@@ -35,7 +35,7 @@ ol.inherits(ol.Observable, ol.events.EventTarget);
/** /**
* Removes an event listener using the key returned by `on()` or `once()`. * Removes an event listener using the key returned by `on()` or `once()`.
* @param {ol.events.Key|Array.<ol.events.Key>} key The key returned by `on()` * @param {ol.EventsKey|Array.<ol.EventsKey>} key The key returned by `on()`
* or `once()` (or an array of keys). * or `once()` (or an array of keys).
* @api stable * @api stable
*/ */
@@ -45,7 +45,7 @@ ol.Observable.unByKey = function(key) {
ol.events.unlistenByKey(key[i]); ol.events.unlistenByKey(key[i]);
} }
} else { } else {
ol.events.unlistenByKey(/** @type {ol.events.Key} */ (key)); ol.events.unlistenByKey(/** @type {ol.EventsKey} */ (key));
} }
}; };
@@ -97,7 +97,7 @@ ol.Observable.prototype.getRevision = function() {
* @param {string|Array.<string>} type The event type or array of event types. * @param {string|Array.<string>} type The event type or array of event types.
* @param {function(?): ?} listener The listener function. * @param {function(?): ?} listener The listener function.
* @param {Object=} opt_this The object to use as `this` in `listener`. * @param {Object=} opt_this The object to use as `this` in `listener`.
* @return {ol.events.Key|Array.<ol.events.Key>} Unique key for the listener. If * @return {ol.EventsKey|Array.<ol.EventsKey>} Unique key for the listener. If
* called with an array of event types as the first argument, the return * called with an array of event types as the first argument, the return
* will be an array of keys. * will be an array of keys.
* @api stable * @api stable
@@ -122,7 +122,7 @@ ol.Observable.prototype.on = function(type, listener, opt_this) {
* @param {string|Array.<string>} type The event type or array of event types. * @param {string|Array.<string>} type The event type or array of event types.
* @param {function(?): ?} listener The listener function. * @param {function(?): ?} listener The listener function.
* @param {Object=} opt_this The object to use as `this` in `listener`. * @param {Object=} opt_this The object to use as `this` in `listener`.
* @return {ol.events.Key|Array.<ol.events.Key>} Unique key for the listener. If * @return {ol.EventsKey|Array.<ol.EventsKey>} Unique key for the listener. If
* called with an array of event types as the first argument, the return * called with an array of event types as the first argument, the return
* will be an array of keys. * will be an array of keys.
* @api stable * @api stable
@@ -166,7 +166,7 @@ ol.Observable.prototype.un = function(type, listener, opt_this) {
* Removes an event listener using the key returned by `on()` or `once()`. * Removes an event listener using the key returned by `on()` or `once()`.
* Note that using the {@link ol.Observable.unByKey} static function is to * Note that using the {@link ol.Observable.unByKey} static function is to
* be preferred. * be preferred.
* @param {ol.events.Key|Array.<ol.events.Key>} key The key returned by `on()` * @param {ol.EventsKey|Array.<ol.EventsKey>} key The key returned by `on()`
* or `once()` (or an array of keys). * or `once()` (or an array of keys).
* @function * @function
* @api stable * @api stable
+1 -1
View File
@@ -135,7 +135,7 @@ ol.Overlay = function(options) {
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.mapPostrenderListenerKey_ = null; this.mapPostrenderListenerKey_ = null;
+12 -12
View File
@@ -44,7 +44,7 @@ ol.proj.METERS_PER_UNIT[ol.proj.Units.USFEET] = 1200 / 3937;
* Projection definition class. One of these is created for each projection * Projection definition class. One of these is created for each projection
* supported in the application and stored in the {@link ol.proj} namespace. * supported in the application and stored in the {@link ol.proj} namespace.
* You can use these in applications, but this is not required, as API params * You can use these in applications, but this is not required, as API params
* and options use {@link ol.proj.ProjectionLike} which means the simple string * and options use {@link ol.ProjectionLike} which means the simple string
* code will suffice. * code will suffice.
* *
* You can use {@link ol.proj.get} to retrieve the object for a particular * You can use {@link ol.proj.get} to retrieve the object for a particular
@@ -543,8 +543,8 @@ ol.proj.addTransform = function(source, destination, transformFn) {
* converts these into the functions used internally which also handle * converts these into the functions used internally which also handle
* extents and coordinate arrays. * extents and coordinate arrays.
* *
* @param {ol.proj.ProjectionLike} source Source projection. * @param {ol.ProjectionLike} source Source projection.
* @param {ol.proj.ProjectionLike} destination Destination projection. * @param {ol.ProjectionLike} destination Destination projection.
* @param {function(ol.Coordinate): ol.Coordinate} forward The forward transform * @param {function(ol.Coordinate): ol.Coordinate} forward The forward transform
* function (that is, from the source projection to the destination * function (that is, from the source projection to the destination
* projection) that takes a {@link ol.Coordinate} as argument and returns * projection) that takes a {@link ol.Coordinate} as argument and returns
@@ -628,7 +628,7 @@ ol.proj.removeTransform = function(source, destination) {
* Transforms a coordinate from longitude/latitude to a different projection. * Transforms a coordinate from longitude/latitude to a different projection.
* @param {ol.Coordinate} coordinate Coordinate as longitude and latitude, i.e. * @param {ol.Coordinate} coordinate Coordinate as longitude and latitude, i.e.
* an array with longitude as 1st and latitude as 2nd element. * an array with longitude as 1st and latitude as 2nd element.
* @param {ol.proj.ProjectionLike=} opt_projection Target projection. The * @param {ol.ProjectionLike=} opt_projection Target projection. The
* default is Web Mercator, i.e. 'EPSG:3857'. * default is Web Mercator, i.e. 'EPSG:3857'.
* @return {ol.Coordinate} Coordinate projected to the target projection. * @return {ol.Coordinate} Coordinate projected to the target projection.
* @api stable * @api stable
@@ -642,7 +642,7 @@ ol.proj.fromLonLat = function(coordinate, opt_projection) {
/** /**
* Transforms a coordinate to longitude/latitude. * Transforms a coordinate to longitude/latitude.
* @param {ol.Coordinate} coordinate Projected coordinate. * @param {ol.Coordinate} coordinate Projected coordinate.
* @param {ol.proj.ProjectionLike=} opt_projection Projection of the coordinate. * @param {ol.ProjectionLike=} opt_projection Projection of the coordinate.
* The default is Web Mercator, i.e. 'EPSG:3857'. * The default is Web Mercator, i.e. 'EPSG:3857'.
* @return {ol.Coordinate} Coordinate as longitude and latitude, i.e. an array * @return {ol.Coordinate} Coordinate as longitude and latitude, i.e. an array
* with longitude as 1st and latitude as 2nd element. * with longitude as 1st and latitude as 2nd element.
@@ -657,7 +657,7 @@ ol.proj.toLonLat = function(coordinate, opt_projection) {
/** /**
* Fetches a Projection object for the code specified. * Fetches a Projection object for the code specified.
* *
* @param {ol.proj.ProjectionLike} projectionLike Either a code string which is * @param {ol.ProjectionLike} projectionLike Either a code string which is
* a combination of authority and identifier such as "EPSG:4326", or an * a combination of authority and identifier such as "EPSG:4326", or an
* existing projection object, or undefined. * existing projection object, or undefined.
* @return {ol.proj.Projection} Projection object, or null if not in list. * @return {ol.proj.Projection} Projection object, or null if not in list.
@@ -715,8 +715,8 @@ ol.proj.equivalent = function(projection1, projection2) {
* function to convert a coordinates array from the source projection to the * function to convert a coordinates array from the source projection to the
* destination projection. * destination projection.
* *
* @param {ol.proj.ProjectionLike} source Source. * @param {ol.ProjectionLike} source Source.
* @param {ol.proj.ProjectionLike} destination Destination. * @param {ol.ProjectionLike} destination Destination.
* @return {ol.TransformFunction} Transform function. * @return {ol.TransformFunction} Transform function.
* @api stable * @api stable
*/ */
@@ -802,8 +802,8 @@ ol.proj.cloneTransform = function(input, opt_output, opt_dimension) {
* geometry transforms. * geometry transforms.
* *
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @param {ol.proj.ProjectionLike} source Source projection-like. * @param {ol.ProjectionLike} source Source projection-like.
* @param {ol.proj.ProjectionLike} destination Destination projection-like. * @param {ol.ProjectionLike} destination Destination projection-like.
* @return {ol.Coordinate} Coordinate. * @return {ol.Coordinate} Coordinate.
* @api stable * @api stable
*/ */
@@ -818,8 +818,8 @@ ol.proj.transform = function(coordinate, source, destination) {
* returns a new extent (and does not modify the original). * returns a new extent (and does not modify the original).
* *
* @param {ol.Extent} extent The extent to transform. * @param {ol.Extent} extent The extent to transform.
* @param {ol.proj.ProjectionLike} source Source projection-like. * @param {ol.ProjectionLike} source Source projection-like.
* @param {ol.proj.ProjectionLike} destination Destination projection-like. * @param {ol.ProjectionLike} destination Destination projection-like.
* @return {ol.Extent} The transformed extent. * @return {ol.Extent} The transformed extent.
* @api stable * @api stable
*/ */
+1 -1
View File
@@ -52,7 +52,7 @@ ol.renderer.Map = function(container, map) {
/** /**
* @private * @private
* @type {Object.<string, ol.events.Key>} * @type {Object.<string, ol.EventsKey>}
*/ */
this.layerRendererListeners_ = {}; this.layerRendererListeners_ = {};
+1 -1
View File
@@ -95,7 +95,7 @@ ol.reproj.Image = function(sourceProj, targetProj,
/** /**
* @private * @private
* @type {?ol.events.Key} * @type {?ol.EventsKey}
*/ */
this.sourceListenerKey_ = null; this.sourceListenerKey_ = null;
+1 -1
View File
@@ -96,7 +96,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.sourcesListenerKeys_ = null; this.sourcesListenerKeys_ = null;
+5 -5
View File
@@ -75,14 +75,14 @@ ol.source.ImageVector = function(options) {
/** /**
* User provided style. * User provided style.
* @type {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction} * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
* @private * @private
*/ */
this.style_ = null; this.style_ = null;
/** /**
* Style function for use within the library. * Style function for use within the library.
* @type {ol.style.StyleFunction|undefined} * @type {ol.StyleFunction|undefined}
* @private * @private
*/ */
this.styleFunction_ = undefined; this.styleFunction_ = undefined;
@@ -188,7 +188,7 @@ ol.source.ImageVector.prototype.getSource = function() {
/** /**
* Get the style for features. This returns whatever was passed to the `style` * Get the style for features. This returns whatever was passed to the `style`
* option at construction or to the `setStyle` method. * option at construction or to the `setStyle` method.
* @return {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction} * @return {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
* Layer style. * Layer style.
* @api stable * @api stable
*/ */
@@ -199,7 +199,7 @@ ol.source.ImageVector.prototype.getStyle = function() {
/** /**
* Get the style function. * Get the style function.
* @return {ol.style.StyleFunction|undefined} Layer style function. * @return {ol.StyleFunction|undefined} Layer style function.
* @api stable * @api stable
*/ */
ol.source.ImageVector.prototype.getStyleFunction = function() { ol.source.ImageVector.prototype.getStyleFunction = function() {
@@ -284,7 +284,7 @@ ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, p
* it is `null` the layer has no style (a `null` style), so only features * it is `null` the layer has no style (a `null` style), so only features
* that have their own styles will be rendered in the layer. See * that have their own styles will be rendered in the layer. See
* {@link ol.style} for information on the default style. * {@link ol.style} for information on the default style.
* @param {ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined} * @param {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
* style Layer style. * style Layer style.
* @api stable * @api stable
*/ */
+1 -1
View File
@@ -126,7 +126,7 @@ ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
* constructed. * constructed.
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {ol.proj.ProjectionLike} projection Projection. * @param {ol.ProjectionLike} projection Projection.
* @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
* be provided. If `QUERY_LAYERS` is not provided then the layers specified * be provided. If `QUERY_LAYERS` is not provided then the layers specified
* in the `LAYERS` parameter will be used. `VERSION` should not be * in the `LAYERS` parameter will be used. `VERSION` should not be
+1 -1
View File
@@ -345,7 +345,7 @@ ol.source.TileImage.prototype.setRenderReprojectionEdges = function(render) {
* (e.g. projection has no extent defined) or * (e.g. projection has no extent defined) or
* for optimization reasons (custom tile size, resolutions, ...). * for optimization reasons (custom tile size, resolutions, ...).
* *
* @param {ol.proj.ProjectionLike} projection Projection. * @param {ol.ProjectionLike} projection Projection.
* @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection. * @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
* @api * @api
*/ */
+1 -1
View File
@@ -107,7 +107,7 @@ ol.inherits(ol.source.TileWMS, ol.source.TileImage);
* constructed. * constructed.
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @param {ol.proj.ProjectionLike} projection Projection. * @param {ol.ProjectionLike} projection Projection.
* @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
* be provided. If `QUERY_LAYERS` is not provided then the layers specified * be provided. If `QUERY_LAYERS` is not provided then the layers specified
* in the `LAYERS` parameter will be used. `VERSION` should not be * in the `LAYERS` parameter will be used. `VERSION` should not be
+1 -1
View File
@@ -155,7 +155,7 @@ ol.source.Vector = function(opt_options) {
/** /**
* @private * @private
* @type {Object.<string, Array.<ol.events.Key>>} * @type {Object.<string, Array.<ol.EventsKey>>}
*/ */
this.featureChangeKeys_ = {}; this.featureChangeKeys_ = {};
+4 -4
View File
@@ -133,7 +133,7 @@ ol.structs.LRUCache.prototype.get = function(key) {
if (entry === this.newest_) { if (entry === this.newest_) {
return entry.value_; return entry.value_;
} else if (entry === this.oldest_) { } else if (entry === this.oldest_) {
this.oldest_ = this.oldest_.newer; this.oldest_ = /** @type {ol.LRUCacheEntry} */ (this.oldest_.newer);
this.oldest_.older = null; this.oldest_.older = null;
} else { } else {
entry.newer.older = entry.older; entry.newer.older = entry.older;
@@ -216,7 +216,7 @@ ol.structs.LRUCache.prototype.pop = function() {
if (entry.newer) { if (entry.newer) {
entry.newer.older = null; entry.newer.older = null;
} }
this.oldest_ = entry.newer; this.oldest_ = /** @type {ol.LRUCacheEntry} */ (entry.newer);
if (!this.oldest_) { if (!this.oldest_) {
this.newest_ = null; this.newest_ = null;
} }
@@ -244,12 +244,12 @@ ol.structs.LRUCache.prototype.set = function(key, value) {
'key is not a standard property of objects (e.g. "__proto__")'); 'key is not a standard property of objects (e.g. "__proto__")');
goog.asserts.assert(!(key in this.entries_), goog.asserts.assert(!(key in this.entries_),
'key is not used already'); 'key is not used already');
var entry = { var entry = /** @type {ol.LRUCacheEntry} */ ({
key_: key, key_: key,
newer: null, newer: null,
older: this.newest_, older: this.newest_,
value_: value value_: value
}; });
if (!this.newest_) { if (!this.newest_) {
this.oldest_ = entry; this.oldest_ = entry;
} else { } else {
+21 -21
View File
@@ -75,17 +75,17 @@ ol.style.AtlasManager = function(opt_options) {
/** /**
* @param {string} id The identifier of the entry to check. * @param {string} id The identifier of the entry to check.
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the * @return {?ol.AtlasManagerInfo} The position and atlas image for the
* entry, or `null` if the entry is not part of the atlas manager. * entry, or `null` if the entry is not part of the atlas manager.
*/ */
ol.style.AtlasManager.prototype.getInfo = function(id) { ol.style.AtlasManager.prototype.getInfo = function(id) {
/** @type {?ol.style.AtlasInfo} */ /** @type {?ol.AtlasInfo} */
var info = this.getInfo_(this.atlases_, id); var info = this.getInfo_(this.atlases_, id);
if (!info) { if (!info) {
return null; return null;
} }
/** @type {?ol.style.AtlasInfo} */ /** @type {?ol.AtlasInfo} */
var hitInfo = this.getInfo_(this.hitAtlases_, id); var hitInfo = this.getInfo_(this.hitAtlases_, id);
goog.asserts.assert(hitInfo, 'hitInfo must not be null'); goog.asserts.assert(hitInfo, 'hitInfo must not be null');
@@ -97,7 +97,7 @@ ol.style.AtlasManager.prototype.getInfo = function(id) {
* @private * @private
* @param {Array.<ol.style.Atlas>} atlases The atlases to search. * @param {Array.<ol.style.Atlas>} atlases The atlases to search.
* @param {string} id The identifier of the entry to check. * @param {string} id The identifier of the entry to check.
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry, * @return {?ol.AtlasInfo} The position and atlas image for the entry,
* or `null` if the entry is not part of the atlases. * or `null` if the entry is not part of the atlases.
*/ */
ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) { ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
@@ -115,10 +115,10 @@ ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
/** /**
* @private * @private
* @param {ol.style.AtlasInfo} info The info for the real image. * @param {ol.AtlasInfo} info The info for the real image.
* @param {ol.style.AtlasInfo} hitInfo The info for the hit-detection * @param {ol.AtlasInfo} hitInfo The info for the hit-detection
* image. * image.
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the * @return {?ol.AtlasManagerInfo} The position and atlas image for the
* entry, or `null` if the entry is not part of the atlases. * entry, or `null` if the entry is not part of the atlases.
*/ */
ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) { ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
@@ -126,7 +126,7 @@ ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
'in order to merge, offsetX of info and hitInfo must be equal'); 'in order to merge, offsetX of info and hitInfo must be equal');
goog.asserts.assert(info.offsetY === hitInfo.offsetY, goog.asserts.assert(info.offsetY === hitInfo.offsetY,
'in order to merge, offsetY of info and hitInfo must be equal'); 'in order to merge, offsetY of info and hitInfo must be equal');
return /** @type {ol.style.AtlasManagerInfo} */ ({ return /** @type {ol.AtlasManagerInfo} */ ({
offsetX: info.offsetX, offsetX: info.offsetX,
offsetY: info.offsetY, offsetY: info.offsetY,
image: info.image, image: info.image,
@@ -154,7 +154,7 @@ ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
* detection atlas image. * detection atlas image.
* @param {Object=} opt_this Value to use as `this` when executing * @param {Object=} opt_this Value to use as `this` when executing
* `renderCallback` and `renderHitCallback`. * `renderCallback` and `renderHitCallback`.
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the * @return {?ol.AtlasManagerInfo} The position and atlas image for the
* entry, or `null` if the image is too big. * entry, or `null` if the image is too big.
*/ */
ol.style.AtlasManager.prototype.add = function(id, width, height, ol.style.AtlasManager.prototype.add = function(id, width, height,
@@ -164,7 +164,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
return null; return null;
} }
/** @type {?ol.style.AtlasInfo} */ /** @type {?ol.AtlasInfo} */
var info = this.add_(false, var info = this.add_(false,
id, width, height, renderCallback, opt_this); id, width, height, renderCallback, opt_this);
if (!info) { if (!info) {
@@ -177,7 +177,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
var renderHitCallback = opt_renderHitCallback !== undefined ? var renderHitCallback = opt_renderHitCallback !== undefined ?
opt_renderHitCallback : ol.nullFunction; opt_renderHitCallback : ol.nullFunction;
/** @type {?ol.style.AtlasInfo} */ /** @type {?ol.AtlasInfo} */
var hitInfo = this.add_(true, var hitInfo = this.add_(true,
id, width, height, renderHitCallback, opt_this); id, width, height, renderHitCallback, opt_this);
goog.asserts.assert(hitInfo, 'hitInfo must not be null'); goog.asserts.assert(hitInfo, 'hitInfo must not be null');
@@ -196,7 +196,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
* Called to render the new image onto an atlas image. * Called to render the new image onto an atlas image.
* @param {Object=} opt_this Value to use as `this` when executing * @param {Object=} opt_this Value to use as `this` when executing
* `renderCallback` and `renderHitCallback`. * `renderCallback` and `renderHitCallback`.
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry, * @return {?ol.AtlasInfo} The position and atlas image for the entry,
* or `null` if the image is too big. * or `null` if the image is too big.
*/ */
ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height, ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
@@ -256,13 +256,13 @@ ol.style.Atlas = function(size, space) {
/** /**
* @private * @private
* @type {Array.<ol.style.AtlasBlock>} * @type {Array.<ol.AtlasBlock>}
*/ */
this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}]; this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
/** /**
* @private * @private
* @type {Object.<string, ol.style.AtlasInfo>} * @type {Object.<string, ol.AtlasInfo>}
*/ */
this.entries_ = {}; this.entries_ = {};
@@ -282,7 +282,7 @@ ol.style.Atlas = function(size, space) {
/** /**
* @param {string} id The identifier of the entry to check. * @param {string} id The identifier of the entry to check.
* @return {?ol.style.AtlasInfo} The atlas info. * @return {?ol.AtlasInfo} The atlas info.
*/ */
ol.style.Atlas.prototype.get = function(id) { ol.style.Atlas.prototype.get = function(id) {
return this.entries_[id] || null; return this.entries_[id] || null;
@@ -297,7 +297,7 @@ ol.style.Atlas.prototype.get = function(id) {
* Called to render the new image onto an atlas image. * Called to render the new image onto an atlas image.
* @param {Object=} opt_this Value to use as `this` when executing * @param {Object=} opt_this Value to use as `this` when executing
* `renderCallback`. * `renderCallback`.
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry. * @return {?ol.AtlasInfo} The position and atlas image for the entry.
*/ */
ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) { ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) {
var block, i, ii; var block, i, ii;
@@ -332,7 +332,7 @@ ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_t
/** /**
* @private * @private
* @param {number} index The index of the block. * @param {number} index The index of the block.
* @param {ol.style.AtlasBlock} block The block to split. * @param {ol.AtlasBlock} block The block to split.
* @param {number} width The width of the entry to insert. * @param {number} width The width of the entry to insert.
* @param {number} height The height of the entry to insert. * @param {number} height The height of the entry to insert.
*/ */
@@ -340,9 +340,9 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
var deltaWidth = block.width - width; var deltaWidth = block.width - width;
var deltaHeight = block.height - height; var deltaHeight = block.height - height;
/** @type {ol.style.AtlasBlock} */ /** @type {ol.AtlasBlock} */
var newBlock1; var newBlock1;
/** @type {ol.style.AtlasBlock} */ /** @type {ol.AtlasBlock} */
var newBlock2; var newBlock2;
if (deltaWidth > deltaHeight) { if (deltaWidth > deltaHeight) {
@@ -391,8 +391,8 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
* blocks (that are potentially smaller) are filled first. * blocks (that are potentially smaller) are filled first.
* @private * @private
* @param {number} index The index of the block to remove. * @param {number} index The index of the block to remove.
* @param {ol.style.AtlasBlock} newBlock1 The 1st block to add. * @param {ol.AtlasBlock} newBlock1 The 1st block to add.
* @param {ol.style.AtlasBlock} newBlock2 The 2nd block to add. * @param {ol.AtlasBlock} newBlock2 The 2nd block to add.
*/ */
ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) { ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
var args = [index, 1]; var args = [index, 1];
+4 -4
View File
@@ -252,7 +252,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
var size = 2 * (this.radius_ + strokeWidth) + 1; var size = 2 * (this.radius_ + strokeWidth) + 1;
/** @type {ol.style.CircleRenderOptions} */ /** @type {ol.CircleRenderOptions} */
var renderOptions = { var renderOptions = {
strokeStyle: strokeStyle, strokeStyle: strokeStyle,
strokeWidth: strokeWidth, strokeWidth: strokeWidth,
@@ -313,7 +313,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
/** /**
* @private * @private
* @param {ol.style.CircleRenderOptions} renderOptions Render options. * @param {ol.CircleRenderOptions} renderOptions Render options.
* @param {CanvasRenderingContext2D} context The rendering context. * @param {CanvasRenderingContext2D} context The rendering context.
* @param {number} x The origin for the symbol (x). * @param {number} x The origin for the symbol (x).
* @param {number} y The origin for the symbol (y). * @param {number} y The origin for the symbol (y).
@@ -348,7 +348,7 @@ ol.style.Circle.prototype.draw_ = function(renderOptions, context, x, y) {
/** /**
* @private * @private
* @param {ol.style.CircleRenderOptions} renderOptions Render options. * @param {ol.CircleRenderOptions} renderOptions Render options.
*/ */
ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) { ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size]; this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
@@ -368,7 +368,7 @@ ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
/** /**
* @private * @private
* @param {ol.style.CircleRenderOptions} renderOptions Render options. * @param {ol.CircleRenderOptions} renderOptions Render options.
* @param {CanvasRenderingContext2D} context The context. * @param {CanvasRenderingContext2D} context The context.
* @param {number} x The origin for the symbol (x). * @param {number} x The origin for the symbol (x).
* @param {number} y The origin for the symbol (y). * @param {number} y The origin for the symbol (y).
+1 -1
View File
@@ -414,7 +414,7 @@ ol.style.IconImage_ = function(image, src, size, crossOrigin, imageState,
/** /**
* @private * @private
* @type {Array.<ol.events.Key>} * @type {Array.<ol.EventsKey>}
*/ */
this.imageListenerKeys_ = null; this.imageListenerKeys_ = null;
+2 -2
View File
@@ -20,7 +20,7 @@ ol.style.ImageState = {
* {@link ol.style.RegularShape}. * {@link ol.style.RegularShape}.
* *
* @constructor * @constructor
* @param {ol.style.ImageOptions} options Options. * @param {ol.StyleImageOptions} options Options.
* @api * @api
*/ */
ol.style.Image = function(options) { ol.style.Image = function(options) {
@@ -223,7 +223,7 @@ ol.style.Image.prototype.setSnapToPixel = function(snapToPixel) {
/** /**
* @param {function(this: T, ol.events.Event)} listener Listener function. * @param {function(this: T, ol.events.Event)} listener Listener function.
* @param {T} thisArg Value to use as `this` when executing `listener`. * @param {T} thisArg Value to use as `this` when executing `listener`.
* @return {ol.events.Key|undefined} Listener key. * @return {ol.EventsKey|undefined} Listener key.
* @template T * @template T
*/ */
ol.style.Image.prototype.listenImageChange = goog.abstractMethod; ol.style.Image.prototype.listenImageChange = goog.abstractMethod;
+4 -4
View File
@@ -328,7 +328,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
var size = 2 * (this.radius_ + strokeWidth) + 1; var size = 2 * (this.radius_ + strokeWidth) + 1;
/** @type {ol.style.RegularShapeRenderOptions} */ /** @type {ol.RegularShapeRenderOptions} */
var renderOptions = { var renderOptions = {
strokeStyle: strokeStyle, strokeStyle: strokeStyle,
strokeWidth: strokeWidth, strokeWidth: strokeWidth,
@@ -391,7 +391,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
/** /**
* @private * @private
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options. * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
* @param {CanvasRenderingContext2D} context The rendering context. * @param {CanvasRenderingContext2D} context The rendering context.
* @param {number} x The origin for the symbol (x). * @param {number} x The origin for the symbol (x).
* @param {number} y The origin for the symbol (y). * @param {number} y The origin for the symbol (y).
@@ -436,7 +436,7 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
/** /**
* @private * @private
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options. * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
*/ */
ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) { ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size]; this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
@@ -456,7 +456,7 @@ ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptio
/** /**
* @private * @private
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options. * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
* @param {CanvasRenderingContext2D} context The context. * @param {CanvasRenderingContext2D} context The context.
* @param {number} x The origin for the symbol (x). * @param {number} x The origin for the symbol (x).
* @param {number} y The origin for the symbol (y). * @param {number} y The origin for the symbol (y).
+7 -7
View File
@@ -27,13 +27,13 @@ ol.style.Style = function(opt_options) {
/** /**
* @private * @private
* @type {string|ol.geom.Geometry|ol.style.GeometryFunction} * @type {string|ol.geom.Geometry|ol.StyleGeometryFunction}
*/ */
this.geometry_ = null; this.geometry_ = null;
/** /**
* @private * @private
* @type {!ol.style.GeometryFunction} * @type {!ol.StyleGeometryFunction}
*/ */
this.geometryFunction_ = ol.style.defaultGeometryFunction; this.geometryFunction_ = ol.style.defaultGeometryFunction;
@@ -76,7 +76,7 @@ ol.style.Style = function(opt_options) {
/** /**
* Get the geometry to be rendered. * Get the geometry to be rendered.
* @return {string|ol.geom.Geometry|ol.style.GeometryFunction} * @return {string|ol.geom.Geometry|ol.StyleGeometryFunction}
* Feature property or geometry or function that returns the geometry that will * Feature property or geometry or function that returns the geometry that will
* be rendered with this style. * be rendered with this style.
* @api * @api
@@ -88,7 +88,7 @@ ol.style.Style.prototype.getGeometry = function() {
/** /**
* Get the function used to generate a geometry for rendering. * Get the function used to generate a geometry for rendering.
* @return {!ol.style.GeometryFunction} Function that is called with a feature * @return {!ol.StyleGeometryFunction} Function that is called with a feature
* and returns the geometry to render instead of the feature's geometry. * and returns the geometry to render instead of the feature's geometry.
* @api * @api
*/ */
@@ -150,7 +150,7 @@ ol.style.Style.prototype.getZIndex = function() {
/** /**
* Set a geometry that is rendered instead of the feature's geometry. * Set a geometry that is rendered instead of the feature's geometry.
* *
* @param {string|ol.geom.Geometry|ol.style.GeometryFunction} geometry * @param {string|ol.geom.Geometry|ol.StyleGeometryFunction} geometry
* Feature property or geometry or function returning a geometry to render * Feature property or geometry or function returning a geometry to render
* for this style. * for this style.
* @api * @api
@@ -195,9 +195,9 @@ ol.style.Style.prototype.setZIndex = function(zIndex) {
* Convert the provided object into a style function. Functions passed through * Convert the provided object into a style function. Functions passed through
* unchanged. Arrays of ol.style.Style or single style objects wrapped in a * unchanged. Arrays of ol.style.Style or single style objects wrapped in a
* new style function. * new style function.
* @param {ol.style.StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj * @param {ol.StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj
* A style function, a single style, or an array of styles. * A style function, a single style, or an array of styles.
* @return {ol.style.StyleFunction} A style function. * @return {ol.StyleFunction} A style function.
*/ */
ol.style.createStyleFunction = function(obj) { ol.style.createStyleFunction = function(obj) {
var styleFunction; var styleFunction;
+2 -2
View File
@@ -589,7 +589,7 @@ ol.tilegrid.resolutionsFromExtent = function(extent, opt_maxZoom, opt_tileSize)
/** /**
* @param {ol.proj.ProjectionLike} projection Projection. * @param {ol.ProjectionLike} projection Projection.
* @param {number=} opt_maxZoom Maximum zoom level (default is * @param {number=} opt_maxZoom Maximum zoom level (default is
* ol.DEFAULT_MAX_ZOOM). * ol.DEFAULT_MAX_ZOOM).
* @param {ol.Size=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE). * @param {ol.Size=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).
@@ -607,7 +607,7 @@ ol.tilegrid.createForProjection = function(projection, opt_maxZoom, opt_tileSize
/** /**
* Generate a tile grid extent from a projection. If the projection has an * Generate a tile grid extent from a projection. If the projection has an
* extent, it is used. If not, a global extent is assumed. * extent, it is used. If not, a global extent is assumed.
* @param {ol.proj.ProjectionLike} projection Projection. * @param {ol.ProjectionLike} projection Projection.
* @return {ol.Extent} Extent. * @return {ol.Extent} Extent.
*/ */
ol.tilegrid.extentFromProjection = function(projection) { ol.tilegrid.extentFromProjection = function(projection) {
+191 -209
View File
@@ -10,23 +10,34 @@
* in type-defining comments used by the Closure compiler, and so should not * in type-defining comments used by the Closure compiler, and so should not
* appear in module code. * appear in module code.
* *
* When the code is converted to ES6 modules, the namespace structure will * They are now all in the `ol` namespace.
* disappear, and these typedefs will have to be renamed accordingly, but the
* namespace structure is maintained for the present for backwards compatibility.
*
* In principle, typedefs should not have a `goog.provide` nor should files which
* refer to a typedef in comments need a `goog.require`. However, goog.provides
* are needed for 2 cases, both to prevent compiler errors/warnings:
* - the 1st two for specific errors
* - each sub-namespace needs at least one so the namespace is created when not
* used in the code, as when application code is compiled with the library.
*/ */
goog.provide('ol.Extent');
goog.provide('ol.events.EventTargetLike');
goog.provide('ol.interaction.DragBoxEndConditionType');
goog.provide('ol.proj.ProjectionLike'); /**
goog.provide('ol.style.AtlasBlock'); * @typedef {{x: number, y: number, width: number, height: number}}
*/
ol.AtlasBlock;
/**
* Provides information for an image inside an atlas.
* `offsetX` and `offsetY` are the position of the image inside
* the atlas image `image`.
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement}}
*/
ol.AtlasInfo;
/**
* Provides information for an image inside an atlas manager.
* `offsetX` and `offsetY` is the position of the image inside
* the atlas image `image` and the position of the hit-detection image
* inside the hit-detection atlas image `hitImage`.
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement,
* hitImage: HTMLCanvasElement}}
*/
ol.AtlasManagerInfo;
/** /**
@@ -81,6 +92,13 @@ ol.CanvasTextState;
ol.CenterConstraintType; ol.CenterConstraintType;
/**
* @typedef {{strokeStyle: (string|undefined), strokeWidth: number,
* size: number, lineDash: Array.<number>}}
*/
ol.CircleRenderOptions;
/** /**
* A color represented as a short array [red, green, blue, alpha]. * A color represented as a short array [red, green, blue, alpha].
* red, green, and blue should be integers in the range 0..255 inclusive. * red, green, and blue should be integers in the range 0..255 inclusive.
@@ -102,7 +120,7 @@ ol.ColorLike;
/** /**
* An array of numbers representing an xy coordinate. Example: `[16, 48]`. * An array of numbers representing an xy coordinate. Example: `[16, 48]`.
* @typedef {Array.<number>} ol.Coordinate * @typedef {Array.<number>}
*/ */
ol.Coordinate; ol.Coordinate;
@@ -116,6 +134,65 @@ ol.Coordinate;
ol.CoordinateFormatType; ol.CoordinateFormatType;
/**
* A function that takes a {@link ol.MapBrowserEvent} and two
* {@link ol.Pixel}s and returns a `{boolean}`. If the condition is met,
* true should be returned.
* @typedef {function(ol.MapBrowserEvent, ol.Pixel, ol.Pixel):boolean}
*/
ol.DragBoxEndConditionType;
/**
* Function that takes coordinates and an optional existing geometry as
* arguments, and returns a geometry. The optional existing geometry is the
* geometry that is returned when the function is called without a second
* argument.
* @typedef {function(!(ol.Coordinate|Array.<ol.Coordinate>|
* Array.<Array.<ol.Coordinate>>), ol.geom.SimpleGeometry=):
* ol.geom.SimpleGeometry}
*/
ol.DrawGeometryFunctionType;
/**
* A function that takes an {@link ol.MapBrowserEvent} and returns a
* `{boolean}`. If the condition is met, true should be returned.
*
* @typedef {function(ol.MapBrowserEvent): boolean}
*/
ol.EventsConditionType;
/**
* Key to use with {@link ol.Observable#unByKey}.
*
* @typedef {{bindTo: (Object|undefined),
* boundListener: (ol.EventsListenerFunctionType|undefined),
* callOnce: boolean,
* deleteIndex: (number|undefined),
* listener: ol.EventsListenerFunctionType,
* target: (EventTarget|ol.events.EventTarget),
* type: string}}
*/
ol.EventsKey;
/**
* Listener function. This function is called with an event object as argument.
* When the function returns `false`, event propagation will stop.
*
* @typedef {function(ol.events.Event)|function(ol.events.Event): boolean}
*/
ol.EventsListenerFunctionType;
/**
* @typedef {EventTarget|ol.events.EventTarget}
*/
ol.EventTargetLike;
/** /**
* An array of numbers representing an extent: `[minx, miny, maxx, maxy]`. * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.
* @typedef {Array.<number>} * @typedef {Array.<number>}
@@ -232,8 +309,8 @@ ol.LoadingStrategy;
/** /**
* @typedef {{key_: string, * @typedef {{key_: string,
* newer: ol.LRUCacheEntry, * newer: Object,
* older: ol.LRUCacheEntry, * older: Object,
* value_: *}} * value_: *}}
*/ */
ol.LRUCacheEntry; ol.LRUCacheEntry;
@@ -252,6 +329,16 @@ ol.LRUCacheEntry;
ol.MapOptionsInternal; ol.MapOptionsInternal;
/**
* @typedef {{depth: (Array.<number>|undefined),
* feature: ol.Feature,
* geometry: ol.geom.SimpleGeometry,
* index: (number|undefined),
* segment: Array.<ol.Extent>}}
*/
ol.ModifySegmentDataType;
/** /**
* An array with two elements, representing a pixel. The first element is the * An array with two elements, representing a pixel. The first element is the
* x-coordinate, the second the y-coordinate of the pixel. * x-coordinate, the second the y-coordinate of the pixel.
@@ -276,6 +363,14 @@ ol.PostRenderFunction;
ol.PreRenderFunction; ol.PreRenderFunction;
/**
* A projection as {@link ol.proj.Projection}, SRS identifier string or
* undefined.
* @typedef {ol.proj.Projection|string|undefined} ol.ProjectionLike
*/
ol.ProjectionLike;
/** /**
* A function that takes an array of input data, performs some operation, and * A function that takes an array of input data, performs some operation, and
* returns an array of ouput data. * returns an array of ouput data.
@@ -296,6 +391,20 @@ ol.PreRenderFunction;
ol.RasterOperation; ol.RasterOperation;
/**
* @typedef {{
* strokeStyle: (string|undefined),
* strokeWidth: number,
* size: number,
* lineCap: string,
* lineDash: Array.<number>,
* lineJoin: string,
* miterLimit: number
* }}
*/
ol.RegularShapeRenderOptions;
/** /**
* @typedef {function(ol.Extent, number, number) : ol.ImageBase} * @typedef {function(ol.Extent, number, number) : ol.ImageBase}
*/ */
@@ -329,6 +438,16 @@ ol.ResolutionConstraintType;
ol.RotationConstraintType; ol.RotationConstraintType;
/**
* A function that takes an {@link ol.Feature} or {@link ol.render.Feature} and
* an {@link ol.layer.Layer} and returns `true` if the feature may be selected
* or `false` otherwise.
* @typedef {function((ol.Feature|ol.render.Feature), ol.layer.Layer):
* boolean}
*/
ol.SelectFilterFunction;
/** /**
* An array of numbers representing a size: `[width, height]`. * An array of numbers representing a size: `[width, height]`.
* @typedef {Array.<number>} * @typedef {Array.<number>}
@@ -336,11 +455,30 @@ ol.RotationConstraintType;
ol.Size; ol.Size;
/**
* @typedef {{
* snapped: {boolean},
* vertex: (ol.Coordinate|null),
* vertexPixel: (ol.Pixel|null)
* }}
*/
ol.SnapResultType;
/**
* @typedef {{
* feature: ol.Feature,
* segment: Array.<ol.Coordinate>
* }}
*/
ol.SnapSegmentDataType;
/** /**
* @typedef {{attributions: (ol.AttributionLike|undefined), * @typedef {{attributions: (ol.AttributionLike|undefined),
* extent: (null|ol.Extent|undefined), * extent: (null|ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* state: (ol.source.State|undefined)}} * state: (ol.source.State|undefined)}}
*/ */
@@ -358,7 +496,7 @@ ol.SourceRasterRenderedState;
/** /**
* @typedef {{attributions: (ol.AttributionLike|undefined), * @typedef {{attributions: (ol.AttributionLike|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* state: (ol.source.State|undefined), * state: (ol.source.State|undefined),
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
*/ */
@@ -372,7 +510,7 @@ ol.SourceSourceOptions;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* tilePixelRatio: (number|undefined), * tilePixelRatio: (number|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* state: (ol.source.State|undefined), * state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined),
* wrapX: (boolean|undefined)}} * wrapX: (boolean|undefined)}}
@@ -386,7 +524,7 @@ ol.SourceTileOptions;
* extent: (ol.Extent|undefined), * extent: (ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.ProjectionLike,
* state: (ol.source.State|undefined), * state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined),
* tileLoadFunction: ol.TileLoadFunctionType, * tileLoadFunction: ol.TileLoadFunctionType,
@@ -399,6 +537,37 @@ ol.SourceTileOptions;
ol.SourceUrlTileOptions; ol.SourceUrlTileOptions;
/**
* A function that takes an {@link ol.Feature} and a `{number}` representing
* the view's resolution. The function should return a {@link ol.style.Style}
* or an array of them. This way e.g. a vector layer can be styled.
*
* @typedef {function((ol.Feature|ol.render.Feature), number):
* (ol.style.Style|Array.<ol.style.Style>)}
*/
ol.StyleFunction;
/**
* A function that takes an {@link ol.Feature} as argument and returns an
* {@link ol.geom.Geometry} that will be rendered and styled for the feature.
*
* @typedef {function((ol.Feature|ol.render.Feature)):
* (ol.geom.Geometry|ol.render.Feature|undefined)}
*/
ol.StyleGeometryFunction;
/**
* @typedef {{opacity: number,
* rotateWithView: boolean,
* rotation: number,
* scale: number,
* snapToPixel: boolean}}
*/
ol.StyleImageOptions;
/** /**
* An array of three numbers representing the location of a tile in a tile * An array of three numbers representing the location of a tile in a tile
* grid. The order is `z`, `x`, and `y`. `z` is the zoom level. * grid. The order is `z`, `x`, and `y`. `z` is the zoom level.
@@ -517,190 +686,3 @@ ol.XmlParser;
* @typedef {function(Node, *, Array.<*>)} * @typedef {function(Node, *, Array.<*>)}
*/ */
ol.XmlSerializer; ol.XmlSerializer;
/**
* A function that takes an {@link ol.MapBrowserEvent} and returns a
* `{boolean}`. If the condition is met, true should be returned.
*
* @typedef {function(ol.MapBrowserEvent): boolean}
*/
ol.events.ConditionType;
/**
* @typedef {EventTarget|ol.events.EventTarget|
* {addEventListener: function(string, Function, boolean=),
* removeEventListener: function(string, Function, boolean=),
* dispatchEvent: function(string)}}
*/
ol.events.EventTargetLike;
/**
* Key to use with {@link ol.Observable#unByKey}.
*
* @typedef {{bindTo: (Object|undefined),
* boundListener: (ol.events.ListenerFunctionType|undefined),
* callOnce: boolean,
* deleteIndex: (number|undefined),
* listener: ol.events.ListenerFunctionType,
* target: (EventTarget|ol.events.EventTarget),
* type: string}}
*/
ol.events.Key;
/**
* Listener function. This function is called with an event object as argument.
* When the function returns `false`, event propagation will stop.
*
* @typedef {function(ol.events.Event)|function(ol.events.Event): boolean}
*/
ol.events.ListenerFunctionType;
/**
* A function that takes a {@link ol.MapBrowserEvent} and two
* {@link ol.Pixel}s and returns a `{boolean}`. If the condition is met,
* true should be returned.
* @typedef {function(ol.MapBrowserEvent, ol.Pixel, ol.Pixel):boolean}
*/
ol.interaction.DragBoxEndConditionType;
/**
* Function that takes coordinates and an optional existing geometry as
* arguments, and returns a geometry. The optional existing geometry is the
* geometry that is returned when the function is called without a second
* argument.
* @typedef {function(!(ol.Coordinate|Array.<ol.Coordinate>|
* Array.<Array.<ol.Coordinate>>), ol.geom.SimpleGeometry=):
* ol.geom.SimpleGeometry}
*/
ol.interaction.DrawGeometryFunctionType;
/**
* @typedef {{depth: (Array.<number>|undefined),
* feature: ol.Feature,
* geometry: ol.geom.SimpleGeometry,
* index: (number|undefined),
* segment: Array.<ol.Extent>}}
*/
ol.interaction.SegmentDataType;
/**
* A function that takes an {@link ol.Feature} or {@link ol.render.Feature} and
* an {@link ol.layer.Layer} and returns `true` if the feature may be selected
* or `false` otherwise.
* @typedef {function((ol.Feature|ol.render.Feature), ol.layer.Layer):
* boolean}
*/
ol.interaction.SelectFilterFunction;
/**
* @typedef {{
* snapped: {boolean},
* vertex: (ol.Coordinate|null),
* vertexPixel: (ol.Pixel|null)
* }}
*/
ol.interaction.SnapResultType;
/**
* @typedef {{
* feature: ol.Feature,
* segment: Array.<ol.Coordinate>
* }}
*/
ol.interaction.SnapSegmentDataType;
/**
* A projection as {@link ol.proj.Projection}, SRS identifier string or
* undefined.
* @typedef {ol.proj.Projection|string|undefined} ol.proj.ProjectionLike
*/
ol.proj.ProjectionLike;
/**
* @typedef {{x: number, y: number, width: number, height: number}}
*/
ol.style.AtlasBlock;
/**
* Provides information for an image inside an atlas.
* `offsetX` and `offsetY` are the position of the image inside
* the atlas image `image`.
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement}}
*/
ol.style.AtlasInfo;
/**
* Provides information for an image inside an atlas manager.
* `offsetX` and `offsetY` is the position of the image inside
* the atlas image `image` and the position of the hit-detection image
* inside the hit-detection atlas image `hitImage`.
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement,
* hitImage: HTMLCanvasElement}}
*/
ol.style.AtlasManagerInfo;
/**
* @typedef {{strokeStyle: (string|undefined), strokeWidth: number,
* size: number, lineDash: Array.<number>}}
*/
ol.style.CircleRenderOptions;
/**
* @typedef {{opacity: number,
* rotateWithView: boolean,
* rotation: number,
* scale: number,
* snapToPixel: boolean}}
*/
ol.style.ImageOptions;
/**
* A function that takes an {@link ol.Feature} as argument and returns an
* {@link ol.geom.Geometry} that will be rendered and styled for the feature.
*
* @typedef {function((ol.Feature|ol.render.Feature)):
* (ol.geom.Geometry|ol.render.Feature|undefined)}
*/
ol.style.GeometryFunction;
/**
* @typedef {{
* strokeStyle: (string|undefined),
* strokeWidth: number,
* size: number,
* lineCap: string,
* lineDash: Array.<number>,
* lineJoin: string,
* miterLimit: number
* }}
*/
ol.style.RegularShapeRenderOptions;
/**
* A function that takes an {@link ol.Feature} and a `{number}` representing
* the view's resolution. The function should return a {@link ol.style.Style}
* or an array of them. This way e.g. a vector layer can be styled.
*
* @typedef {function((ol.Feature|ol.render.Feature), number):
* (ol.style.Style|Array.<ol.style.Style>)}
*/
ol.style.StyleFunction;
+1
View File
@@ -206,6 +206,7 @@ function build(config, paths, callback) {
concatenate(paths, callback); concatenate(paths, callback);
} else { } else {
log.info('ol', 'Compiling ' + paths.length + ' sources'); log.info('ol', 'Compiling ' + paths.length + ' sources');
paths = paths.concat('src/ol/typedefs.js');
options.compile.js = paths.concat(options.compile.js || []); options.compile.js = paths.concat(options.compile.js || []);
closure.compile(options, callback); closure.compile(options, callback);
} }