openlayers/ol3 — pull request #2087 by tschaub (2014-05-20 15:44:43+00:00)
Title: Add method for retrieving features by id

This adds a feature id index to the vector source. The `getFeatureById` method allows retrieval of features by id.

Note that the index does not differentiate string and numeric identifiers. So `source.get(2)` and `source.get('2')` both would return a feature with an id of `2` or `'2'`. This limitation should not affect applications that consistently use *either* strings or numbers as feature identifiers.