diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md index d097f27d91..9f2c71999c 100644 --- a/changelog/upgrade-notes.md +++ b/changelog/upgrade-notes.md @@ -8,19 +8,21 @@ As last step in the removal of the dependency on Google Closure Library, the `go A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following: - * rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits` - * rename `ol.style.IconOrigin` to `ol.style.Icon.Origin` - * rename `ol.format.IGCZ` to `ol.format.IGC.Z` - * rename `ol.layer.GroupProperty` to `ol.layer.Group.Property` * rename `ol.CollectionProperty` to `ol.Collection.Property` * rename `ol.DeviceOrientationProperty` to `ol.DeviceOrientation.Property` * rename `ol.GeolocationProperty` to `ol.Geolocation.Property` - * rename `ol.OverlayProperty` to `ol.Overlay.Property` * rename `ol.OverlayPositioning` to `ol.Overlay.Positioning` + * rename `ol.OverlayProperty` to `ol.Overlay.Property` * rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property` - * rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType` - * rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding` + * rename `ol.format.IGCZ` to `ol.format.IGC.Z` + * rename `ol.layer.GroupProperty` to `ol.layer.Group.Property` * rename `ol.layer.HeatmapLayerProperty` to `ol.layer.Heatmap.Property` + * rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType` + * rename `ol.source.TileEvent` to `ol.source.Tile.Event` + * rename `ol.source.TileEventType` to `ol.source.Tile.EventType` + * rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding` + * rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits` + * rename `ol.style.IconOrigin` to `ol.style.Icon.Origin` ### v3.18.0 diff --git a/externs/oli.js b/externs/oli.js index 305b8fe033..0cc9e747b8 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -347,13 +347,13 @@ oli.source.RasterEvent.prototype.data; /** * @interface */ -oli.source.TileEvent = function() {}; +oli.source.Tile.Event = function() {}; /** * @type {ol.Tile} */ -oli.source.TileEvent.prototype.tile; +oli.source.Tile.Event.prototype.tile; /** diff --git a/src/ol/source/tile.js b/src/ol/source/tile.js index 1772e3a6c5..8211d28cfd 100644 --- a/src/ol/source/tile.js +++ b/src/ol/source/tile.js @@ -1,5 +1,4 @@ goog.provide('ol.source.Tile'); -goog.provide('ol.source.TileEvent'); goog.require('ol'); goog.require('ol.Tile'); @@ -318,11 +317,11 @@ ol.source.Tile.prototype.useTile = ol.nullFunction; * * @constructor * @extends {ol.events.Event} - * @implements {oli.source.TileEvent} + * @implements {oli.source.Tile.Event} * @param {string} type Type. * @param {ol.Tile} tile The tile. */ -ol.source.TileEvent = function(type, tile) { +ol.source.Tile.Event = function(type, tile) { ol.events.Event.call(this, type); @@ -334,31 +333,31 @@ ol.source.TileEvent = function(type, tile) { this.tile = tile; }; -ol.inherits(ol.source.TileEvent, ol.events.Event); +ol.inherits(ol.source.Tile.Event, ol.events.Event); /** * @enum {string} */ -ol.source.TileEventType = { +ol.source.Tile.EventType = { /** * Triggered when a tile starts loading. - * @event ol.source.TileEvent#tileloadstart + * @event ol.source.Tile.Event#tileloadstart * @api stable */ TILELOADSTART: 'tileloadstart', /** * Triggered when a tile finishes loading. - * @event ol.source.TileEvent#tileloadend + * @event ol.source.Tile.Event#tileloadend * @api stable */ TILELOADEND: 'tileloadend', /** * Triggered if tile loading results in an error. - * @event ol.source.TileEvent#tileloaderror + * @event ol.source.Tile.Event#tileloaderror * @api stable */ TILELOADERROR: 'tileloaderror' diff --git a/src/ol/source/tileimage.js b/src/ol/source/tileimage.js index 132055da5a..dba039aa93 100644 --- a/src/ol/source/tileimage.js +++ b/src/ol/source/tileimage.js @@ -17,7 +17,7 @@ goog.require('ol.tilegrid'); * Base class for sources providing images divided into a tile grid. * * @constructor - * @fires ol.source.TileEvent + * @fires ol.source.Tile.Event * @extends {ol.source.UrlTile} * @param {olx.source.TileImageOptions} options Image tile options. * @api diff --git a/src/ol/source/urltile.js b/src/ol/source/urltile.js index 1cbc28bc19..11c66bed3b 100644 --- a/src/ol/source/urltile.js +++ b/src/ol/source/urltile.js @@ -4,7 +4,6 @@ goog.require('ol'); goog.require('ol.Tile'); goog.require('ol.TileUrlFunction'); goog.require('ol.source.Tile'); -goog.require('ol.source.TileEvent'); /** @@ -12,7 +11,7 @@ goog.require('ol.source.TileEvent'); * Base class for sources providing tiles divided into a tile grid over http. * * @constructor - * @fires ol.source.TileEvent + * @fires ol.source.Tile.Event * @extends {ol.source.Tile} * @param {ol.SourceUrlTileOptions} options Image tile options. */ @@ -112,15 +111,15 @@ ol.source.UrlTile.prototype.handleTileChange = function(event) { switch (tile.getState()) { case ol.Tile.State.LOADING: this.dispatchEvent( - new ol.source.TileEvent(ol.source.TileEventType.TILELOADSTART, tile)); + new ol.source.Tile.Event(ol.source.Tile.EventType.TILELOADSTART, tile)); break; case ol.Tile.State.LOADED: this.dispatchEvent( - new ol.source.TileEvent(ol.source.TileEventType.TILELOADEND, tile)); + new ol.source.Tile.Event(ol.source.Tile.EventType.TILELOADEND, tile)); break; case ol.Tile.State.ERROR: this.dispatchEvent( - new ol.source.TileEvent(ol.source.TileEventType.TILELOADERROR, tile)); + new ol.source.Tile.Event(ol.source.Tile.EventType.TILELOADERROR, tile)); break; default: // pass diff --git a/src/ol/source/vectortile.js b/src/ol/source/vectortile.js index cf972b0c39..b6482bde47 100644 --- a/src/ol/source/vectortile.js +++ b/src/ol/source/vectortile.js @@ -21,7 +21,7 @@ goog.require('ol.source.UrlTile'); * editing. * * @constructor - * @fires ol.source.TileEvent + * @fires ol.source.Tile.Event * @extends {ol.source.UrlTile} * @param {olx.source.VectorTileOptions} options Vector tile options. * @api