From 81d0e9ea6342aa79e2f49e25a037c8ee396884b7 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 23 Feb 2016 15:51:13 +0100 Subject: [PATCH 1/3] Use get(key) instead of getProperties()[key] --- src/ol/format/kmlformat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index ec3bf42826..270fee0552 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -388,7 +388,7 @@ ol.format.KML.createFeatureStyleFunction_ = function(style, styleUrl, } if (drawName) { - name = /** @type {string} */ (this.getProperties()['name']); + name = /** @type {string} */ (this.get('name')); drawName = drawName && name; } From 950bb1810c92d14344092990bd13b405afb05915 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 23 Feb 2016 15:59:56 +0100 Subject: [PATCH 2/3] Remove unneeded type cast --- src/ol/format/kmlformat.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 270fee0552..c864bea402 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -318,7 +318,6 @@ ol.format.KML.ICON_ANCHOR_UNITS_MAP_ = { * @private */ ol.format.KML.createNameStyleFunction_ = function(foundStyle, name) { - /** @type {?ol.style.Text} */ var textStyle = null; var textOffset = [0, 0]; var textAlign = 'start'; @@ -378,7 +377,6 @@ ol.format.KML.createFeatureStyleFunction_ = function(style, styleUrl, var drawName = showPointNames; /** @type {ol.style.Style|undefined} */ var nameStyle; - /** @type {string} */ var name = ''; if (drawName) { if (this.getGeometry()) { @@ -1002,9 +1000,7 @@ ol.format.KML.readMultiGeometry_ = function(node, objectStack) { } } if (homogeneous) { - /** @type {ol.geom.GeometryLayout} */ var layout; - /** @type {Array.} */ var flatCoordinates; if (type == ol.geom.GeometryType.POINT) { var point = geometries[0]; From d0f71bf64f771f0ac192914c51385f3ebcd1d045 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 23 Feb 2016 16:09:27 +0100 Subject: [PATCH 3/3] Remove old fixme --- src/ol/format/kmlformat.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index c864bea402..66dc5301b4 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -1,6 +1,5 @@ // FIXME http://earth.google.com/kml/1.0 namespace? // FIXME why does node.getAttribute return an unknown type? -// FIXME text // FIXME serialize arbitrary feature properties // FIXME don't parse style if extractStyles is false