mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Maps] allow embeddables to hide filtering controls (#43703)
* [Maps] allow embeddables to hide filtering controls * fix typos in embeddable docs
This commit is contained in:
parent
5071c74945
commit
0d4e979778
2 changed files with 28 additions and 1 deletions
|
@ -137,7 +137,7 @@ export class MapEmbeddable extends Embeddable {
|
|||
render(
|
||||
<Provider store={this._store}>
|
||||
<I18nContext>
|
||||
<GisMap addFilters={this.addFilters}/>
|
||||
<GisMap addFilters={this.input.hideFilterActions ? null : this.addFilters}/>
|
||||
</I18nContext>
|
||||
</Provider>,
|
||||
domNode
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
### MapEmbeddableFactory
|
||||
Use to load map saved object and create MapEmbeddable instance.
|
||||
|
||||
### MapEmbeddable
|
||||
Renders map saved object. State comes from saved object.
|
||||
|
||||
#### Customizable parameters
|
||||
- **hideFilterActions:** (Boolean) Set to true to hide all filtering controls.
|
||||
- **isLayerTOCOpen:** (Boolean) Set to false to render map with legend in collapsed state.
|
||||
- **openTOCDetails:** (Array of Strings) Array of layer ids. Add layer id to show layer details on initial render.
|
||||
- **mapCenter:** ({lat, lon, zoom }) Provide mapCenter to customize initial map location.
|
||||
|
||||
|
||||
Customize embeddable state by providing properties for `MapEmbeddableFactory.createFromSavedObject` `input` parameter.
|
||||
|
||||
```
|
||||
const factory = new MapEmbeddableFactory();
|
||||
const mapEmbeddable = await factory.createFromSavedObject(
|
||||
'de71f4f0-1902-11e9-919b-ffe5949a18d2',
|
||||
{
|
||||
hideFilterActions: true,
|
||||
isLayerTOCOpen: false,
|
||||
openTOCDetails: ['tfi3f', 'edh66'],
|
||||
mapCenter: { lat: 0.0, lon: 0.0, zoom: 7 }
|
||||
}
|
||||
);
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue