angular - Problem med Waypoint som kastas när man använder agm-direction Ionic
Jag använder agm-riktning och jag får detta problem i Visual Studio Code:
Type '{ location: { lat: number; lng: number; }; }[]' is not assignable to type 'DirectionsWaypoint[]'.
Type '{ location: { lat: number; lng: number; }; }' is not assignable to type 'DirectionsWaypoint'.
Types of property 'location' are incompatible.
Type '{ lat: number; lng: number; }' is not assignable to type 'string | Place | LatLng'.
Type '{ lat: number; lng: number; }' is missing the following properties from type 'LatLng': equals, toUrlValue, toJSON
Vägpunkterna visas fortfarande och det fungerar, men min pedanta personlighet gillar inte att se en röd understrykning, jag är inte säker på hur jag blir av med den, all hjälp skulle uppskattas mycket.
Kod i TypeScript-fil:
waypoints = [
{location: { lat: -25.913330, lng: 28.185640 }},
{location: { lat: -25.869650, lng: 28.217950 }}
];
Kod i HTML-fil:
<agm-direction [origin]="origin" [destination]="destination" [waypoints]="waypoints"></agm-direction>
Felet visas under [waypoints]