Remove use of goog.object.containsKey

This commit is contained in:
Frederic Junod
2015-09-23 12:17:02 +02:00
parent b53e4e39ad
commit e884a8704d

View File

@@ -3,7 +3,6 @@ goog.provide('ol.format.GPX');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.dom.NodeType');
goog.require('goog.object');
goog.require('ol.Feature');
goog.require('ol.format.Feature');
goog.require('ol.format.XMLFeature');
@@ -71,14 +70,14 @@ ol.format.GPX.appendCoordinate_ = function(flatCoordinates, node, values) {
flatCoordinates.push(
parseFloat(node.getAttribute('lon')),
parseFloat(node.getAttribute('lat')));
if (goog.object.containsKey(values, 'ele')) {
if ('ele' in values) {
flatCoordinates.push(
/** @type {number} */ (values['ele']));
delete values['ele'];
} else {
flatCoordinates.push(0);
}
if (goog.object.containsKey(values, 'time')) {
if ('time' in values) {
flatCoordinates.push(
/** @type {number} */ (values['time']));
delete values['time'];