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 6378165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:58:11+00:00 2026-05-25T01:58:11+00:00

I am trying to access the start_address from the response object returned from GoogleMaps.

  • 0

I am trying to access the start_address from the response object returned from GoogleMaps.

Tried:

response['start_address']
response['routes']['start_address']
response['routes']['legs']['start_address']

Google Maps:

directionsDisplay = new google.maps.DirectionsRenderer();
directionsDisplay.setMap($gmap);
directionsDisplay.setPanel(document.getElementById(directionHtml));
directionsService.route(request, function(response, status){
    if(status == google.maps.DirectionsStatus.OK){
            directionsDisplay.setDirections(response);
            alert(response['routes']['legs']['start_address']);
    }
});

response.toSource()

({routes:[
    {bounds:{ba:{b:53.51456, d:53.529900000000005}, V:{d:-1.1919300000000002, b:-1.1283400000000001}},
    copyrights:"Map data \xA92011 Tele Atlas", 
    legs:[
        {distance:{text:"5.9 km", value:5910}, 
        duration:{text:"11 mins", value:688}, 
        end_address:"18 Spring Lane, Sprotbrough, Doncaster DN5 7, UK", 
        end_location:{Pa:53.51555, Qa:-1.1919299999999566}, 
        start_address:"42 High St, Doncaster DN1 1, UK", start_location:{Pa:53.52307, Qa:-1.1337300000000141}, steps:[
ETC...
  • 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-05-25T01:58:12+00:00Added an answer on May 25, 2026 at 1:58 am

    Based on what you provided I can only come up with this structure of the response (not complete of course):

    // for testing purposes I assume to have the actual response 
    // assigned to a response var
    var response = {
    routes:[{
            bounds:{ba:{b:53.51456, d:53.529900000000005}, V:{d:-1.1919300000000002, b:-1.1283400000000001}},
            copyrights:"Map data \xA92011 Tele Atlas", 
            legs:[{
                    distance:{text:"5.9 km", value:5910}, 
                    duration:{text:"11 mins", value:688}, 
                    end_address:"18 Spring Lane, Sprotbrough, Doncaster DN5 7, UK", 
                    end_location:{Pa:53.51555, Qa:-1.1919299999999566}, 
                    start_address:"42 High St, Doncaster DN1 1, UK", start_location:{Pa:53.52307, Qa:-1.1337300000000141}
                }]
        }]
    };
    

    And if you do response.routes[0].legs[0].start_address it returns 42 High St, Doncaster DN1 1, UK. The routes property is an array so there may be cases where you need to iterate to get different values from indexes, if that’s the case just iterate over it and replace 0 with the iterator variable.

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

Sidebar

Related Questions

I'm trying to parse json data from google directions but can't seem to access
Im trying to access a web service from a remote computer. I managed to
I am trying to access Outlook 2007 from C#. I have installed the PIA
I am trying to access a view inside a splitter from my mainframe. At
I am trying to access the audio file from the jar,for doing that i
I've built a ASP.NET webservice and I'm trying to access it from a Blackberry.
I am trying to access same python web app in GAE from firefox and
I'm trying to access third party api which gives me object and sub object,
I am basically trying to access the network share resources from my Web Application
I am trying to access an InputMethodService from an Activity , and I am

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.