我想填充谷歌地图与用户附近的地方,如酒店,餐厅等。 不幸的是我无法找到一个支持Xamarin机器人和地方API在xamarin android 任何建议如何实现这一目标?填充地图附近的地方在Xamarin安卓使用地方API
回答
您正在寻找Xamarin.GooglePlayServices.Places
的NuGet:
<package id="Xamarin.GooglePlayServices.Places" version="32.940.0-beta3" targetFramework="monoandroid70" />
一旦添加到您的Xamarin.Android
项目,你可以在广场的API添加到您的GoogleApiClient
:
mGoogleApiClient = new GoogleApiClient
.Builder(this)
.AddApi(PlacesClass.GEO_DATA_API)
.AddApi(PlacesClass.PLACE_DETECTION_API)
.EnableAutoManage(this, this)
.Build();
的地方API是在Android.Gms.Location.Places
命名空间。
似乎是一个解决方案,我是新的Xamarin Android可以告诉我如何使用这个。使用上面的代码 .EnableAutoManage(this,this)给出的红线错误表示无法从App4转换为Android .Support,V4.AppFragment Activity,并且无法从App4转换为System.Android
https://developers.google.com/places/android-api/start – SushiHangover
升级Xamarin.GooglePlayServices包后需要添加nuget包Xamarin.GooglePlayServices。 PlacesClass类的地方。 – mvandillen
- 1. 显示在谷歌地图搜索附近的地方安卓
- 2. 附近的地方xamarin形式IOS
- 3. 谷歌地图附近的地方
- 4. bing地图,寻找附近的地方
- 5. 安卓谷歌地图填充圈
- 6. 安卓地图方向
- 7. 谷歌附近的地方api显示的地方类型和地方计数
- 8. 附近地方的Foursquare API iPhone
- 9. Foursquare iPhone API附近的地方
- 10. 方法来填充地图
- 11. 用户位置与谷歌地图API地方自动填充
- 12. 如何检索使用谷歌地方api附近的地方的照片?
- 13. Foursquare附近的地方
- 14. 查找附近的地方
- 15. iOS6 MapKit - 附近的地方
- 16. 附近的地方清单
- 17. 安卓在地图上的方向
- 18. nullpointerexception当从谷歌地点api请求xml附近的地方
- 19. 如何在角谷歌地图的地方附近隐藏?
- 20. 查看附近的地图谷歌地图在流星的地方
- 21. 谷歌的地方自动填充API安卓界限不工作
- 22. 谷歌地图的方向和地区附近的路线
- 23. 如何获得从附近的谷歌地图的地方
- 24. 使用Google Places api查找附近的地方
- 25. 获取距离过滤附近的地方使用谷歌地点api
- 26. 谷歌地图找到当前位置和附近的地方
- 27. 谷歌地图安卓方向
- 28. 安卓谷歌地图步行方向
- 29. 使用GregorianCalendar填充地图
- 30. 谷歌地图地方api
使用场所的网络API:http://stackoverflow.com/questions/29087675/requests-poi-from-a-location-using-xamarin-android –
你会使用代码在那里的答案,并用与在这里答案的网址:http://stackoverflow.com/questions/30161395/im-trying-to-search-nearby-places-such-as-banks-restaurants-atms-inside-the-d –