Hi,
I just need calculate the distance between my location and an address.
I just need time and distance.
I don't need navigation, maps, multiple routes or anything.
How can I do this?
Thanks
@amay077
My issue has recieve "enhancement" label, so the library no answer this, right?
Do you have a forecast for implementation?
Should I wait for this or is it better to look another solution?
Thanks
Yes I will add Position.ToDistance(Position) method.
This method like Android's Location.distanceTo method .
But this method does NOT provide Address to Lat/Lon conversion.
@amay077
If I convert the address to lat / lon and call this method, will the result be the distance traveled by a car or straight?
I need the distance traveled by a car ...
Once you have the lat/lon there is a method in Xamarin Essentials Location
Xamarin.Essentials.Location.CalculateDistance(new
Xamarin.Essentials.Location(coord1.Latitude, coord1.Longitude), new
Xamarin.Essentials.Location(coord2.Latitude, coord2.Longitude),
Xamarin.Essentials.DistanceUnits.Kilometers);
or old faithful calculations like Haverstine or Great Circle
Linda Rawson
ᐧ
On Fri, Aug 23, 2019 at 5:24 AM Marcos Gerene F. Spirito <
[email protected]> wrote:
@amay077 https://github.com/amay077
If I convert the address to lat / lon and call this method, will the
result be the distance traveled by a car or straight?I need the distance traveled by a car ...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/646?email_source=notifications&email_token=AMCTXTHD2QKKRNREFEP7ZZLQF7CGXA5CNFSM4IN6FZVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4754VY#issuecomment-524279383,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMCTXTEISXKU6WUHWHQW4ZDQF7CGXANCNFSM4IN6FZVA
.
Driving distance is a different story.
You use Google's api.
https://developers.google.com/maps/documentation/distance-matrix/intro
Linda Rawson
ᐧ
On Fri, Aug 23, 2019 at 7:46 AM Linda Rawson linda@dynagrace.com wrote:
Once you have the lat/lon there is a method in Xamarin Essentials Location
Xamarin.Essentials.Location.CalculateDistance(new
Xamarin.Essentials.Location(coord1.Latitude, coord1.Longitude), new
Xamarin.Essentials.Location(coord2.Latitude, coord2.Longitude),
Xamarin.Essentials.DistanceUnits.Kilometers);or old faithful calculations like Haverstine or Great Circle
Linda Rawson
ᐧ
On Fri, Aug 23, 2019 at 5:24 AM Marcos Gerene F. Spirito <
[email protected]> wrote:@amay077 https://github.com/amay077
If I convert the address to lat / lon and call this method, will the
result be the distance traveled by a car or straight?I need the distance traveled by a car ...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/646?email_source=notifications&email_token=AMCTXTHD2QKKRNREFEP7ZZLQF7CGXA5CNFSM4IN6FZVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4754VY#issuecomment-524279383,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMCTXTEISXKU6WUHWHQW4ZDQF7CGXANCNFSM4IN6FZVA
.
@linda-dge
Driving distance is a different story.
Yeah! So I question about this library...
Thanks
@linda-dge @amay077
The google API has a cost, my client just needs a forecast to know how to order travels by closest to farthest.
This solve my issue:
Xamarin.Essentials.Location.CalculateDistance(new
Xamarin.Essentials.Location(coord1.Latitude, coord1.Longitude), new
Xamarin.Essentials.Location(coord2.Latitude, coord2.Longitude),
Xamarin.Essentials.DistanceUnits.Kilometers);
Thanks
Thanks @linda-dge , @marcosgerene
Xamarin.Essentials.Location.CalculateDistance is the answer!
I don't add Position.ToDistance(Position) method in Xamarin.Forms.GoogleMaps.
@amay077 @linda-dge
Thanks!!
Most helpful comment
Driving distance is a different story.
You use Google's api.
https://developers.google.com/maps/documentation/distance-matrix/intro
Linda Rawson
ᐧ
On Fri, Aug 23, 2019 at 7:46 AM Linda Rawson linda@dynagrace.com wrote: