Angular Openlayers

Хочу сделать выделение обьектов на карте средствами Openlayers

пробелма в том что map не виден внутри функции, вне функции всё ок

var select = new Select();
    this.map.addInteraction(select);
    var selectedFeatures = select.getFeatures();
    
    
    var dragBox = new DragBox({
      condition:(condition as any).platformModifierKeyOnly
    });
    
    this.map.addInteraction(dragBox);

    dragBox.on('boxend', function() {

      var rotation = this.map.getView().getRotation();
      var oblique = rotation % (Math.PI / 2) !== 0;
      var candidateFeatures = oblique ? [] : selectedFeatures;
      var extent = dragBox.getGeometry().getExtent();
      rasterLayer.forEachFeatureIntersectingExtent(extent, function(feature) {
        candidateFeatures.push(feature);
      });

Ответы (0 шт):