Closed mroswell closed 6 months ago
Thanks for the feedback. I generally try to avoid hover interactions because they won't work on touch screens. I have a separate issue open (#10) to customize popups.
I think you can just add a separate click event. I did that here. https://scorecard.njlcv.org/ (The organization hasn't maintained the legislator photo urls). Look for:
function onEachFeature(feature, layer) {
layer.on({
mouseover: highlightFeature,
mouseout: resetHighlight,
click: mapMemberDetailClick
});
}
Here:
https://github.com/mroswell/njlcv-scorecard/blob/master/js/app-2021-senate-map-green.js
I prefer the data inspection method used on mapshaper.org.
Might be nice to have a plugin metadata option to enable these features.