Я пытаюсь получить город долготы и широты после перетаскивания маркера.Это мой код.
Это мой HTML
<agm-map [latitude]="latitude" [longitude]="longitude" [scrollwheel]="false [zoom]="zoom">
<agm-marker [latitude]="latitude" [longitude]="longitude" (dragEnd)="setCityOrigen()" [markerDraggable]="true"></agm-marker>
</agm-map>
Это мой Component.ts
setCityOrigen() {
this.mapsAPILoader.load().then(() => {
let geocoder = new google.maps.Geocoder;
let latlng = new google.maps.LatLng(this.latitude, this.longitude);
let that = this;
geocoder.geocode({'location': latlng}, function(results) {
if (results[0]) {
that.zoom = 11;
that.currentLocation results[0].formatted_address;
console.log(this.latlng);
} else {
console.log('No results found');
}
});
});
}
Мой результат не определен