Set default 'tracking' property to false

This commit is contained in:
Frederic Junod
2013-06-21 09:21:48 +02:00
parent c4ce85c847
commit 9cac8a92df
2 changed files with 10 additions and 6 deletions

View File

@@ -86,9 +86,8 @@ ol.Geolocation = function(opt_options) {
if (goog.isDef(options.trackingOptions)) {
this.setTrackingOptions(options.trackingOptions);
}
if (goog.isDef(options.tracking)) {
this.setTracking(options.tracking);
}
this.setTracking(goog.isDef(options.tracking) ? options.tracking : false);
};
goog.inherits(ol.Geolocation, ol.Object);
@@ -282,7 +281,7 @@ goog.exportProperty(
/**
* Are we tracking the user's position?
* @return {boolean|undefined} tracking.
* @return {boolean} tracking.
*/
ol.Geolocation.prototype.getTracking = function() {
return /** @type {boolean} */ (