Rename ol.source.ImageSource to ol.source.Image

This commit is contained in:
Tom Payne
2013-09-09 14:33:12 +02:00
parent fc2975f346
commit 5967f96047
6 changed files with 22 additions and 22 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ goog.require('ol.Size');
/** /**
* @typedef {function(this:ol.source.ImageSource, ol.Extent, ol.Size, * @typedef {function(this:ol.source.Image, ol.Extent, ol.Size,
* ol.Projection): (string|undefined)} * ol.Projection): (string|undefined)}
*/ */
ol.ImageUrlFunctionType; ol.ImageUrlFunctionType;
@@ -22,7 +22,7 @@ ol.ImageUrlFunction.createFromParamsFunction =
function(baseUrl, params, paramsFunction) { function(baseUrl, params, paramsFunction) {
return ( return (
/** /**
* @this {ol.source.ImageSource} * @this {ol.source.Image}
* @param {ol.Extent} extent Extent. * @param {ol.Extent} extent Extent.
* @param {ol.Size} size Size. * @param {ol.Size} size Size.
* @param {ol.Projection} projection Projection. * @param {ol.Projection} projection Projection.
@@ -35,7 +35,7 @@ ol.ImageUrlFunction.createFromParamsFunction =
/** /**
* @this {ol.source.ImageSource} * @this {ol.source.Image}
* @param {ol.Extent} extent Extent. * @param {ol.Extent} extent Extent.
* @param {ol.Size} size Size. * @param {ol.Size} size Size.
* @return {string|undefined} Image URL. * @return {string|undefined} Image URL.
+3 -3
View File
@@ -1,7 +1,7 @@
goog.provide('ol.layer.ImageLayer'); goog.provide('ol.layer.ImageLayer');
goog.require('ol.layer.Layer'); goog.require('ol.layer.Layer');
goog.require('ol.source.ImageSource'); goog.require('ol.source.Image');
@@ -17,8 +17,8 @@ goog.inherits(ol.layer.ImageLayer, ol.layer.Layer);
/** /**
* @return {ol.source.ImageSource} Single image source. * @return {ol.source.Image} Single image source.
*/ */
ol.layer.ImageLayer.prototype.getImageSource = function() { ol.layer.ImageLayer.prototype.getImageSource = function() {
return /** @type {ol.source.ImageSource} */ (this.getSource()); return /** @type {ol.source.Image} */ (this.getSource());
}; };
+8 -8
View File
@@ -1,4 +1,4 @@
goog.provide('ol.source.ImageSource'); goog.provide('ol.source.Image');
goog.require('goog.array'); goog.require('goog.array');
goog.require('goog.asserts'); goog.require('goog.asserts');
@@ -23,16 +23,16 @@ goog.require('ol.source.Source');
* imageUrlFunction: (ol.ImageUrlFunctionType| * imageUrlFunction: (ol.ImageUrlFunctionType|
* undefined)}} * undefined)}}
*/ */
ol.source.ImageSourceOptions; ol.source.ImageOptions;
/** /**
* @constructor * @constructor
* @extends {ol.source.Source} * @extends {ol.source.Source}
* @param {ol.source.ImageSourceOptions} options Single image source options. * @param {ol.source.ImageOptions} options Single image source options.
*/ */
ol.source.ImageSource = function(options) { ol.source.Image = function(options) {
goog.base(this, { goog.base(this, {
attributions: options.attributions, attributions: options.attributions,
@@ -70,7 +70,7 @@ ol.source.ImageSource = function(options) {
}, true)); }, true));
}; };
goog.inherits(ol.source.ImageSource, ol.source.Source); goog.inherits(ol.source.Image, ol.source.Source);
/** /**
@@ -81,7 +81,7 @@ goog.inherits(ol.source.ImageSource, ol.source.Source);
* @param {ol.Projection} projection Projection. * @param {ol.Projection} projection Projection.
* @return {ol.Image} Single image. * @return {ol.Image} Single image.
*/ */
ol.source.ImageSource.prototype.createImage = ol.source.Image.prototype.createImage =
function(extent, resolution, size, projection) { function(extent, resolution, size, projection) {
var image = null; var image = null;
var imageUrl = this.imageUrlFunction(extent, size, projection); var imageUrl = this.imageUrlFunction(extent, size, projection);
@@ -99,7 +99,7 @@ ol.source.ImageSource.prototype.createImage =
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {number} Resolution. * @return {number} Resolution.
*/ */
ol.source.ImageSource.prototype.findNearestResolution = ol.source.Image.prototype.findNearestResolution =
function(resolution) { function(resolution) {
if (!goog.isNull(this.resolutions_)) { if (!goog.isNull(this.resolutions_)) {
var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0); var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
@@ -115,4 +115,4 @@ ol.source.ImageSource.prototype.findNearestResolution =
* @param {ol.Projection} projection Projection. * @param {ol.Projection} projection Projection.
* @return {ol.Image} Single image. * @return {ol.Image} Single image.
*/ */
ol.source.ImageSource.prototype.getImage = goog.abstractMethod; ol.source.Image.prototype.getImage = goog.abstractMethod;
+3 -3
View File
@@ -5,14 +5,14 @@ goog.require('ol.Image');
goog.require('ol.ImageUrlFunction'); goog.require('ol.ImageUrlFunction');
goog.require('ol.extent'); goog.require('ol.extent');
goog.require('ol.source.FeatureInfoSource'); goog.require('ol.source.FeatureInfoSource');
goog.require('ol.source.ImageSource'); goog.require('ol.source.Image');
goog.require('ol.source.wms'); goog.require('ol.source.wms');
/** /**
* @constructor * @constructor
* @extends {ol.source.ImageSource} * @extends {ol.source.Image}
* @implements {ol.source.FeatureInfoSource} * @implements {ol.source.FeatureInfoSource}
* @param {ol.source.SingleImageWMSOptions} options Options. * @param {ol.source.SingleImageWMSOptions} options Options.
*/ */
@@ -52,7 +52,7 @@ ol.source.SingleImageWMS = function(options) {
options.ratio : 1.5; options.ratio : 1.5;
}; };
goog.inherits(ol.source.SingleImageWMS, ol.source.ImageSource); goog.inherits(ol.source.SingleImageWMS, ol.source.Image);
/** /**
+3 -3
View File
@@ -4,13 +4,13 @@ goog.require('ol.Image');
goog.require('ol.ImageUrlFunctionType'); goog.require('ol.ImageUrlFunctionType');
goog.require('ol.extent'); goog.require('ol.extent');
goog.require('ol.proj'); goog.require('ol.proj');
goog.require('ol.source.ImageSource'); goog.require('ol.source.Image');
/** /**
* @constructor * @constructor
* @extends {ol.source.ImageSource} * @extends {ol.source.Image}
* @param {ol.source.StaticImageOptions} options Static image options. * @param {ol.source.StaticImageOptions} options Static image options.
*/ */
ol.source.StaticImage = function(options) { ol.source.StaticImage = function(options) {
@@ -40,7 +40,7 @@ ol.source.StaticImage = function(options) {
imageExtent, imageResolution, imageSize, projection); imageExtent, imageResolution, imageSize, projection);
}; };
goog.inherits(ol.source.StaticImage, ol.source.ImageSource); goog.inherits(ol.source.StaticImage, ol.source.Image);
/** /**
@@ -16,7 +16,7 @@ describe('ol.renderer.webgl.ImageLayer', function() {
target: document.createElement('div') target: document.createElement('div')
}); });
var layer = new ol.layer.ImageLayer({ var layer = new ol.layer.ImageLayer({
source: new ol.source.ImageSource({ source: new ol.source.Image({
extent: [0, 1, 0, 1] extent: [0, 1, 0, 1]
}) })
}); });
@@ -81,5 +81,5 @@ goog.require('goog.vec.Mat4');
goog.require('goog.vec.Vec4'); goog.require('goog.vec.Vec4');
goog.require('ol.Map'); goog.require('ol.Map');
goog.require('ol.layer.ImageLayer'); goog.require('ol.layer.ImageLayer');
goog.require('ol.source.ImageSource'); goog.require('ol.source.Image');
goog.require('ol.renderer.webgl.ImageLayer'); goog.require('ol.renderer.webgl.ImageLayer');