ジオコードから住所変換をしようと思い、geocoder.GetAddressesForPositionAsyncを
使おうとしているのですが、文字列を取得できていません。
やりたいことは逆ジオコード(位置情報→場所名[東京スカイツリー等])です。
https://github.com/amay077/Xamarin.Forms.GoogleMapsの
BasicMapPage.xaml.csを少し改変して以下のようなコードを組みました。
C#
1 buttonGeocode.Clicked += async (sender, e) => 2 { 3 var geocoder = new Xamarin.Forms.GoogleMaps.Geocoder(); 4 var positions = await geocoder.GetPositionsForAddressAsync(entryAddress.Text); 5var Landmark = await geocoder.GetAddressesForPositionAsync(positions.First()); 6 7
geocoder.GetPositionsForAddressAsyncで取得した値を
geocoder.GetAddressesForPositionAsyncに投入しているだけです。
しかし、上記のコードではgeocoder.GetAddressesForPositionAsyncで文字列を取得できませんでした。
あなたの回答
tips
プレビュー