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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:43:33+00:00 2026-05-31T22:43:33+00:00

hope all is well. I am using Version 7.0. This morning I was struggling

  • 0

hope all is well.

I am using Version 7.0.

This morning I was struggling with something I thought should be rather simple. Providing alternative search results in a Store Locator scenario. (Just like here – http://www.bing.com/maps)

I make a geocode request to Bing Maps Rest service like so:

var geocodeRequest = "http://dev.virtualearth.net/REST/v1/Locations?query=" + encodeURI(searchString) + "&output=json&jsonp=GeocodeCallbackSearch&key=" + credentials;

This all works great! I can capture my result returned into my function and parse it just fine as long as the user has typed in a query which had a matching geocode.

function GeocodeCallbackSearch(result) {
    try
    {
        alert(result.resourceSets[0].resources.length);
        // When the user searches an address that isn't quite right, I notice that the 
        // Length of the result set is greater then 1.
        // I would like to get at these so I can provide the "Did you Know"
        // functionality.

        // This is where I am having problems accessing the other results
        for (var i =0; i < result.resourceSets[0].resources.length;i++)
        {
           alert (result.resourceSets[i].resources[i].name);
        }
    }
    catch(err){
        alert(err.message)
    }

Error: I keep getting result.resourceSets[i].resources[i].name is undefined.

I know they are buried in there some where because the length is sometimes greater than 1!
Am I mus-understanding that result.resourceSets[0].resources.length is the count of geocode results returned?

Thanks in advanced!

  • 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-31T22:43:35+00:00Added an answer on May 31, 2026 at 10:43 pm
    for (var i =0; i < result.resourceSets[0].resources.length;i++)
    {
       alert (result.**resourceSets[i]**.resources[i].name);
    }
    

    Easy fix, the bolded needed to be changed, ofcourse!

    // This is where I am having problems accessing the other results
            for (var i =0; i < result.resourceSets[0].resources.length;i++)
            {
               alert (result**.resourceSets[0]**.resources[i].name);
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, first of all, I hope I stated my problem correctly. I am using
hope all is swell! I was hoping I had cracked this problem but it
I'm not a a very experienced Windows developer, so I hope this all makes
I hope to list all files in document directory using codes below for(NSString *path
Using ASP.net and c# using visual studio 2010 Hi all, I hope some one
hey people hope all is well.. i am trying to create a form in
This is my first post on the forum, hope all of you guys are
I hope the title is chosen well enough to ask this question. Feel free
Hi friends hope all r doing well. I have a problem while reading xml
Hi friends hope all r doing well. I have a problem while reading xml

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.