title: OpenLayers 3 - getClosesPoint() of a given feature
body: <p>I viewed <a href="http://openlayers.org/en/latest/apidoc/ol.geom.Point.html#getClosestPoint" rel="nofollow noreferrer">this documentation</a> and am trying to get the closest feature to a given feature like this: </p>
  
  <pre><code>var foo = pretendLocation.getGeometry();
  console.log(getClosestPoint(foo));
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>console.log(pretendLocation.getClosestPoint());
  </code></pre>
  
  <p><code>pretendLocation</code> is a feature I created like this, </p>
  
  <pre><code>var pretendLocation = new ol.Feature({
              geometry: new ol.geom.Point(ol.proj.transform([-121, 37], 'EPSG:4326', 'EPSG:3857'))
          });
  </code></pre>
  
  <p>Am I using <code>getClosestPoint()</code> incorrectly? What function do I use to get the closest feature to a given feature? I searched other posts but can not find a solution. I am getting console errors from both ways - getClosestPoint is not defined, as well as a cannot read property of 0 error.</p>