From f02ad3e5849b0373ed7ab043dce70f4faa896aca Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 8 Sep 2015 16:26:43 +0200 Subject: [PATCH 1/2] Use bracket notation instead of goog.object.set --- src/ol/format/wmtscapabilitiesformat.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ol/format/wmtscapabilitiesformat.js b/src/ol/format/wmtscapabilitiesformat.js index 52d09023ce..aabfff519c 100644 --- a/src/ol/format/wmtscapabilitiesformat.js +++ b/src/ol/format/wmtscapabilitiesformat.js @@ -2,7 +2,6 @@ goog.provide('ol.format.WMTSCapabilities'); goog.require('goog.asserts'); goog.require('goog.dom.NodeType'); -goog.require('goog.object'); goog.require('goog.string'); goog.require('ol.extent'); goog.require('ol.format.OWS'); @@ -75,7 +74,7 @@ ol.format.WMTSCapabilities.prototype.readFromNode = function(node) { if (!goog.isDef(WMTSCapabilityObject)) { return null; } - goog.object.set(WMTSCapabilityObject, 'version', this.version); + WMTSCapabilityObject['version'] = this.version; WMTSCapabilityObject = ol.xml.pushParseAndPop(WMTSCapabilityObject, ol.format.WMTSCapabilities.PARSERS_, node, []); return goog.isDef(WMTSCapabilityObject) ? WMTSCapabilityObject : null; From d0722cab6a49fc79fd9906b1fbfe231c1e9dbd8a Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 8 Sep 2015 16:32:59 +0200 Subject: [PATCH 2/2] Use bracket notation instead of goog.object.get --- src/ol/format/kmlformat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 6816ea6cb1..d859efa16c 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -1681,7 +1681,7 @@ ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) { } var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]); - var geometry = goog.object.get(object, 'geometry'); + var geometry = object['geometry']; if (goog.isDefAndNotNull(geometry)) { ol.format.Feature.transformWithOptions(geometry, false, options); } @@ -1689,8 +1689,8 @@ ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) { goog.object.remove(object, 'geometry'); if (this.extractStyles_) { - var style = goog.object.get(object, 'Style'); - var styleUrl = goog.object.get(object, 'styleUrl'); + var style = object['Style']; + var styleUrl = object['styleUrl']; var styleFunction = ol.format.KML.createFeatureStyleFunction_( style, styleUrl, this.defaultStyle_, this.sharedStyles_); feature.setStyle(styleFunction);