-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adjust color/styling of different layers #292
Conversation
also refactor legends a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async review welcome
@@ -54,6 +55,13 @@ | |||
Major Road Network | |||
</ExternalLink>. | |||
</p> | |||
<p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going back to the stand-up this morning, some kind of standardized data catalog where we record license, owner, when we accessed the data, etc would be handy, and we can surface some of this info if it's useful
]; | ||
} | ||
|
||
$map.setPaintProperty("interventions-points", "circle-color", color); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how to change a layer's styling rules dynamically
@@ -35,17 +34,12 @@ export function processInput( | |||
} | |||
|
|||
for (let feature of gj.features) { | |||
schemes.get(feature.properties!.scheme_reference).num_features++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cleaned up these problems in the latest version of the scheme file I've sent around
@@ -21,6 +21,7 @@ | |||
choices={[ | |||
["streets", "Streets"], | |||
["hybrid", "Satellite"], | |||
["dataviz", "Dataviz"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MapTiler has a bunch of basemap styles. This one looks the most neutral to me, showing enough to help people orient, but getting out of the way to let the data on top show clearly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just refactored this multi-row color legend pattern
@@ -52,24 +53,19 @@ export class RouteTool { | |||
id: "route-points", | |||
source, | |||
filter: isPoint, | |||
color: [ | |||
"match", | |||
color: matchValue( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were a few places where we were using maplibre case or match manually. All using this one helper method now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were too many functions added to types.ts
. Ideally these could be methods on the Schema type, but since it's just a wrapper around a string, haven't sorted out exactly how to do that yet
Notably, let the user choose to color interventions by ATF funding round. As we get more scheme-level data (like construction/completion status), this could become more useful. I've adjusted the basemap style and most colors using my best judgment and some of the brand guidelines, but this is still very much in need of design help.
Most of the PR is refactoring, I'll comment inline