From 4b00bada235d4210bf5d60b843ec831351291b7b Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Thu, 26 Dec 2019 11:15:16 -0500 Subject: [PATCH 1/2] [Maps] Only show legend when layer is visible (#53781) --- .../widget_overlay/layer_control/layer_toc/toc_entry/view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js index b843d2d4758d4..c9f115c1ba4cc 100644 --- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js +++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js @@ -46,7 +46,10 @@ export class TOCEntry extends React.Component { }; async _loadHasLegendDetails() { - const hasLegendDetails = await this.props.layer.hasLegendDetails(); + const hasLegendDetails = + (await this.props.layer.hasLegendDetails()) && + this.props.layer.isVisible() && + this.props.layer.showAtZoomLevel(this.props.zoom); if (this._isMounted && hasLegendDetails !== this.state.hasLegendDetails) { this.setState({ hasLegendDetails }); } From 6669111f86f2e493e6b4750cf191615412ccb205 Mon Sep 17 00:00:00 2001 From: Aaron Caldwell Date: Thu, 26 Dec 2019 14:02:06 -0700 Subject: [PATCH 2/2] Update maps telemetry mappings to account for recent updates (#53803) --- x-pack/legacy/plugins/maps/mappings.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/maps/mappings.json b/x-pack/legacy/plugins/maps/mappings.json index 7f80512980f0a..5e2e8c2c7e6e5 100644 --- a/x-pack/legacy/plugins/maps/mappings.json +++ b/x-pack/legacy/plugins/maps/mappings.json @@ -26,6 +26,16 @@ }, "maps-telemetry": { "properties": { + "settings": { + "properties": { + "showMapVisualizationTypes": { + "type": "boolean" + } + } + }, + "indexPatternsWithGeoFieldCount": { + "type": "long" + }, "mapsTotalCount": { "type": "long" }, @@ -72,4 +82,4 @@ } } } -} \ No newline at end of file +}