jamesmontemagno / GeolocatorPlugin

Geolocation plugin for Xamarin and Windows
MIT License
294 stars 158 forks source link

Anyone use this to track a users location on a map? #292

Closed tekinc closed 5 years ago

tekinc commented 5 years ago

For common questions and issues see the FAQ

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Version Number of Plugin: Device Tested On: Simulator Tested On: Version of VS: Version of Xamarin: Versions of other things you are using:

Steps to reproduce the Behavior

Expected Behavior

Actual Behavior

Code snippet

Screenshotst

jamesmontemagno commented 5 years ago

https://github.com/Azure-Samples/MyDriving/tree/master/src/MobileApps/MyDriving

tekinc commented 5 years ago

Thanks, do you know of a sample where tracking is implemented in xamarin forms? I'm trying to implement inside XF but can't get an accurate user trail. It seems that the geo location of the user constantly moves(100 feet or more) even when the user is standing still.

Also what's your opinion of this implementation? https://github.com/dannykhreet/LBA1/blob/f404dfccf58ca57290a97868a180f859b233436a/GeolocatorSample/GeolocatorSample/HomePage.xaml.cs#L197-L211

chrisfoulds commented 5 years ago

I have a running app on both ios and android that uses this plugin , works perfectly.

tekinc commented 5 years ago

How are you using it? My use case is I want to track a users path.

I have a running app on both ios and android that uses this plugin , works perfectly.

tekinc commented 5 years ago

I have a running app on both ios and android that uses this plugin , works perfectly.

Can you send me a itunes link to your running app?

Thanks

tekinc commented 5 years ago

I have a running app on both ios and android that uses this plugin , works perfectly.

I just tested with your app and it reproduces the same bug. tracking

chrisfoulds commented 5 years ago

Congratulations on finding my app, I am not sure what app you are showing above as that is not mine. Anyway in the above screenshot it is showing extremely low confidence (hence large blue circle) and the movement is caused by GPS jitter as there is no filtering algorithm

tekinc commented 5 years ago

Sorry, thought I found your app. I'm seeing the same issue using this plugin.

chrisfoulds commented 5 years ago

It is NOT the plugin. The screenshot clearly shows GPS jitter with low accuracy, the plugin provides raw data it is upto you to filter and smooth it all out.

tekinc commented 5 years ago

Ah I see. so what would you recommend the strategy be? Do you have any sample code? I appreciate the feedback.

jamesmontemagno commented 5 years ago

I did something like this: https://github.com/Azure-Samples/MyDriving/blob/master/src/MobileApps/MyDriving/MyDriving/ViewModel/CurrentTripViewModel.cs#L486 basically calculate the distance from a previous point and if it is too big or too small don't use it.

tekinc commented 5 years ago

Got it, that makes sense.

Thanks

tekinc commented 5 years ago

I did something like this: https://github.com/Azure-Samples/MyDriving/blob/master/src/MobileApps/MyDriving/MyDriving/ViewModel/CurrentTripViewModel.cs#L486 basically calculate the distance from a previous point and if it is too big or too small don't use it.

One under question, why not just filter out the positions by accuracy? Would that work?

Thanks again.