diff --git a/config/jsdoc/api/index.md b/config/jsdoc/api/index.md
index 78f996ec6b..4fbb628855 100644
--- a/config/jsdoc/api/index.md
+++ b/config/jsdoc/api/index.md
@@ -34,7 +34,7 @@ Interactions for [vector features](ol.Feature.html)
All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform, use [ol.proj.transform()](ol.proj.html#.transform) and [ol.proj.transformExtent()](ol.proj.html#.transformExtent).
[ol.proj](ol.proj.html) |
-Changes to all [ol.Objects](ol.Object.html) can observed by calling the [object.on('propertychange')](ol.Object.html#on) method. Listeners receive an [ol.ObjectEvent](ol.ObjectEvent.html) with information on the changed property and old value.
+ | Changes to all [ol.Objects](ol.Object.html) can observed by calling the [object.on('propertychange')](ol.Object.html#on) method. Listeners receive an [ol.Object.Event](ol.Object.Event.html) with information on the changed property and old value.
| [ol.DeviceOrientation](ol.DeviceOrientation.html)
[ol.Geolocation](ol.Geolocation.html)
[ol.Overlay](ol.Overlay.html)
|
diff --git a/config/jsdoc/api/plugins/observable.js b/config/jsdoc/api/plugins/observable.js
index b3bc7f3925..e662d81626 100644
--- a/config/jsdoc/api/plugins/observable.js
+++ b/config/jsdoc/api/plugins/observable.js
@@ -47,7 +47,7 @@ exports.handlers = {
if (!cls.fires) {
cls.fires = [];
}
- event = 'ol.ObjectEvent#event:change:' + name;
+ event = 'ol.Object.Event#event:change:' + name;
if (cls.fires.indexOf(event) == -1) {
cls.fires.push(event);
}
diff --git a/config/jsdoc/api/template/tmpl/observables.tmpl b/config/jsdoc/api/template/tmpl/observables.tmpl
index 38e257270b..e6859aad70 100644
--- a/config/jsdoc/api/template/tmpl/observables.tmpl
+++ b/config/jsdoc/api/template/tmpl/observables.tmpl
@@ -8,7 +8,7 @@
Name |
Type |
Settable |
- ol.ObjectEvent type |
+ ol.Object.Event type |
Description |
diff --git a/externs/oli.js b/externs/oli.js
index eadebe516a..c45c80b969 100644
--- a/externs/oli.js
+++ b/externs/oli.js
@@ -109,22 +109,28 @@ oli.ModifyEvent.prototype.features;
oli.ModifyEvent.prototype.mapBrowserEvent;
+/**
+ * @type {Object}
+ */
+oli.Object;
+
+
/**
* @interface
*/
-oli.ObjectEvent = function() {};
+oli.Object.Event = function() {};
/**
* @type {string}
*/
-oli.ObjectEvent.prototype.key;
+oli.Object.Event.prototype.key;
/**
* @type {*}
*/
-oli.ObjectEvent.prototype.oldValue;
+oli.Object.Event.prototype.oldValue;
/**
diff --git a/externs/olx.js b/externs/olx.js
index 41eada26e2..5d9bd288f5 100644
--- a/externs/olx.js
+++ b/externs/olx.js
@@ -5257,7 +5257,7 @@ olx.source.ImageVectorOptions.prototype.style;
* operation: (ol.RasterOperation|undefined),
* lib: (Object|undefined),
* threads: (number|undefined),
- * operationType: (ol.RasterOperationType|undefined)}}
+ * operationType: (ol.source.Raster.OperationType|undefined)}}
* @api
*/
olx.source.RasterOptions;
@@ -5305,7 +5305,7 @@ olx.source.RasterOptions.prototype.threads;
* `'pixel'` operations are assumed, and operations will be called with an
* array of pixels from input sources. If set to `'image'`, operations will
* be called with an array of ImageData objects from input sources.
- * @type {ol.RasterOperationType|undefined}
+ * @type {ol.source.Raster.OperationType|undefined}
* @api
*/
olx.source.RasterOptions.prototype.operationType;
diff --git a/package.json b/package.json
index f044a4c1d9..e335af25da 100644
--- a/package.json
+++ b/package.json
@@ -100,7 +100,7 @@
"openlayers-internal/no-duplicate-requires": 2,
"openlayers-internal/no-missing-requires": 1,
"openlayers-internal/no-unused-requires": 2,
- "openlayers-internal/one-provide": 1,
+ "openlayers-internal/one-provide": 2,
"openlayers-internal/requires-first": 2,
"openlayers-internal/valid-provide": 2,
"openlayers-internal/valid-requires": 2
diff --git a/src/ol/control/overviewmap.js b/src/ol/control/overviewmap.js
index cd099bf3c9..681d6eddc9 100644
--- a/src/ol/control/overviewmap.js
+++ b/src/ol/control/overviewmap.js
@@ -5,7 +5,6 @@ goog.require('ol.Collection');
goog.require('ol.Map');
goog.require('ol.MapEvent');
goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
goog.require('ol.Overlay');
goog.require('ol.View');
goog.require('ol.control.Control');
@@ -166,7 +165,7 @@ ol.control.OverviewMap.prototype.setMap = function(map) {
if (map) {
this.listenerKeys.push(ol.events.listen(
- map, ol.ObjectEventType.PROPERTYCHANGE,
+ map, ol.Object.EventType.PROPERTYCHANGE,
this.handleMapPropertyChange_, this));
// TODO: to really support map switching, this would need to be reworked
@@ -188,7 +187,7 @@ ol.control.OverviewMap.prototype.setMap = function(map) {
/**
* Handle map property changes. This only deals with changes to the map's view.
- * @param {ol.ObjectEvent} event The propertychange event.
+ * @param {ol.Object.Event} event The propertychange event.
* @private
*/
ol.control.OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
diff --git a/src/ol/extent/corner.js b/src/ol/extent/corner.js
new file mode 100644
index 0000000000..6c808c47a6
--- /dev/null
+++ b/src/ol/extent/corner.js
@@ -0,0 +1,12 @@
+goog.provide('ol.extent.Corner');
+
+/**
+ * Extent corner.
+ * @enum {string}
+ */
+ol.extent.Corner = {
+ BOTTOM_LEFT: 'bottom-left',
+ BOTTOM_RIGHT: 'bottom-right',
+ TOP_LEFT: 'top-left',
+ TOP_RIGHT: 'top-right'
+};
diff --git a/src/ol/extent.js b/src/ol/extent/index.js
similarity index 98%
rename from src/ol/extent.js
rename to src/ol/extent/index.js
index 2f118d5001..70e0a2d55c 100644
--- a/src/ol/extent.js
+++ b/src/ol/extent/index.js
@@ -1,35 +1,9 @@
goog.provide('ol.extent');
-goog.provide('ol.extent.Corner');
-goog.provide('ol.extent.Relationship');
goog.require('ol');
goog.require('ol.asserts');
-
-
-/**
- * Extent corner.
- * @enum {string}
- */
-ol.extent.Corner = {
- BOTTOM_LEFT: 'bottom-left',
- BOTTOM_RIGHT: 'bottom-right',
- TOP_LEFT: 'top-left',
- TOP_RIGHT: 'top-right'
-};
-
-
-/**
- * Relationship to an extent.
- * @enum {number}
- */
-ol.extent.Relationship = {
- UNKNOWN: 0,
- INTERSECTING: 1,
- ABOVE: 2,
- RIGHT: 4,
- BELOW: 8,
- LEFT: 16
-};
+goog.require('ol.extent.Corner');
+goog.require('ol.extent.Relationship');
/**
diff --git a/src/ol/extent/relationship.js b/src/ol/extent/relationship.js
new file mode 100644
index 0000000000..ac359b3661
--- /dev/null
+++ b/src/ol/extent/relationship.js
@@ -0,0 +1,15 @@
+goog.provide('ol.extent.Relationship');
+
+
+/**
+ * Relationship to an extent.
+ * @enum {number}
+ */
+ol.extent.Relationship = {
+ UNKNOWN: 0,
+ INTERSECTING: 1,
+ ABOVE: 2,
+ RIGHT: 4,
+ BELOW: 8,
+ LEFT: 16
+};
diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js
index 8352a839cd..fd158cde3b 100644
--- a/src/ol/geom/geometry.js
+++ b/src/ol/geom/geometry.js
@@ -1,48 +1,13 @@
goog.provide('ol.geom.Geometry');
-goog.provide('ol.geom.GeometryLayout');
-goog.provide('ol.geom.GeometryType');
goog.require('ol');
-goog.require('ol.functions');
goog.require('ol.Object');
goog.require('ol.extent');
+goog.require('ol.functions');
goog.require('ol.proj');
goog.require('ol.proj.Units');
-/**
- * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
- * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
- * `'GeometryCollection'`, `'Circle'`.
- * @enum {string}
- */
-ol.geom.GeometryType = {
- POINT: 'Point',
- LINE_STRING: 'LineString',
- LINEAR_RING: 'LinearRing',
- POLYGON: 'Polygon',
- MULTI_POINT: 'MultiPoint',
- MULTI_LINE_STRING: 'MultiLineString',
- MULTI_POLYGON: 'MultiPolygon',
- GEOMETRY_COLLECTION: 'GeometryCollection',
- CIRCLE: 'Circle'
-};
-
-
-/**
- * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')
- * or measure ('M') coordinate is available. Supported values are `'XY'`,
- * `'XYZ'`, `'XYM'`, `'XYZM'`.
- * @enum {string}
- */
-ol.geom.GeometryLayout = {
- XY: 'XY',
- XYZ: 'XYZ',
- XYM: 'XYM',
- XYZM: 'XYZM'
-};
-
-
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
diff --git a/src/ol/geom/geometrylayout.js b/src/ol/geom/geometrylayout.js
new file mode 100644
index 0000000000..3578e1ffe3
--- /dev/null
+++ b/src/ol/geom/geometrylayout.js
@@ -0,0 +1,15 @@
+goog.provide('ol.geom.GeometryLayout');
+
+
+/**
+ * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')
+ * or measure ('M') coordinate is available. Supported values are `'XY'`,
+ * `'XYZ'`, `'XYM'`, `'XYZM'`.
+ * @enum {string}
+ */
+ol.geom.GeometryLayout = {
+ XY: 'XY',
+ XYZ: 'XYZ',
+ XYM: 'XYM',
+ XYZM: 'XYZM'
+};
diff --git a/src/ol/geom/geometrytype.js b/src/ol/geom/geometrytype.js
new file mode 100644
index 0000000000..9b1fde2c0d
--- /dev/null
+++ b/src/ol/geom/geometrytype.js
@@ -0,0 +1,20 @@
+goog.provide('ol.geom.GeometryType');
+
+
+/**
+ * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
+ * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
+ * `'GeometryCollection'`, `'Circle'`.
+ * @enum {string}
+ */
+ol.geom.GeometryType = {
+ POINT: 'Point',
+ LINE_STRING: 'LineString',
+ LINEAR_RING: 'LinearRing',
+ POLYGON: 'Polygon',
+ MULTI_POINT: 'MultiPoint',
+ MULTI_LINE_STRING: 'MultiLineString',
+ MULTI_POLYGON: 'MultiPolygon',
+ GEOMETRY_COLLECTION: 'GeometryCollection',
+ CIRCLE: 'Circle'
+};
diff --git a/src/ol/layer/base.js b/src/ol/layer/base.js
index c2e0827927..3b6a0c5ec5 100644
--- a/src/ol/layer/base.js
+++ b/src/ol/layer/base.js
@@ -1,5 +1,4 @@
goog.provide('ol.layer.Base');
-goog.provide('ol.layer.LayerProperty');
goog.require('ol');
goog.require('ol.Object');
@@ -7,20 +6,6 @@ goog.require('ol.math');
goog.require('ol.obj');
-/**
- * @enum {string}
- */
-ol.layer.LayerProperty = {
- OPACITY: 'opacity',
- VISIBLE: 'visible',
- EXTENT: 'extent',
- Z_INDEX: 'zIndex',
- MAX_RESOLUTION: 'maxResolution',
- MIN_RESOLUTION: 'minResolution',
- SOURCE: 'source'
-};
-
-
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -42,15 +27,15 @@ ol.layer.Base = function(options) {
* @type {Object.