import Component from '@ember/component';
import { computed } from '@ember/object';

import ol from 'openlayers';

export default Component.extend({
  tagName: '',

  source: null,
  flight: null,

  feature: computed(function () {
    let flight = this.flight;
    return new ol.Feature({
      geometry: flight.get('geometry'),
      sfid: flight.get('id'),
      color: flight.get('color'),
      type: 'flight',
    });
  }),

  didInsertElement() {
    this._super(...arguments);
    this.source.addFeature(this.feature);
  },

  willDestroyElement() {
    this._super(...arguments);
    this.source.removeFeature(this.feature);
  },
});

@@ -17,19 +17,21 @@
  from '@
-emb
+glimm
 er/compo
@@ -48,231 +48,106 @@
 ort 
-%7B computed %7D from '@ember/object';%0A%0Aimport ol from 'openlayers';%0A%0Aexport default Component.extend(%7B%0A  tagName: '',%0A%0A  source: null,%0A  flight: null,%0A%0A  feature: computed(function () %7B%0A    let flight = this.flight;%0A    return
+ol from 'openlayers';%0A%0Aexport default class FlightPathLayerFeature extends Component %7B%0A  feature =
  new
@@ -164,18 +164,16 @@
 e(%7B%0A    
-  
 geometry
@@ -174,16 +174,26 @@
 ometry: 
+this.args.
 flight.g
@@ -216,16 +216,24 @@
     
-  
 sfid: 
+this.args.
 flig
@@ -254,17 +254,25 @@
     
-  
 color: 
+this.args.
 flig
@@ -292,18 +292,16 @@
 '),%0A    
-  
 type: 'f
@@ -312,41 +312,28 @@
 t',%0A
-  
   %7D);%0A
-  %7D),%0A%0A  didInsertElement
+%0A  constructor
 () %7B
@@ -329,38 +329,32 @@
 tructor() %7B%0A    
-this._
 super(...argumen
@@ -363,24 +363,29 @@
 );%0A    this.
+args.
 source.addFe
@@ -408,17 +408,16 @@
 re);%0A  %7D
-,
 %0A%0A  will
@@ -427,15 +427,8 @@
 troy
-Element
 () %7B
@@ -436,19 +436,25 @@
     
-this._super
+super.willDestroy
 (...
@@ -474,16 +474,21 @@
    this.
+args.
 source.r
@@ -522,10 +522,7 @@
 %0A  %7D
-,
 %0A%7D
-);
 %0A

Convert to Glimmer component