[Maps] [Embeddables] Provide ability to retrieve number of features for a given layer #49236
Labels
[Deprecated-Use Team:Presentation]Team:Geo
Former Team Label for Geo Team. Now use Team:Presentation
discuss
Feature:Embedding
Embedding content via iFrame
Feature request
This feature request is for providing the ability to retrieve the number of features for a given layer from a Map Embeddable. Similar to #43695, which requests the ability to know when a layer is loading, this would allow those working with Map Embeddables additional flexibility in providing user-facing features around layer state.
Use case
The impetus for this came from #47706, which aims to add targeted documentation for how to configure line data on the SIEM Pewpew Map. Knowing whether or not the line layers had any features would allow us to programmatically display an additional documentation/configuration UI element instead of having to show it at all times.
Implementation
Similar to the custom tooltip implementation (#46150), an
onLayerStateChange
callback could be provided to the MapEmbeddableFactory. E.g.Note: I included the fitToData/hideLayer actions as well, but perhaps these are better fit to be called via the Embeddables Action API?
cc @nreese @stacey-gammon
The text was updated successfully, but these errors were encountered: