Questions tagged [getdistance]

10 questions
18
votes
2 answers

MongoDB Bound Queries: How do I convert mile to radian?

I have a collection of stores with a geospacial index on the location propery. What I am trying to do is given the user's latitude, latitude and a search radius (mi), I want to return the list of stores that are within those parameters. I saw the…
Abe
  • 6,386
  • 12
  • 46
  • 75
4
votes
3 answers

Equivelant of .NET GeoCoordinate.GetDistanceTo in Windows 8 Metro style Apps

What is the equivelant of the System.Device.Location.GeoCoordinate.GetDistanceTo method in Metro style Windows 8 Applications. Metro applications have the Geocoordinate class (With a lower case 'C') but no GetDistanceTo method. Secondly, the Metro…
Muhammad Rehan Saeed
  • 35,627
  • 39
  • 202
  • 311
2
votes
2 answers

Flutter - How to get value return in my future builder text widget in body

Am trying to get the distance two coordinate in a future build which was successful but am looking for how to get the value returned "kmDis" in Text() widget in body: of my code. Check below for my full code. Future getDistance(String lat,…
yodeveloper
  • 125
  • 2
  • 18
1
vote
0 answers

How to get distance between to two location using Nativescript

I want to get distance when I have two location. In first: I get current location from geoLocation. geoLocation.isEnabled().then(enabled => { console.log('enabled', enabled) if (!enabled) { geoLocation.enableLocationRequest().then(()…
1
vote
2 answers

Calculate the distance between two positions Android Studio

I'm building an application that tracks my running and walking but I'm getting some trouble with calculating the total distance. Here is a part of my code where I'm getting the values of latitude and longitude and where I do my calculation of the…
Jose Rafael
  • 11
  • 1
  • 3
0
votes
1 answer

Calculate distance in 2D int array efficiently

I am making a bomberman type game. I want to calculate the distance between two points; players can move in four directions. If I am at (0,0) and want to go to (5,5), I can calculate the distance by using the taxicab distance formula ((5-0) + (5-0))…
Deep Devi
  • 37
  • 6
0
votes
4 answers

How can i get the total distance in KM in my javascript

How can i get the total distance in KM in my javascript. It is shown already on top of the Panel, but i need this value also in my javascript. My javascript is as followed: var directionsService = new google.maps.DirectionsService(); var…
0
votes
1 answer

google maps call within a For Loop not returning distance

I am calling google maps within a for loop in my javascript as I have mulitple routes that need to be costed separately based on distances. Everything works great except that the distance is only returned for one of the routes. I have a feeling that…
Richard Reddy
  • 2,120
  • 3
  • 25
  • 39
-1
votes
1 answer

The following code does not find distance between two cells in Excel VBA, using the Google API to find the distance

google api does not work to find distance between source and destination in Excel VBA I tried changing the API, but it is not the API, it is the code. Public Function GetDistance(start As String, dest As String) Dim firstVal As String,…
Tanveer
  • 1
  • 1
-2
votes
0 answers

Why is my Public Function GetDistance() VBA code that worked in previous versions of excel returning an error handling condition now?

For years in Excel 2007 I used the Public Function GetDistance () VBA code in a module added in Visual Basic as given below (with my API key removed and replaced with "YOUR_KEY"). Now in Microsoft 365 excel and Excel 2007, the code returns the error…