title: How to make a overlay for google maps refresh without refreshing everything else
body: <p>Note this question is related to the one I asked <a href="https://stackoverflow.com/questions/51104491/adding-night-overlay-to-google-maps-api">here</a></p>
  
  <p>In my html I am creating a overlay to a google map with </p>
  
  <pre><code>&lt;agm-map ngDraggable [latitude]="latitude" [longitude]="longitude" [zoom]="zoom" *ngIf="locations" (mapReady)="mapReady($event)" &gt;
  </code></pre>
  
  <p>Where mapReady is defined as </p>
  
  <pre><code>  mapReady($event: any) { 
      console.log("about fire init");
      nite.init($event);
      setInterval(nite.refresh(),10000);
    }
  </code></pre>
  
  <p>Now the problem is that <code>nite.refresh()</code> is supposed to fire every 10 seconds but it only fires one time.  I'm not sure if this has something to do with my <code>ngOnInit()</code> which has a </p>
  
  <pre><code>timer(0, 10000).pipe(
        switchMap( _ =&gt; this.hawkerservice.fetchNews()
      )).pipe( map(...)).subscribe()
  </code></pre>
  
  <p>like function in it.  Could this be causing the problem?  The <code>nite.init(...)</code> is working fine i just need to be able to refresh the overlay without had refreshing the whole page which is what I am currently doing to get <code>nite</code> to refresh.  Any thoughts? sorry if english is not the best. </p>