code: function(encoded) {
          var geomType;
          if (this.geometryType == "linestring")
              geomType = OpenLayers.Geometry.LineString;
          else if (this.geometryType == "linearring")
              geomType = OpenLayers.Geometry.LinearRing;
          else if (this.geometryType == "multipoint")
              geomType = OpenLayers.Geometry.MultiPoint;
          else if (this.geometryType != "point" && this.geometryType != "polygon")
              return null;
  
          var flatPoints = this.decodeDeltas(encoded, 2);
          var flatPointsLength = flatPoints.length;
  
          var pointGeometries = [];
          for (var i = 0; i + 1 < flatPointsLength;) {
              var y = flatPoints[i++], x = flatPoints[i++];
              pointGeometries.push(new OpenLayers.Geometry.Point(x, y));
          }
  
  
          if (this.geometryType == "point")
              return new OpenLayers.Feature.Vector(
                  pointGeometries[0]
              );
  
          if (this.geometryType == "polygon")
              return new OpenLayers.Feature.Vector(
                  new OpenLayers.Geometry.Polygon([
                      new OpenLayers.Geometry.LinearRing(pointGeometries)
                  ])
              );
  
          return new OpenLayers.Feature.Vector(
              new geomType(pointGeometries)
          );
      }
docs: APIMethod: read
  Deserialize an encoded polyline string and return a vector feature.
  
  Parameters:
  encoded - {String} An encoded polyline string
  
  Returns:
  {<OpenLayers.Feature.Vector>} A vector feature with a linestring.