Added debounce

This commit is contained in:
2019-09-02 18:51:28 -04:00
parent 5572bd888f
commit 4ad5131d35
2 changed files with 4 additions and 3 deletions

View File

@ -115,6 +115,7 @@ export class MapComponent implements OnDestroy, OnInit {
// Display location information & submit it
this.physicsService.info.pipe(filter(coord => !!coord)).subscribe(pos => {
console.log('painting');
if (!this.position) this.center({lat: pos.latitude, lng: pos.longitude});
if (this.positionMarker.arrow) this.map.delete(this.positionMarker.arrow);
if (this.positionMarker.circle) this.map.delete(this.positionMarker.circle);