[Maps] Add styling and tooltip support to mapbox mvt vector tile sources#64488
[Maps] Add styling and tooltip support to mapbox mvt vector tile sources#64488thomasneirynck merged 120 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
elizabetdev
left a comment
There was a problem hiding this comment.
Hi @thomasneirynck,
I created a PR with a few design improvements thomasneirynck#17.
This way we don't need to use too much space:
- Changed all forms to compressed
- Some of the forms are now using a column layout
- Moved the help text to tooltips.
Let me know what you think.
There was a problem hiding this comment.
Thank you so much for all the work on this and the final polish! This adds some great foundational pieces that pave the way for a whole new phase in how Maps will look and feel. 🌞
Functionally works well when tested locally with the understanding that it currently requires a good understanding of the shape of your data source. lgtm w/ green CI!
- code review
- tested locally in chrome
|
Disregard, getValueSuggestions needs access to values which are not available. |
|
Thx @miukimiu , looks great. Can you take 2nd look? |
nreese
left a comment
There was a problem hiding this comment.
Nice, this is really powerful for displaying 3rd party vector tiles.
LGTM
code review, tested in chrome
lukeelmers
left a comment
There was a problem hiding this comment.
App Arch code change LGTM!
@miukimiu yes, I just pushed this up. thx! |
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
…ces (elastic#64488) * tmp commit * rename * more boilerpalte * more boiler * more boilerpalte * typing * fix import * boilerplate * more boiler * enable custom palettes * fix label text and orientation * fix merge errors * remove dupe import * stash commit * tmp commit * debounce settings * return null * slight rearrangement * tooltip guard * minor tweaks * feedback * ts fixes * ts fixes * more ts fixes * ts fixes * jest test * fix typo * spacing * fix typing * add unit test * add more tests * add snapshot test * add snapshot * add field editor snapshot test * fix snapshot * add snapshot * remove unused import * test stub for mvt layer fix optional param more checks * add snapshot test more unit tests more unit tests ts fixes * add data syncing unit test * fix autorefactor * fix merge and replace snapshots * field editor changes * field editor changes * ts fixes * update snapshots * fix things * fix names * fix tooltip * add more error handling * improve copy * styling changes * style option box a little better * ts fixes * fix console error * remove mbProperties from interface * remove unused method * remove cruft * rename for consistency * remove unused param * feedback * feedback * ensure properties are always present * handle possible null values * feedback * typo * update SIEM * feedback * remove cruft * remove unused translations * feedback * improve readability * fix brittle test * fix snapshot after master merge * remove unused method * feedback * revert some feedback * remove micro-optimization * initialize in constructor * simplify wording * add snapshot * naming * add clarifying comment * remove unused import * sanitize tooltips * remove cruft * feedback * fix typo * remove export * Design fixes * clean up supportsAutoDomain * remove patch.txt * cleanup * clean-up * Merge in styling changes * Tweak message format * fix broken import Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: miukimiu <elizabet.oliveira@elastic.co> Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
* master: Update known-plugins.asciidoc (elastic#69370) [ML] Anomaly Explorer swim lane pagination (elastic#70063) [Ingest Manager] Update asset paths to use _ instead of - (elastic#70320) Fix discover, tsvb and Lens chart theming issues (elastic#69695) Allow Saved Object type mappings to set a field's `doc_values` property (elastic#70433) [S&R] Support data streams (elastic#68078) [Maps] Add styling and tooltip support to mapbox mvt vector tile sources (elastic#64488) redirect to default app if hash can not be forwarded (elastic#70417) [APM] Don't fetch dynamic index pattern in setupRequest (elastic#70308) [Security_Solution][Endpoint] Leveraging msearch and ancestry array for resolver (elastic#70134) Update docs for api authentication usage (elastic#66819) chore(NA): disable alerts_detection_rules cypress suites (elastic#70577) add getVisibleTypes API to SO type registry (elastic#70559)




Closes #46409
Adds tooltip-support and dynamic styling for .mvt vector tiles sources.
Opting to do his together since:
This PR adds UX-forms to:
Since all feature-data is contained in the tile and cannot be determined by inspecting the GeoJson or doing a backend AJAX call to a service, this PR introduces some light refactors in the existing code:
_assignFeatureIdsto forcibly assign one if it is missing). This id is now made optional in the corresponding layer and source APIs for tooltip-identificationReviewer notes
The best way to test is to look at a TileJson (if your vector tile service has one).
Some examples from https://tiles.maps.elastic.co/data/v3.json
poilayername(String),name_en(String),class(String),agg_stop(Number)transportationlayerclass(String),brunnel(String),oneway(Number),layer(Number),level(Number),indoor(Number)Note that the EMS tile-service is incredibly sparse in its populated fields. So not every property will be usable at any given scale.
To test
xpack.maps.enableVectorTiles: truein kibana.dev.ymlVector Tile Layerlayer. with the following configurations (check https://tiles.maps.elastic.co/data/v3.json for more examples).https://tiles.maps.elastic.co/data/v3/{z}/{x}/{y}.pbf?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=8.0.0&license={PLUGIN_LICENSE_KEY}transportation4to14class, typestringname, typestringhttps://tiles.maps.elastic.co/data/v3/{z}/{x}/{y}.pbf?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=8.0.0&license={PLUGIN_LICENSE_KEY}poi10to 14class, typestringhttps://tiles.maps.elastic.co/data/v3/{z}/{x}/{y}.pbf?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=8.0.0&license={PLUGIN_LICENSE_KEY}water0to 14Bugs todo