Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Aug 25, 2020
1 parent f8dbc9d commit de6db09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import { ILayer } from '../layer';
import { IJoin } from '../../joins/join';
import { IVectorStyle } from '../../styles/vector/vector_style';
import { HeatmapStyle } from '../../styles/heatmap/heatmap_style';
import { IField } from '../../fields/field';
import { DataRequestContext } from '../../../actions';
import { ITooltipProperty } from '../../tooltips/tooltip_property';
Expand All @@ -33,7 +32,6 @@ export interface IVectorLayer extends ILayer {
getJoins(): IJoin[];
getValidJoins(): IJoin[];
getSource(): IVectorSource;
getStyle(): IVectorStyle | HeatmapStyle;
getFeatureById(id: string | number): Feature | null;
getPropertiesForTooltip(properties: GeoJsonProperties): Promise<ITooltipProperty[]>;
hasJoins(): boolean;
Expand Down Expand Up @@ -80,7 +78,6 @@ export class VectorLayer extends AbstractLayer implements IVectorLayer {
_setMbPointsProperties(mbMap: unknown, mvtSourceLayer?: string): void;
_setMbLinePolygonProperties(mbMap: unknown, mvtSourceLayer?: string): void;
getSource(): IVectorSource;
getStyle(): IVectorStyle | HeatmapStyle;
getFeatureById(id: string | number): Feature | null;
getPropertiesForTooltip(properties: GeoJsonProperties): Promise<ITooltipProperty[]>;
hasJoins(): boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { AbstractStyleProperty, IStyleProperty } from './style_property';
import { DEFAULT_SIGMA } from '../vector_style_defaults';
import {
FIELD_ORIGIN,
LAYER_STYLE_TYPE,
MB_LOOKUP_FUNCTION,
SOURCE_META_DATA_REQUEST_ID,
STYLE_TYPE,
Expand Down Expand Up @@ -90,11 +89,8 @@ export class DynamicStyleProperty<T> extends AbstractStyleProperty<T>
}

getRangeFieldMeta() {
const style = this._layer.getStyle();
if (style.getType() !== LAYER_STYLE_TYPE.VECTOR) {
return null;
}
const styleMeta = (style as IVectorStyle).getStyleMeta();
const style = this._layer.getStyle() as IVectorStyle;
const styleMeta = style.getStyleMeta();
const fieldName = this.getFieldName();
const rangeFieldMetaFromLocalFeatures = styleMeta.getRangeFieldMetaDescriptor(fieldName);

Expand All @@ -118,11 +114,8 @@ export class DynamicStyleProperty<T> extends AbstractStyleProperty<T>
}

getCategoryFieldMeta() {
const style = this._layer.getStyle();
if (style.getType() !== LAYER_STYLE_TYPE.VECTOR) {
return null;
}
const styleMeta = (style as IVectorStyle).getStyleMeta();
const style = this._layer.getStyle() as IVectorStyle;
const styleMeta = style.getStyleMeta();
const fieldName = this.getFieldName();
const categoryFieldMetaFromLocalFeatures = styleMeta.getCategoryFieldMetaDescriptor(fieldName);

Expand Down

0 comments on commit de6db09

Please sign in to comment.