title: Stop google map idle event listener
body: <p>I am using google 'idle' event listener to upload markers on map (with angularjs). My code is</p>
  
  <pre><code>$scope.LoadSearchPropertyOnPortFolioSales = function (PropertyName) {
  
   if(PropertyName == ''){
   google.maps.event.addListener(map, 'idle', function () {
              var PropertyList = PropertyService.GetSearchPropertyForPortfolio($scope.PortfolioId, $scope.PropertyName, this.center.lat(), this.center.lng(), 0.005, 0.005);
                       PropertyList.then(function (pl) {
                           DrawPropertyOnPortFolioSale(pl.data, $scope.PropertyName);
                       },
               });
   }
  
   else 
   {
       //Stop event listener
   }
  }
  </code></pre>
  
  <p>I want the event listener only work when PropertyName that is passed have no value. But when PropertyName have some value in it i want to stop event listener. How do i stop event listener......</p>