-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drilldown identify #45
Comments
If all of your layers are coming from the same var sources = {
'source1': L.wms.source('...', {identify: false}),
'source2': L.wms.source('...', {identify: false})
};
map.on('click', function(evt) {
var responses = {},
sourceNames = Object.keys(sources);
sourceNames.forEach(function(name) {
var source = sources[name];
source.getFeatureInfo(
evt.containerPoint,
evt.latlng,
source.getIdentifyLayers(),
function(latlng, info) {
responses[name] = info;
updateMap();
}
);
});
function updateMap() {
var html = sourceNames.map(function(name) {
return "<h1>" + name + "</h1>" + (responses[name] || "Loading...");
}).join("");
map.openPopup(html, evt.latlng);
}
}); |
That workaround does the trick. Thanks! 💯 |
How can I customize for each sources a table of attributes for wms that have info_format: application / json |
Is there a solution/suggestion/plugin for drill down identify for displaying results?
I noticed that when there are some WMS layers activated and I click anywhere, one identify task for each layer is executed, but only the last processed is displayed.
Thanks in advance
The text was updated successfully, but these errors were encountered: