openlayers/ol3 — pull request #923 by tschaub (2013-08-26 23:24:06+00:00)
Title: Allow icons to be used as markers and provide nice overlay handling

A few things should change to allow people to use icons as point symbolizers and display content in overlays.

- [x] Export `ol.geom.Geometry.prototype.getCoordinates`. Currently, we really only make it easy to position overlays at the mouse position (with `overlay.setPosition(evt.getCoordinate())`). For point symbolizers, you want to position an overlay relative to the geometry coordinates, and these are likely different than the mouse position. Since the `getCoordinates` method on geometries returns `ol.Coordinate` or arrays of the same, it feels like a natural and safe method to expose.
- [ ] Icon symbolizers should accept `xOffset` and `yOffset` in pixels (so icons don't have to be centered on point geometries).
- [ ] Overlays should have a `panIntoView` method or similar. This should check the overlay's rendered layout and make an effort to include it in the map viewport.

Work in progress. Open for comments.