title: Using encoded polylines in OpenLayers 3
body: <p>I am having trouble when trying to use encoded polylines in OpenLayers 3.  I have an external source providing the encoded strings, but when I try to convert them into a feature and add them to a vector source, I get the following error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'ua' of undefined
  </code></pre>
  
  <p>Here is the current code I am using:</p>
  
  <pre><code>vectorSource = new ol.source.Vector();
  var layers = [
      new ol.layer.Tile({
          name: "SKL Tile Server",
          source: new ol.source.OSM({
              url: "https://placeholder/osm/{z}/{x}/{y}.png",
              crossOrigin: null
          })
      }),
      new ol.layer.Vector({
          name: "polylines",
          source: vectorSource
      })
  ];
  
  map = new ol.Map({
      layers: layers,
      target: 'report_map',
      view: new ol.View({
          center: ol.proj.transform(
              [-118.014670, 45.35724], 'EPSG:4326', 'EPSG:900913'),
          zoom: 10
      })
  })
  
  var addPolylineToMap = function (encoded_line, line_style) {
  
      var line = new ol.format.Polyline().readGeometry({
          source: encoded_line,
          options: {
              dataProjection: ol.proj.get('EPSG:4326'),
              featureProjection: ol.proj.get('EPSG:900913')
          }
      });
      line.setStyle(line_style);
      vectorSource.addFeature(new ol.Feature(line));
      return line;
  };
  </code></pre>
  
  <p>Admittedly, I am quite new to OpenLayers 3--but I have searched extensively and can't seem to find any examples of using encoded polylines in OpenLayers 3.</p>