Merge pull request #4092 from fredj/coding_style

Minor coding style fixes
This commit is contained in:
Frédéric Junod
2015-09-09 07:43:42 +02:00
2 changed files with 4 additions and 5 deletions
+3 -3
View File
@@ -1681,7 +1681,7 @@ ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) {
} }
var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]); var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
var geometry = goog.object.get(object, 'geometry'); var geometry = object['geometry'];
if (goog.isDefAndNotNull(geometry)) { if (goog.isDefAndNotNull(geometry)) {
ol.format.Feature.transformWithOptions(geometry, false, options); ol.format.Feature.transformWithOptions(geometry, false, options);
} }
@@ -1689,8 +1689,8 @@ ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) {
goog.object.remove(object, 'geometry'); goog.object.remove(object, 'geometry');
if (this.extractStyles_) { if (this.extractStyles_) {
var style = goog.object.get(object, 'Style'); var style = object['Style'];
var styleUrl = goog.object.get(object, 'styleUrl'); var styleUrl = object['styleUrl'];
var styleFunction = ol.format.KML.createFeatureStyleFunction_( var styleFunction = ol.format.KML.createFeatureStyleFunction_(
style, styleUrl, this.defaultStyle_, this.sharedStyles_); style, styleUrl, this.defaultStyle_, this.sharedStyles_);
feature.setStyle(styleFunction); feature.setStyle(styleFunction);
+1 -2
View File
@@ -2,7 +2,6 @@ goog.provide('ol.format.WMTSCapabilities');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('goog.dom.NodeType'); goog.require('goog.dom.NodeType');
goog.require('goog.object');
goog.require('goog.string'); goog.require('goog.string');
goog.require('ol.extent'); goog.require('ol.extent');
goog.require('ol.format.OWS'); goog.require('ol.format.OWS');
@@ -75,7 +74,7 @@ ol.format.WMTSCapabilities.prototype.readFromNode = function(node) {
if (!goog.isDef(WMTSCapabilityObject)) { if (!goog.isDef(WMTSCapabilityObject)) {
return null; return null;
} }
goog.object.set(WMTSCapabilityObject, 'version', this.version); WMTSCapabilityObject['version'] = this.version;
WMTSCapabilityObject = ol.xml.pushParseAndPop(WMTSCapabilityObject, WMTSCapabilityObject = ol.xml.pushParseAndPop(WMTSCapabilityObject,
ol.format.WMTSCapabilities.PARSERS_, node, []); ol.format.WMTSCapabilities.PARSERS_, node, []);
return goog.isDef(WMTSCapabilityObject) ? WMTSCapabilityObject : null; return goog.isDef(WMTSCapabilityObject) ? WMTSCapabilityObject : null;