-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Maps] Auto generate legends and styles from mvt data #94811
[Maps] Auto generate legends and styles from mvt data #94811
Conversation
@elasticmachine merge upstream |
be8768a
to
977b9e2
Compare
x-pack/plugins/maps/common/descriptor_types/layer_descriptor_types.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/tiled_vector_layer/tiled_vector_layer.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/tiled_vector_layer/tiled_vector_layer.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/tiled_vector_layer/tiled_vector_layer.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/styles/vector/properties/dynamic_color_property.test.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM getting style meta for tiles is a huge achievement. Thanks for making all the changes to handle both categorical and ordinal styles and making the code changes clean.
Just one minor nit about where to put some if logic that you can take or leave.
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Closes #76549, #92672 (for ES-data)
Generate correct legends for doc-data:
Generate correct style-rules for agg data:
This PR also removes the edge-case where the "get-from-data-switch" could be disabled. This only arose (before this PR) when mvt-backed ES-data (such as avg, min, max-aggs) was used for by-value styling. The style-meta could be retrieved only by a back-end call to ES for extended stats. This split is no longer needed, since the tiles contain the metadata as well. This client-side determination can now be made as well.
ie. the toggle now works for all ES-data, regardless of scaling-type
e.g.: using extended-stats:
e.g.: using tile-meta
This adds tile metadata inside the mvt so the map can correctly bootstrap style and legend information.
on the server-side:
Add a metadata-feature to the mvt responses containing information about:
on the client-side:
Other improvement can be extracted to other PRs: