Fix issue with license not getting obtained & passed to server for legacy maps #62883
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #62856. The x-pack TileMap plugin exists primarily as a license-check. Users with a license that permits usage of x-pack also get map tiles beyond zoom level 10 for legacy maps (Coordinate, Region and Vega). This license check is initially triggered in the plugin via
uiExports > visTypeEnhancersand then executes an update toservice_settingsthrough angular.The issue appears to be with the usage of
visTypeEnhancersthough it's not immediately clear where that issue lies. I could investigate this further but a couple facts:visTypeEnhancers. We may want to create a follow-up issue to just remove that codeThe simplest fix is to use
hacksrather thanvisTypeEnhancers, which works as expected:Basic license showing calls w/ license injected:
OSS show calls w/o license injected:
It's not entirely clear why one would use
hacksvs.visTypeEnhancersbut this use case appears to fit the general "hack guidelines" and I don't see the point of leveraging a separate type for this single, simple use case. With that said, I'm definitely open to pushback here.I also noticed an issue which can also be seen on master where the map appears blank on OSS past zoom level 10. This may have been resolved by #60942 since I didn't see the same behavior there. If not, we may want to create a separate issue for it.