openlayers/ol3 — pull request #2040 by elemoine (2014-05-05 08:05:28+00:00)
Title: Ability to use sprites as Icon src

This is a PR for #2021 Ability to use sprites as Icon src.

This PR adds an "origin" option to ol.style.Icon. This option defines the top-left corner of the sub-rectangle to use as the actual icon image. Combined with the "size" option it allows to use any sub-rectangle of an image as the icon image.

Here's a fiddle (originally from @nedelenbos-trimm) which demonstrates this feature: http://jsfiddle.net/x2y67/2/.

Please review.