VEuPathDB / web-monorepo

A monorepo that contains all frontend code for VEuPathDB websites
Apache License 2.0
2 stars 0 forks source link

Map: Refactor: Introduce MapType front end plugin #106

Closed dmfalke closed 1 year ago

dmfalke commented 1 year ago

In the future, we will have non-marker map types. When that time comes, we will want to move marker-based logic out of MapAnalysisImpl, since not all map types will have markers.

Instead, we should introduce a MapType plugin:

d-callan commented 1 year ago

to add a bit more detail to this, bubbles will have two parts to their legend. the first will indicate size and likely be a set of concentric circles, the second will indicate color and at least for whats been discussed so far will require a gradient legend.

d-callan commented 1 year ago

see https://github.com/VEuPathDB/web-monorepo/issues/249

dmfalke commented 1 year ago

I propose we introduce MapTypePlugin, which will include a component to render the configuration panel, and a component to render a "map layer" (which will include a legend, markers, floating vizs, etc).

This approach will make it possible to have non-marker map types (such as animation, time-based view, etc).

The map itself would continue to be rendered independently.

@bobular I would love you feedback on this proposal.

dmfalke commented 1 year ago

I'm going to rename this issue and move it back to "TODO". I also don't think it's needed for NIAID QO

d-callan commented 1 year ago

Just thinking if we want to be really flexible and future proof, then rendering the base map itself might be the purview of the 'map type'.

dmfalke commented 1 year ago

Just thinking if we want to be really flexible and future proof, then rendering the base map itself might be the purview of the 'map type'.

I had a similar thought. I'm not opposed to that. Can you think of use cases? Maybe if a map type wants to use a different base layer?

d-callan commented 1 year ago

I was thinking of choropleth and cartograms, etc

dmfalke commented 1 year ago

Cool, makes sense. I'm going to leave this here for future reference: https://leafletjs.com/examples/choropleth/

bobular commented 1 year ago

Even though this isn't urgent any more I like the idea of future proofing. Dave's proposal looks good!

Choropleths still go on top of a regular map, so I don't think the base layers need to be part of the plugin scheme.

dmfalke commented 1 year ago

Closed by #399