openlayers/ol3 — pull request #1536 by elemoine (2014-01-15 10:29:37+00:00)
Title: [vector-api] Add GetFeatureInfo support (WIP)

I'm opening this PR as a proposal for discussion.

This PR suggests adding `getGetFeatureInfoUrl` to `ol.source.ImageWMS` and `ol.source.TileWMS`. This function returns a GetFeatureInfo URL for the WMS source.

It can be used at the application level and we can possibly build higher-level tools on top of it. See the getfeatureinfo example included in this PR.

I've decided against adding a `getFeatureInfo` method to `ol.Map` because it implies that either the lib assumes what info_format (text/plain, application/vnd.ogc.gml, etc.) and protocol (XHR, iframe) to use, or too many configuration parameters to support the various modes users may want to use. (For example, the iframe mode sounds very application-specific to me, and I don't think it should be handled by the lib.)

Feedback is welcome.

Work yet to be done:

- [ ] Add unit tests
- [ ] Add `getGetFeatureInfoUrl` to `ol.source.TileWMS`