title: How to remove marker by method, openlayers 4, angular 4
body: <p>I want to remove the marker in Openlayers map
  How could i remove all the marker pin i have added to map</p>
  
  <pre><code>addmarker(name:any,lat:any,lng:any){
      console.log("inside ",lat,lng,name)
      var iconFeature = new ol.Feature({
          geometry: new ol.geom.Point(ol.proj.transform([lng,lat],'EPSG:4326', 'EPSG:3857')),
          name: name
      });
      var iconStyle = new ol.style.Style({
          image: new ol.style.Icon(({
              anchor: [0.5, 46],
              anchorXUnits: 'fraction',
              anchorYUnits: 'pixels',
              opacity: 0.75,
              src: '../../assets/images/location_pin.png'
          }))
      });
      iconFeature.setStyle(iconStyle);
      var vectorSource = new ol.source.Vector({
          features: [iconFeature]
      });
      this.vector = vectorSource
      var vectorLayer = new ol.layer.Vector({
          source: vectorSource
      });
      this.vector_layer = vectorLayer
      this.map.addLayer(vectorLayer);
  
  }
  </code></pre>
  
  <p>could some one help me remove the marker pin i have added to the open layers map</p>