GetFeatureInfo Url
So In my setup I have a GeoServer setup to provide WMS.
When I provide my source I generally want to source the cached tiles using the GeoWebCache url for GeoServer (eg. http://myserver.com/geoserver/gwc/service/wms)
However, GeoServer does not provide GetFeatureInfo capability at that url. Instead you have to use the standard wms url (which is not cached).
So could we add a parameter to the GetFeatureInfo to provide an optional url which the GetFeatureInfo would use rather than the base source url?
Thanks.
I think this would be useful as well, have you found a solution to this yet, @KroniK907?
It could be achieved using custom implementation of getFeatureInfo function:
L.WMS.Source.MySource = L.WMS.Source.extend({
'getFeatureInfo': function (point, latlng, layers, callback) {
// It can be passed somehow, using options object, for example
var getFeatureInfoUrl = 'http://....';
var params = this.getFeatureInfoParams(point, layers),
url = getFeatureInfoUrl + L.Util.getParamString(params, getFeatureInfoUrl);
this.showWaiting();
this.ajax(url, done);
function done(result) {
this.hideWaiting();
var text = this.parseFeatureInfo(result, url);
callback.call(this, latlng, text);
}
}
});