[Maps] Fix layer-flash when changing style#80948
[Maps] Fix layer-flash when changing style#80948thomasneirynck merged 2 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
💚 Build SucceededMetrics [docs]async chunks size
History
To update your PR or re-run it, just comment with: |
| if (mbLayer && mbLayer['source-layer'] !== tiledSourceMeta.layerName) { | ||
| // The mapbox type in the spec is specified with `source-layer` | ||
| // but the programmable JS-object uses camelcase `sourceLayer` | ||
| // @ts-expect-error |
There was a problem hiding this comment.
|
@nreese looking at this deeper, the uses in The bug here is that It's possible Will investigate. |
|
This mismatch is actually by design: This was flagged as a breaking-change: mapbox/mapbox-gl-js#6584 I am not sure where this leaves us with filing an upstream bug-fix for https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mapbox-gl/index.d.ts#L1891. Imho, that one correctly types the JSON mapbox-style spec, not the mapbox-gl-js API. My suggestion would be to leave as-is, as usage is not incorrect. Rather, it is an undocumented part of the mapbox-gl-js api. Not sure if it's worth rewriting this Maps-code to not use the JS-object, and rather retrieve it via the style-sheet. |
nreese
left a comment
There was a problem hiding this comment.
LGTM. Thanks for checking into the other uses and about the typing errors.
…lout-for-warm-and-cold-tier * 'master' of github.com:elastic/kibana: (126 commits) Add cumulative sum expression function (elastic#80129) [APM] Fix link to trace (elastic#80993) Provide url rewritten in onPreRouting interceptor (elastic#80810) limit renovate to npm packages Fix bug in logs UI link (elastic#80943) [Monitoring] Fix bug with setup mode appearing on pages it shouldn't (elastic#80343) [Security Solution][Detection Engine] Fixes false positives caused by empty records in threat list docs test (elastic#81080) Fixed alerts ui test timeout issue, related to the multiple server calls for delete all alerts, by reducing the number of alerts to the two and increasing retry timeout. (elastic#81067) [APM] Fix service map highlighted edge on node select (elastic#80791) Fix typo in toast, slight copy adjustment. (elastic#80843) [Security Solution] reduce optimizer limits (elastic#80997) [maps] 7.10 documentation updates (elastic#79917) [Workplace Search] Fix Group Prioritization route and clean up design (elastic#80903) [Enterprise Search] Added reusable HiddenText component to Credentials (elastic#80033) Upgrade EUI to v29.5.0 (elastic#80753) [Maps] Fix layer-flash when changing style (elastic#80948) [Security Solution] [Detections] Disable edit button when user does not have actions privileges w/ rule + actions (elastic#80220) [Enterprise Search] Handle loading state on Credentials page (elastic#80035) [Monitoring] Fix cluster listing page in how it handles global state (elastic#78979) ...

Summary
Closes #80946.
This was introduces by #78490. This was an oversight on my part. While the style-spec separates compound property-names with a
-, the programmable object in JS in mapbox-gl is camel-cased.Checklist
Delete any items that are not applicable to this PR.
For maintainers