Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Dec 19, 2019
1 parent 7ed525c commit 568f8eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions x-pack/legacy/plugins/maps/public/layers/vector_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 568f8eb

Please sign in to comment.