Add example, and use getFeatures in other examples

The new dedicated getfeatureinfo example shows how to combine
feature info from a WMS and a vector layer. The other examples
that previously used getFeatureInfo from vector layers now use
the more appropriate getFeatures.
This commit is contained in:
ahocevar
2013-07-31 17:47:16 +02:00
parent 4dd148a731
commit 5acff857e7
6 changed files with 146 additions and 31 deletions

View File

@@ -87,7 +87,7 @@ ol.source.wms.getFeatureInfo = function(url, options, success, opt_error) {
.replace(/LAYERS=([^&]+)/, 'LAYERS=$1&QUERY_LAYERS=$1');
if (options.method == ol.source.WMSGetFeatureInfoMethod.IFRAME) {
goog.global.setTimeout(function() {
success('<iframe seamless src="' + url + '"></iframe');
success('<iframe seamless src="' + url + '"></iframe>');
}, 0);
} else if (options.method == ol.source.WMSGetFeatureInfoMethod.XHR_GET) {
goog.net.XhrIo.send(url, function(event) {