openlayers/ol3 — pull request #215 by twpayne (2013-02-19 16:15:31+00:00)
Title: ScaleLine control

This PR adds a ScaleLine control.

It calculates the point scale directly if possible (EPSG:3857, EPSG:4326), otherwise it uses a numerical approximation by measuring the size of the center pixel on the WGS84 ellipsoid.

It supports metric units, imperial units, and degrees. Currently only one scale line is displayed. Displaying two scale lines (one for metric, one for imperial) will be in a separate PR.