Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map: Refactor: Introduce MapType front end plugin #106

Closed
dmfalke opened this issue Apr 24, 2023 · 10 comments
Closed

Map: Refactor: Introduce MapType front end plugin #106

dmfalke opened this issue Apr 24, 2023 · 10 comments
Assignees

Comments

@dmfalke
Copy link
Member

dmfalke commented Apr 24, 2023

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:

  • Each MapType defines a plugin to render a "config panel" and a "map type layer"
  • The "config panel" is what appears in the left-hand menu
  • The "map type layer" is rendered on top of the map, and includes markers, legend, floater, etc
  • The MapAnalysis component will simply render a <ActiveMapTypeLayer {...activeMapTypeConfig}/>, replacing all of the existing marker and legend logic
  • It's likely that all of the marker-based map types will share a MarkerMapTypeLayer component
@moontrip moontrip self-assigned this May 2, 2023
@d-callan
Copy link
Member

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
Copy link
Member

see #249

@dmfalke
Copy link
Member Author

dmfalke commented May 26, 2023

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 dmfalke assigned jernestmyers and unassigned moontrip May 26, 2023
@dmfalke
Copy link
Member Author

dmfalke commented May 26, 2023

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

@dmfalke dmfalke changed the title Standalone map: Add marker specific legend Map: Introduce MapType front end plugin May 26, 2023
@d-callan
Copy link
Member

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
Copy link
Member Author

dmfalke commented May 26, 2023

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
Copy link
Member

I was thinking of choropleth and cartograms, etc

@dmfalke
Copy link
Member Author

dmfalke commented May 27, 2023

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

@bobular
Copy link
Member

bobular commented May 31, 2023

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 dmfalke self-assigned this Aug 11, 2023
@aurreco-uga aurreco-uga changed the title Map: Introduce MapType front end plugin Map: Refactor: Introduce MapType front end plugin Oct 13, 2023
@dmfalke
Copy link
Member Author

dmfalke commented Nov 7, 2023

Closed by #399

@dmfalke dmfalke closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants