Google apiを使用して現在のアドレスを取得していましたが、この関数でコールバック関数を実装するには、角度4を使用します。角度4でコールバック関数を使用する方法は?
let currgeocoder = new google.maps.Geocoder();
currgeocoder.geocode({
'location': location
}, function(results:any, status:any) {
if (status == google.maps.GeocoderStatus.OK) {
let place = results[0];
//this.showresult(place.formatted_address);
} else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
this.myGroup.setValue({
searchControl: 'global'
});
あなたが何かを私に知らせる必要がある場合私の答えに見える –