openlayers/ol3 — pull request #814 by tschaub (2013-06-24 16:28:13+00:00)
Title: Vector rendering broken for projections which do not specify a name for units

The changes made in #799 (https://github.com/ahocevar/ol3/commit/5cc3e189eb206916aef0717d46fe19dac2ce04fc#L0R337) break vector rendering when using Proj4js projections that do not specify a name for their units, but rather a conversion factor to meters.

```javascript
var gridResolution = Math.max(resolution,
ol.renderer.canvas.MIN_RESOLUTION /
ol.METERS_PER_UNIT[projection.getUnits()]);
```

As far as I can see, many of the projections on spatialreference.org (for example [NAD27 / Louisiana South](http://spatialreference.org/ref/epsg/26782/proj4js/)) that use feet are defined using `+to_meter=0.3048006096012192` rather than `+units=ft`. This means that the call to `projection.getUnits()` returns `null`.

![projection-units](https://f.cloud.github.com/assets/134805/696353/4ae44928-dce4-11e2-8137-08a00834f176.png)

Perhaps we could call `projection.getMetersPerUnit()` instead and modify it to get the conversion factor from Proj4js when the unit name is not available?