earthrise-media / vacs-map

Exploring VACS project data
1 stars 0 forks source link

Add dot hover for grid overlay #57

Closed mwbernard closed 10 months ago

mwbernard commented 10 months ago

Closes #29

This adds basic hover to the grid overlay elements, updating their feature states and also tracking the hovered grid id for use throughout the app. It also registers the hovered elements in the distribution plot and shows them graphically. The styling is not what we'll want, but I'm going to leave that for the distribution plot update that's on its way.

@kelsey-taylor not sure what you had in mind for the hovered styling on the map, so I kept this pretty basic for now, just turning down opacity on hover to make sure it was working. I was also wondering if we'd like the hovered element to be the entire grid cell rather than just the dot we're showing - that way there would more consistently be a hovered element when moving the mouse over the dots. I feel like there are a a bunch of options for how to do that but lmk if you agree or not!

mwbernard commented 10 months ago

Small conflict between this and #59 - so don't want to touch the distribution plots here anymore. I think lets settle on a map interaction for now, and then leave the distribution plot effects for #59 to clean up.

mwbernard commented 10 months ago

@ebrelsford wondering if you have thoughts on the question above ^ about hovering over a dot itself vs. hovering over a grid cell, and how we might best implement that?

ebrelsford commented 10 months ago

We'd have to create a file of the actual grid cells, right now we just have the center points of them. That file is relatively large so ideally we would assign the same ids to the grid cells and upload the file as a tileset to their Mapbox account, then add the tileset as a layer that's hidden by default.

mwbernard commented 10 months ago

@kelsey-taylor Ok think we'll refrain from the above^ for now, I just updated some styling if you'd like to have a quick look. Tooltips coming later