1

I am looking for instructions on using Mobile Services for Xamarin.Forms? I am especially interested in how to get the device's current location. I know that there is sample code here, https://github.com/aritchie/acr-xamarin-forms, that showcases everything that you can do with the library, the only problem being it is way too complicated for a newbie to understand, and there are no comments

Links to any comprehensive tutes or sample code with comments would be appreciated. I have searched but have not come up with anything good.

Cheers

4

2 回答 2

4

在以下链接http://blog.falafel.com/learning-xamarin/中有一组很好的学习Xamarin.Forms的示例和一些描述。

由于Xamarin.Forms相当新,您将不得不四处搜索好的片段等。

https://github.com/xamarin/xamarin-forms-samples中有许多Xamarin.Forms项目。尝试查看以下两个以便更容易理解Xamarin.Forms中的简短示例:-

https://github.com/xamarin/xamarin-forms-samples/tree/master/FormsGallery

https://github.com/xamarin/xamarin-forms-samples/tree/master/XAMLSamples

这些示例足够短,应该可以帮助您从中学习。

下面有一个与地图相关的特定示例,它还显示了您在地图上的当前位置,您可能还想进一步查看:-

https://github.com/xamarin/xamarin-forms-samples/tree/8b9bbe853263f1eb29faca499619b0b757d8fbfd/WorkingWithMaps

运行应用程序,进行小的修改和实验 - 一种很好的学习方式。

玩得开心!

于 2014-09-01T15:52:38.980 回答
1

如果您想通过共享代码查找用户位置,请查看组件存储中的 Geolocator 插件。超级好用

于 2015-06-22T21:27:55.607 回答