-
Notifications
You must be signed in to change notification settings - Fork 137
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
Support linestring #92
Conversation
…iz arguments; refine default color and line width handling
e34ce79
to
937eb1a
Compare
937eb1a
to
e40d776
Compare
…iz arguments; refine default color and line width handling
… support-linestring
@ryanbaumann Ready for you to take a first look. Bug mentioned above is actually fixed with a refinement to the color_map function (when I wrote it I assumed match-type would entail non-numeric stops, given numeric color stops and |
New PR for the bug fix on color_map @akacarlyann 👍 . This is amazing. Taking a look now. |
Dropping an example here of what this looks like (Mount Diablo elevation contours styled by width and color based on elevation) from your example notebook @akacarlyann |
Perfect! I knew you'd have something in the wings for this. |
@akacarlyann will target a PR review tomorrow |
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 add the extra label style properties to match the other viz types @akacarlyann and all set!
mapboxgl/templates/linestring.html
Outdated
"text-offset": [0,-1] | ||
}, | ||
"paint": { | ||
"text-halo-color": "white", |
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.
Make text-color, halo-color, halo-width, and text-size adjustable to math other visuals labels. https://github.com/mapbox/mapboxgl-jupyter/blob/master/mapboxgl/templates/circle.html#L38
{% if labelProperty %} | ||
"text-field": "{{ labelProperty }}", | ||
{% endif %} | ||
"text-size" : generateInterpolateExpression('zoom', [[0,8],[22,16]] ), |
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.
Likewise in the vector linestring layer - add style modifiers for text-color, text-size, halo-color, halo-width
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.
Thanks @ryanbaumann ! Added these in 3e9fac4. Looks like I'll need to update ChoroplethViz too in a separate issue.
Nice @akacarlyann! Add the new lable style property options to the Markdown Docs, then 🚢 ! So excited to get this one into python dev's hands. |
@ryanbaumann Added LinestringViz to viz.md in 9bf8311. |
Adds class for LinestringViz with geojson and vector data source support. Line color and width are data-driven styled. Addresses #4, #81.
Still working on: