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

Treatments map #1678

Merged
merged 7 commits into from
Aug 20, 2024
Merged

Treatments map #1678

merged 7 commits into from
Aug 20, 2024

Conversation

pflopez
Copy link
Contributor

@pflopez pflopez commented Aug 15, 2024

This pr adds the maplibre map on treatments and project areas, showing stands.
Additionally, adds some stubs/temporary components to interact with the map

TODO, not included on this pr:

  • Loading the project areas geojson on the map (similar to scenario results)
  • Assign prescriptions
  • All UI work for this screens

Note, might need to do npm install --legacy-peer-deps to avoid errors locally. Hopefully using this flag would be temporary as there is already a change to fix this on its way Esri/esri-leaflet-vector#219 (comment)

Additionally the map libre libraries are not included on the main bundle

Screen Shot 2024-08-16 at 11 23 49 Screen Shot 2024-08-16 at 11 24 14

@pflopez pflopez force-pushed the treatments-map branch 8 times, most recently from 941cead to 8753c03 Compare August 16, 2024 16:38
@pflopez pflopez marked this pull request as ready for review August 16, 2024 18:20
@@ -0,0 +1,5 @@
<div *ngIf="prescriptions$ | async; let prescriptions" class="prescriptions">
<button *ngFor="let action of prescriptions.SINGLE | keyvalue" [value]="">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to leave value blank here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's a placeholder, im not doing assignments on this PR, to limit the scope of changes.

type="line"
[source]="sourceName"
[paint]="{
'line-color': '#007dff',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it's worth the effort yet, but if there's a way to store these styles as constants somewhere, maybe that would help us as this grows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i think that's probably the next step once we have more layers

mapLibreMap!: MapLibreMap;
readonly key = environment.stadiamaps_key;

// ew, not sure if I want to do prop drilling here or set up something else (provider?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is okay for now, but maybe we can talk about what a provider could look like, especially if we're talking about where and how we're storing these and presenting them to the frontend?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure! I also think its ok now, and i don't want to prematurely optimize until we have this a little bit more developed.
A provider here can be something similar to what we have for the stands (SelectedStandsState).

Will update the comment though that one was mostly for me :D

Copy link
Contributor

@lastminutediorama lastminutediorama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some general questions, but nothing that needs to be addressed. And since you mentioned it, I didn't have any better ideas for naming -- I think the components, functions, and vars are all self-explanatory and don't risk being confused with anything else.

@pflopez pflopez merged commit a54aafa into main Aug 20, 2024
6 checks passed
@pflopez pflopez deleted the treatments-map branch August 20, 2024 18:58
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

Successfully merging this pull request may close these issues.

3 participants