I need to show WMS layer information and if there are some marker or other layers at the same coordinate, it should show both data of WMS layer and marker information. But when marker covers wms layer, click would not trigger getfeatureinfo to get WMS data. Is there any method to show both?
My marker:
L.marker([lat,lng], { icon: icons }).bindPopup(
'<table><thead><tr><th>test</th></tr></thead ><tbody align="center"><tr><td>context</td></tr>'
).openPopup();
I write a sample on codepen: https://codepen.io/jerry820428/pen/zYKRERE
I want to trigger map.on('click') event when click the marker, that means both alert and popup would show on web.
interactive: false
when you create it. – TomazicM Dec 30 '20 at 9:07map.on('click', ...)
event, since it gets fired always, regardless of any other event handlers, tied to various layer elements. – TomazicM Dec 30 '20 at 17:32click
event on map. See solution below. – TomazicM Dec 31 '20 at 9:34