openlayers/ol3 — pull request #1550 by twpayne (2014-01-20 10:27:37+00:00)
Title: Preserve extra dimensions in closest point calculations

Previously, `getClosestPoint` would always return a 2D coordinate, irrespective of the dimension of the geometry.

This PR extends `getClosestPoint` to preserve higher dimensions. In simple cases these are simply copied from the closest point. For geometries with edges (e.g. line strings and polygons) these are linearly interpolated.