Merge pull request #1893 from twpayne/jshint-clean-ups

Check with JSHint
This commit is contained in:
Tom Payne
2014-03-25 17:04:14 +01:00
20 changed files with 131 additions and 79 deletions

View File

@@ -1632,9 +1632,10 @@ ol.format.GML.GEOMETRY_NODE_FACTORY_ = function(value, objectStack,
var multiCurve = goog.object.get(context, 'multiCurve');
var parentNode = objectStack[objectStack.length - 1].node;
goog.asserts.assert(ol.xml.isNode(parentNode));
var nodeName;
if (!goog.isArray(value)) {
goog.asserts.assertInstanceof(value, ol.geom.Geometry);
var nodeName = value.getType();
nodeName = value.getType();
if (nodeName === 'MultiPolygon' && multiSurface === true) {
nodeName = 'MultiSurface';
} else if (nodeName === 'Polygon' && surface === true) {

View File

@@ -490,6 +490,7 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
ol.xml.setAttributeNS(node, null, 'lat', coordinate[1]);
ol.xml.setAttributeNS(node, null, 'lon', coordinate[0]);
var geometryLayout = goog.object.get(context, 'geometryLayout');
/* jshint -W086 */
switch (geometryLayout) {
case ol.geom.GeometryLayout.XYZM:
if (coordinate[3] !== 0) {
@@ -505,6 +506,7 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
goog.object.set(properties, 'time', coordinate[2]);
}
}
/* jshint +W086 */
var orderedKeys = ol.format.GPX.WPT_TYPE_SEQUENCE_[namespaceURI];
var values = ol.xml.makeSequence(properties, orderedKeys);
ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */