File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
x-pack/plugins/maps/public/classes Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ export interface IVectorLayer extends ILayer {
3232 getJoins ( ) : IJoin [ ] ;
3333 getValidJoins ( ) : IJoin [ ] ;
3434 getSource ( ) : IVectorSource ;
35- getStyle ( ) : IVectorStyle ;
3635 getFeatureById ( id : string | number ) : Feature | null ;
3736 getPropertiesForTooltip ( properties : GeoJsonProperties ) : Promise < ITooltipProperty [ ] > ;
3837 hasJoins ( ) : boolean ;
@@ -79,7 +78,6 @@ export class VectorLayer extends AbstractLayer implements IVectorLayer {
7978 _setMbPointsProperties ( mbMap : unknown , mvtSourceLayer ?: string ) : void ;
8079 _setMbLinePolygonProperties ( mbMap : unknown , mvtSourceLayer ?: string ) : void ;
8180 getSource ( ) : IVectorSource ;
82- getStyle ( ) : IVectorStyle ;
8381 getFeatureById ( id : string | number ) : Feature | null ;
8482 getPropertiesForTooltip ( properties : GeoJsonProperties ) : Promise < ITooltipProperty [ ] > ;
8583 hasJoins ( ) : boolean ;
Original file line number Diff line number Diff line change 55 */
66
77// eslint-disable-next-line max-classes-per-file
8- import { FIELD_ORIGIN } from '../../../../../../common/constants' ;
8+ import { FIELD_ORIGIN , LAYER_STYLE_TYPE } from '../../../../../../common/constants' ;
99import { StyleMeta } from '../../style_meta' ;
1010import {
1111 CategoryFieldMeta ,
@@ -44,7 +44,7 @@ export class MockStyle implements IStyle {
4444 }
4545
4646 getType ( ) {
47- return 'mockStyle' ;
47+ return LAYER_STYLE_TYPE . VECTOR ;
4848 }
4949
5050 getStyleMeta ( ) : StyleMeta {
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727import { IField } from '../../../fields/field' ;
2828import { IVectorLayer } from '../../../layers/vector_layer/vector_layer' ;
2929import { IJoin } from '../../../joins/join' ;
30+ import { IVectorStyle } from '../vector_style' ;
3031
3132export interface IDynamicStyleProperty < T > extends IStyleProperty < T > {
3233 getFieldMetaOptions ( ) : FieldMetaOptions ;
@@ -88,7 +89,7 @@ export class DynamicStyleProperty<T> extends AbstractStyleProperty<T>
8889 }
8990
9091 getRangeFieldMeta ( ) {
91- const style = this . _layer . getStyle ( ) ;
92+ const style = this . _layer . getStyle ( ) as IVectorStyle ;
9293 const styleMeta = style . getStyleMeta ( ) ;
9394 const fieldName = this . getFieldName ( ) ;
9495 const rangeFieldMetaFromLocalFeatures = styleMeta . getRangeFieldMetaDescriptor ( fieldName ) ;
@@ -113,7 +114,7 @@ export class DynamicStyleProperty<T> extends AbstractStyleProperty<T>
113114 }
114115
115116 getCategoryFieldMeta ( ) {
116- const style = this . _layer . getStyle ( ) ;
117+ const style = this . _layer . getStyle ( ) as IVectorStyle ;
117118 const styleMeta = style . getStyleMeta ( ) ;
118119 const fieldName = this . getFieldName ( ) ;
119120 const categoryFieldMetaFromLocalFeatures = styleMeta . getCategoryFieldMetaDescriptor ( fieldName ) ;
You can’t perform that action at this time.
0 commit comments