change map details button bindness to support multiple legends (weird leaflet behaviour)