Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit c1d6c6d

Browse files
Dario Braunsebholstein
authored andcommitted
feat(AgmMarker): auto-convert string to Number for lat/lng (#1424)
fixes #771
1 parent 2e4878b commit c1d6c6d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/core/directives/marker.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {
158158

159159
/** @internal */
160160
ngOnChanges(changes: {[key: string]: SimpleChange}) {
161+
if (typeof this.latitude === 'string') {
162+
this.latitude = Number(this.latitude);
163+
}
164+
if (typeof this.longitude === 'string') {
165+
this.longitude = Number(this.longitude);
166+
}
161167
if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {
162168
return;
163169
}

0 commit comments

Comments
 (0)