File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import Point from 'ol/geom/Point';
7
7
import { RegularShape , Stroke , Fill , Style } from 'ol/style' ;
8
8
import { LayerModel , LayerView } from './layer' ;
9
9
import { MODULE_NAME , MODULE_VERSION } from './version' ;
10
+ import { Geometry } from 'ol/geom' ;
10
11
11
12
export class ArrowLayerModel extends LayerModel {
12
13
defaults ( ) {
@@ -104,14 +105,13 @@ export class ArrowLayerView extends LayerView {
104
105
coord : { lon : number ; lat : number } ;
105
106
wind : { speed : number ; deg : number } ;
106
107
} [ ] ;
107
- const features : Feature < Point > [ ] = [ ] ;
108
+ const features : Feature < Geometry > [ ] = [ ] ;
108
109
109
110
if ( Array . isArray ( data ) ) {
110
111
data . forEach ( ( point ) => {
111
- const feature = new Feature (
112
- new Point ( [ point . coord . lon , point . coord . lat ] ) ,
113
- ) ;
114
- feature . setProperties ( {
112
+ const geometry = new Point ( [ point . coord . lon , point . coord . lat ] ) ;
113
+ const feature = new Feature ( {
114
+ geometry : geometry ,
115
115
wind : {
116
116
speed : point . wind . speed ,
117
117
deg : point . wind . deg ,
You can’t perform that action at this time.
0 commit comments