Why am i getting InvalidValueError: in property origin: must set one of location, placeId or query error in angular?

Why am i getting InvalidValueError: in property origin: must set one of location, placeId or query error in angular?

在我的 angular10 应用程序中,我使用 agm core 来显示 google maps

component.html

<agm-map [latitude]="latitude" [longitude]="longitude">
  <agm-direction *ngIf="source && dest"  [origin]="source" [destination]="dest"></agm-direction>
</agm-map>

component.ts

ngOnInit(){
 // above code...
 this.source = {
   lat: +(this.bidlocation.pickup.lat),
   lng: +(this.bidlocation.pickup.long)
 };
 this.dest = {
   lat: +(this.bidlocation.dropOff.lat),
   lng: +(this.bidlocation.dropOff.long)
 }
}

现在 map 正在显示并且 direction 也在 map 上正确显示,但我在 console

上看到这个 error
InvalidValueError: in property origin: must set one of location, placeId or query

尝试使用 source: any ;没有任何 {} obj 映射 这个解决了我的问题