From 91a8703852efc276b2378ea650416158b02e62f5 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 20 Jun 2013 17:56:37 -0600 Subject: [PATCH] Correct typo in geometry type (thanks @jystic) Previously read 'multilinstring' instead of 'multilinestring'. Letting the compiler check for typos instead now. --- src/ol/layer/vectorlayer.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ol/layer/vectorlayer.js b/src/ol/layer/vectorlayer.js index f662b44ca8..12ffb250d5 100644 --- a/src/ol/layer/vectorlayer.js +++ b/src/ol/layer/vectorlayer.js @@ -5,6 +5,7 @@ goog.require('goog.asserts'); goog.require('goog.events.EventType'); goog.require('goog.object'); goog.require('ol.Feature'); +goog.require('ol.geom.GeometryType'); goog.require('ol.geom.SharedVertices'); goog.require('ol.layer.Layer'); goog.require('ol.proj'); @@ -335,14 +336,13 @@ ol.layer.Vector.prototype.groupFeaturesBySymbolizerLiteral = ol.layer.Vector.prototype.parseFeatures = function(data, parser, projection) { var features; - var lookup = { - 'point': this.pointVertices_, - 'linestring': this.lineVertices_, - 'polygon': this.polygonVertices_, - 'multipoint': this.pointVertices_, - 'multilinstring': this.lineVertices_, - 'multipolygon': this.polygonVertices_ - }; + var lookup = {}; + lookup[ol.geom.GeometryType.POINT] = this.pointVertices_; + lookup[ol.geom.GeometryType.LINESTRING] = this.lineVertices_; + lookup[ol.geom.GeometryType.POLYGON] = this.polygonVertices_; + lookup[ol.geom.GeometryType.MULTIPOINT] = this.pointVertices_; + lookup[ol.geom.GeometryType.MULTILINESTRING] = this.lineVertices_; + lookup[ol.geom.GeometryType.MULTIPOLYGON] = this.polygonVertices_; var callback = function(feature, type) { return lookup[type];