diff --git a/examples/mobile-full-screen.js b/examples/mobile-full-screen.js index 8803e0a5fd..7a81d4021b 100644 --- a/examples/mobile-full-screen.js +++ b/examples/mobile-full-screen.js @@ -29,7 +29,7 @@ var geolocation = new ol.Geolocation({ tracking: true }); geolocation.bindTo('projection', view); -geolocation.onOnce('position_changed', function() { +geolocation.once('position_changed', function() { view.setCenter(geolocation.getPosition()); view.setResolution(2.388657133911758); }); diff --git a/src/ol/object.exports b/src/ol/object.exports index 36ddd7c276..2091d2b937 100644 --- a/src/ol/object.exports +++ b/src/ol/object.exports @@ -3,7 +3,7 @@ @exportProperty ol.Object.prototype.get @exportProperty ol.Object.prototype.notify @exportProperty ol.Object.prototype.on -@exportProperty ol.Object.prototype.onOnce +@exportProperty ol.Object.prototype.once @exportProperty ol.Object.prototype.set @exportProperty ol.Object.prototype.setOptions @exportProperty ol.Object.prototype.setValues diff --git a/src/ol/object.js b/src/ol/object.js index 917ec9f24d..f0956e80ef 100644 --- a/src/ol/object.js +++ b/src/ol/object.js @@ -242,7 +242,7 @@ ol.Object.prototype.on = function(type, listener, opt_scope) { * the listener. * @return {?number} Unique key for the listener. */ -ol.Object.prototype.onOnce = function(type, listener, opt_scope) { +ol.Object.prototype.once = function(type, listener, opt_scope) { return goog.events.listenOnce(this, type, listener, false, opt_scope); };