Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8937555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:26:11+00:00 2026-06-15T10:26:11+00:00

The distance matrix request in Google Maps API is limited to 25 destinations. I

  • 0

The distance matrix request in Google Maps API is limited to 25 destinations. I want to be able to get my current location using geolocation and find the closest train station based on a database of train station addresses that I have compiled. My problem is that my database might contain 100+ train stations, so I need to split up my one big distance matrix request into multiple small ones. When Google Maps API returns the result, it normalizes the format of the address, which makes it difficult to programmatically pair the response with the original database row based on the address string. Also, these are asynchronous requests, which means that the responses could come in any order. Is there some way of passing an index to the callback function, so that I can pair the responses with the requests? What is the best method of handling this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:26:12+00:00Added an answer on June 15, 2026 at 10:26 am

    Do an initial cut of train stations by using the straight line distance (which can be computed directly from the geographic coordinates, using the haversine formula). Only send the 25 closest stations to the distance matrix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am new programmer. and i am using Google Distance Matrix API. I am
Why does Google restrict the use of the JavaScript Distance Matrix API so that
I want to calculate the distance between points in C# with the google maps
The R function dist computes and returns the distance matrix computed by using the
I want to get distance text from following link. i have used NSXML parsing
I have the following distance matrix in csv format. http://palaeomath.palass.org/images/mds/T1.jpg Using PHP, how could
I've written some code to parse the Google Distance Matrix JSON response received by
I am developing an application via the Google Maps API (Version 3). I have
I'm trying to implement the distance matrix in parallel using openmp in which I
I want to develop an iPhone Application which uses Google Places API ,The Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.