-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] show vector tile labels on top #69444
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
The thing with labels on top is that once you see them, you can't Still, in my experience, there are users that still want to have the option to have them below their business data, or even not having labels at all. I can imagine the second being outside the scope of this PR, but I wonder if the first can be doable as a basemap layer setting. |
This option can be made configurable if that is desired. |
@elasticmachine merge upstream |
@jsanz @thomasneirynck I have updated this PR and its ready for review. Changes:
|
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
@elasticmachine merge upstream |
|
Is there a way to tell symbol labels and linestring labels apart just by looking at the layer style? When the labels are sorted, there is not any context about which mapbox layers do what. We can isolate labeling layers but I am not sure we can isolate the difference between symbol labels and linestring labels. |
That does help. Is this a distinction we want to make? |
Not really sure. If I understand correctly, @nyurik comment was more in line of having just the place names on the top, so it's not only the linestrings but also other layers like points of interest, waterway names, etc. that would be below. Looking at the layer list, I understand we would want to push up just the symbol layers starting with I've checked the three styles and they all have this group of lists on the top, so the pattern is consistent for EMS basemaps. |
that could be an additional improvement, but I would keep this PR to the basics: pull labels to top from the EMS-baselayer. This feature ("pulling labels to the top") can always grow when we start getting real-world feedback. There's a lot of outstanding improvements wrt. "pulling labels to top":
^ I don't think this PR needs to address nuances like that until we get real-world use. |
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.
Only some nits.
Great scope of the functionality for a first pass. It unblocks APM, and puts the core in place to grow this if so desired.
Thank you so much for fixing technical debt wrt layer-ordering. Maps now can reliably order any number of layer-reorderings. e.g. consider a client of the MapsEmbeddable replacing the layer-list with an arbitrary re-ordering. This is now functional.
x-pack/plugins/maps/public/connected_components/layer_panel/layer_settings/layer_settings.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/connected_components/map/mb/sort_layers.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/connected_components/layer_panel/layer_settings/layer_settings.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/connected_components/map/mb/sort_layers.test.ts
Show resolved
Hide resolved
x-pack/plugins/maps/public/connected_components/map/mb/sort_layers.test.ts
Show resolved
Hide resolved
layerClass: LAYER_CLASS, | ||
beneathMbLayerId?: string | ||
) { | ||
const mbLayers = mbMap.getStyle().layers!; // check ordering against mapbox to account for any upstream moves. |
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.
will !
force the creation of an empty mbLayer array?
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.
nice!
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* [Maps] show vector tile labels on top * experiment with new sort algorithm * clean up * remove old sort method * add unit test for sort layer * tslint * clean up * make labelsOnTop configurable * tslint * more tslint * add another test case for single layer move * clarify should messages * fix assert not null operators * review feedback * update snapshot Co-authored-by: Elastic Machine <[email protected]>
* [Maps] show vector tile labels on top * experiment with new sort algorithm * clean up * remove old sort method * add unit test for sort layer * tslint * clean up * make labelsOnTop configurable * tslint * more tslint * add another test case for single layer move * clarify should messages * fix assert not null operators * review feedback * update snapshot Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* master: (32 commits) [Ingest Pipelines] Load from json (elastic#70297) [Rum Dashbaord] Rum selected service view (elastic#70579) [Uptime] Prevent duplicate requests on load for index status (elastic#70585) [ML] Changing shared module setup function parameters (elastic#70589) [Ingest Manager] Add ability to sort to agent configs and package configs (elastic#70676) [Alerting] document requirements for developing new action types (elastic#69164) Fixed adding an extra space character on selecting alert variable in action text fields (elastic#70028) [Maps] show vector tile labels on top (elastic#69444) chore(NA): upgrade to lodash@4 (elastic#69868) Add Snapshot Restore README with quick-testing steps. (elastic#70494) [EPM] Use higher priority than default templates (elastic#70640) [Maps] Fix cannot select Solid fill-color when removing fields (elastic#70621) [kbn/optimizer] only build specified themes (elastic#70389) Fix saved query modal overlay (elastic#68826) Update component templates list to render empty prompt inside of content container. Show detail panel when deep-linked, even if there are no component templates. (elastic#70633) [Security Solution] Renames the `Investigate in Resolver` Timeline action (elastic#70634) fix 400 error on initial signals search (elastic#70618) [Maps] fix unable to edit heatmap metric (elastic#70606) Update network idle timeout (elastic#70629) [APM] Disable flaky useFetcher test (elastic#70638) ...
* master: (199 commits) [Telemetry] Add documentation about Application Usage (elastic#70624) [Ingest Manager] Improve agent unenrollment with unenroll action (elastic#70031) Handle timeouts on creating templates (elastic#70635) [Lens] Add ability to set colors for y-axis series (elastic#70311) [Uptime] Use elastic charts donut (elastic#70364) [Ingest Manager] Update registry URL to point to snapshot registry (elastic#70687) [Composable template] Create / Edit wizard (elastic#70220) [APM] Optimize services overview (elastic#69648) [Ingest Pipelines] Load from json (elastic#70297) [Rum Dashbaord] Rum selected service view (elastic#70579) [Uptime] Prevent duplicate requests on load for index status (elastic#70585) [ML] Changing shared module setup function parameters (elastic#70589) [Ingest Manager] Add ability to sort to agent configs and package configs (elastic#70676) [Alerting] document requirements for developing new action types (elastic#69164) Fixed adding an extra space character on selecting alert variable in action text fields (elastic#70028) [Maps] show vector tile labels on top (elastic#69444) chore(NA): upgrade to lodash@4 (elastic#69868) Add Snapshot Restore README with quick-testing steps. (elastic#70494) [EPM] Use higher priority than default templates (elastic#70640) [Maps] Fix cannot select Solid fill-color when removing fields (elastic#70621) ...
Fixes #35035
This PR adds
labelsOnTop
setting toLayerDescriptor
. When true, label mapbox layers will be moved to the top of the map.