我试图用用户附近的酒店,餐厅等地方来填充用户附近的google地图。不幸的是,我无法找到对xamarin android的支持并将API放置在xamarin android中。任何建议如何实现这一目标?
您正在寻找Xamarin.GooglePlayServices.Places
nuget:
<package id="Xamarin.GooglePlayServices.Places" version="32.940.0-beta3" targetFramework="monoandroid70" />
添加到您的Xamarin.Android
项目后,您可以将Place API添加到您的GoogleApiClient
:
mGoogleApiClient = new GoogleApiClient
.Builder(this)
.AddApi(PlacesClass.GEO_DATA_API)
.AddApi(PlacesClass.PLACE_DETECTION_API)
.EnableAutoManage(this, this)
.Build();
Places API在Android.Gms.Location.Places
名称空间中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句