diff --git a/src/ol/feature.js b/src/ol/feature.js index de33035b9f..5419ccce7b 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -4,7 +4,6 @@ goog.provide('ol.FeatureStyleFunction'); goog.require('goog.asserts'); goog.require('goog.events'); goog.require('goog.events.EventType'); -goog.require('goog.functions'); goog.require('ol'); goog.require('ol.Object'); goog.require('ol.geom.Geometry'); @@ -322,7 +321,9 @@ ol.Feature.createStyleFunction = function(obj) { 'obj should be an ol.style.Style'); styles = [obj]; } - styleFunction = goog.functions.constant(styles); + styleFunction = function() { + return styles; + }; } return styleFunction; }; diff --git a/src/ol/source/rastersource.js b/src/ol/source/rastersource.js index 70083ab502..bc37f0305c 100644 --- a/src/ol/source/rastersource.js +++ b/src/ol/source/rastersource.js @@ -6,7 +6,6 @@ goog.require('goog.asserts'); goog.require('goog.events'); goog.require('goog.events.Event'); goog.require('goog.events.EventType'); -goog.require('goog.functions'); goog.require('goog.object'); goog.require('goog.vec.Mat4'); goog.require('ol.ImageCanvas'); @@ -79,7 +78,7 @@ ol.source.Raster = function(options) { * @type {ol.TileQueue} */ this.tileQueue_ = new ol.TileQueue( - goog.functions.constant(1), + function() { return 1; }, goog.bind(this.changed, this)); var layerStatesArray = ol.source.Raster.getLayerStatesArray_(this.renderers_); diff --git a/src/ol/style/style.js b/src/ol/style/style.js index 8cb9910baa..8168a9185f 100644 --- a/src/ol/style/style.js +++ b/src/ol/style/style.js @@ -4,7 +4,6 @@ goog.provide('ol.style.StyleFunction'); goog.provide('ol.style.defaultGeometryFunction'); goog.require('goog.asserts'); -goog.require('goog.functions'); goog.require('ol.geom.Geometry'); goog.require('ol.geom.GeometryType'); goog.require('ol.style.Circle'); @@ -230,7 +229,9 @@ ol.style.createStyleFunction = function(obj) { 'obj geometry must be an ol.style.Style instance'); styles = [obj]; } - styleFunction = goog.functions.constant(styles); + styleFunction = function() { + return styles; + }; } return styleFunction; };