diff --git a/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/es_search_source.js b/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/es_search_source.js index c4e6bdc0b7d98..d852332ac2f84 100644 --- a/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/es_search_source.js +++ b/x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/es_search_source.js @@ -137,6 +137,7 @@ export class ESSearchSource extends AbstractESSource { return this.createField({ fieldName: field.name }); }); } catch (error) { + // failed index-pattern retrieval will show up as error-message in the layer-toc-entry return []; } } diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style.js index 8334e6eac0afb..8e7cd8ed9831c 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style.js @@ -580,7 +580,6 @@ export class VectorStyle extends AbstractStyle { } setMBPropertiesForLabelText({ alpha, mbMap, textLayerId }) { - mbMap.setLayoutProperty(textLayerId, 'visibility', 'visible'); mbMap.setLayoutProperty(textLayerId, 'icon-allow-overlap', true); mbMap.setLayoutProperty(textLayerId, 'text-allow-overlap', true); this._labelStyleProperty.syncTextFieldWithMb(textLayerId, mbMap); diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style_defaults.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style_defaults.js index c4ff10f5d781d..4bae90c3165f2 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style_defaults.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style_defaults.js @@ -13,6 +13,8 @@ const DEFAULT_ICON = 'airfield'; export const MIN_SIZE = 1; export const MAX_SIZE = 64; +export const DEFAULT_MIN_SIZE = 4; +export const DEFAULT_MAX_SIZE = 32; export const DEFAULT_SIGMA = 3; export const VECTOR_STYLES = { @@ -146,8 +148,8 @@ export function getDefaultDynamicProperties() { [VECTOR_STYLES.ICON_SIZE]: { type: VectorStyle.STYLE_TYPE.DYNAMIC, options: { - minSize: 4, - maxSize: 32, + minSize: DEFAULT_MIN_SIZE, + maxSize: DEFAULT_MAX_SIZE, field: undefined, fieldMetaOptions: { isEnabled: true, @@ -185,8 +187,8 @@ export function getDefaultDynamicProperties() { [VECTOR_STYLES.LABEL_SIZE]: { type: VectorStyle.STYLE_TYPE.STATIC, options: { - minSize: 4, - maxSize: 32, + minSize: DEFAULT_MIN_SIZE, + maxSize: DEFAULT_MAX_SIZE, field: undefined, fieldMetaOptions: { isEnabled: true, diff --git a/x-pack/legacy/plugins/maps/public/layers/vector_layer.js b/x-pack/legacy/plugins/maps/public/layers/vector_layer.js index 0fcfb13bb2bcc..6ebc1b3d95250 100644 --- a/x-pack/legacy/plugins/maps/public/layers/vector_layer.js +++ b/x-pack/legacy/plugins/maps/public/layers/vector_layer.js @@ -630,6 +630,9 @@ export class VectorLayer extends AbstractLayer { const pointLayer = mbMap.getLayer(pointLayerId); const symbolLayer = mbMap.getLayer(symbolLayerId); + // Point layers symbolized as circles require 2 mapbox layers because + // "circle" layers do not support "text" style properties + // Point layers symbolized as icons only contain a single mapbox layer. let markerLayerId; let textLayerId; if (this._style.arePointsSymbolizedAsCircles()) {