You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, needed same as you and came with this solution: https://github.com/Nicolasribot/leaflet.wms
It adds info_format, feature_count and exceptions as config options at the L.WMS.source level and handles GetFeatureInfo URL parameters based on these parameters.
I usually just add the parameters to the source - they get sent with every image request, but it usually doesn't hurt anything. It would certainly make sense to mark certain variables separately as in @Nicolasribot's fork, or add an extra info_params option that's mixed with the existing options in getFeatureInfoParams.
How could I add extra parameters to the getFeatureInfo request
var source = L.WMS.source(
"http://maps.nationalparks.gov.uk/geoserver/wms",
{
"format": "image/png",
"transparent": "true",
"identify": false
}
)
var planapps = source.getLayer('dartmoor:dnpa_planapps');
planapps.addTo(map);
L.WMS.Source.extend({
'getFeatureInfoParams': function(point,layers){
info_format': 'text/html',
feature_count: 10,
propertyName: 'appcode,url'
}
});
Great plugin by the way.
The text was updated successfully, but these errors were encountered: