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

  • Home
  • SEARCH
  • 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 9238897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:51:58+00:00 2026-06-18T07:51:58+00:00

newbie question here.. I’m trying to return the LAT LNG values from the array.

  • 0

newbie question here..
I’m trying to return the LAT LNG values from the array.

I have the following three functions:

function City(ridge)
{
    var city=   {
    ABC:"Bethel, AK",
    ABR:"Aberdeen, SD",
    ABX:"Albuquerque, NM"};
    return city[ridge];
}

and

function BBox(ridge,product)
{
    var yx= {
    NOR:
    {
    ABC:[64.835517,56.735755,-157.448578,-166.284681]
    ,
    ABR:[48.270508,42.631241, -95.331912,-101.483839]
    ,
    ABX:[37.565036,32.726169,-104.179217,-109.457981]}};
    var xy=yx[product][ridge];
    return {x0:xy[2],x1:xy[3],y0:xy[0],y1:xy[1]};
}

and

function initialize()
{
var ridge =  'ABC';
var product ='NOR';
var getCityInfoFromRidgeName = City(ridge);
var boundries=BBox(ridge,product);
alert(getCityInfoFromRidgeName);
alert(boundries);
}

the alert for City returns “Bethel, AK” as expected..
but
the alert for BBox returns “objec Object” instead of the LAT LNG information as hoped.

I’m probably in over my head, but how can I return the LAT LNG from the BBox to a var?

Den

  • 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-18T07:51:59+00:00Added an answer on June 18, 2026 at 7:51 am

    boundries is an object holding the x and y coords. you can get at the coords with this code:

    alert(boundries.x0);
    alert(boundries.x1);
    alert(boundries.y0);
    alert(boundries.y1);
    

    for future reference, objects in javascript can be created like this:

    var anObject={property:'value'};
    var anotherObject={
        message:'Hello',
        location:'World',
        aNumber:23
    };
    

    and then parts of an object can be accessed with a dot – like this:

    anObject.property;
    alert(anotherObject.message + ' ' + anotherObject.location);
    

    you can learn more about javascript objects here:
    http://net.tutsplus.com/tutorials/javascript-ajax/the-basics-of-object-oriented-javascript/

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

Sidebar

Related Questions

Another newbie question here, I have the following Select: SELECT DATEADD(dd, 0, DATEDIFF(dd, 0,
Just a quick newbie question here. I have a method that calculates a value
A really php newbie here, sorry if the question is too simple. I’m following
Newbie question here. I have a web form with a text area and naturally
SSRS newbie question here... I have a table where one column is varbinary(max) data.
newbie question here: I have FreeTDS working and querying a Microsoft SQL server 2008
Super newbie question here. I'm trying to teach myself Web Forms, so I'm experimenting
currently i'm studying MySQL, sorry for my newbie question. Here my question I have
Complete PHP newbie question here, I'm trying to load up locally a dynamic PHP
Following up on my previous newbie question about Paypal , I have a new

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.