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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:35:11+00:00 2026-05-26T15:35:11+00:00

For some reason in Internet Explorer 8 (and probably 7) the follow section of

  • 0

For some reason in Internet Explorer 8 (and probably 7) the follow section of code doesn’t wok, any ideas?

var middlelatlong = bounds.getCenter();

//when alerted middlelatlong = (51.65494320798432,0.5499464196260533);

var x = 0;
var keys = new Array();
for(var key in middlelatlong){
    if(x <= 1){
        keys[x] = key;
    }
    x++;
}

var southlong = middlelatlong[keys[0]]-0.00017;

Returns NaN in Internet Explorer 8 but in all other browsers it equals 51.654790472326724.

  • 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-26T15:35:11+00:00Added an answer on May 26, 2026 at 3:35 pm

    I don’t know what you are tying to achieve with your code, but I assume that middlelatlong[keys[0]] returns something which is not a number.

    It seems that you are using the Google Maps API and that you want to access the latitude part of the coordinates. You should read the document properly and use the API to access the information instead of your own try to extract the information.

    If getCenter refers to the method described here, then it returns a LatLng object. You can access the latitude with lat() then (or if you want the longitude, use lng()):

    var southlong = bounds.getCenter().lat() - 0.00017;
    

    Your problem is that you are making assumptions about the order in which the properties of an object are traversed, but this order is not defined, this is implementation dependent. So you cannot say that the first two properties will be the coordinates, the object has other properties as well, which might be traversed first in IE.

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

Sidebar

Related Questions

My GWT app doesn't work in Internet Explorer 8. For some reason it thinks
For some odd reason Internet Explorer won't run my queries properly. I designed this
For some reason, JQuery mobile is not rendering in Internet Explorer 9 on my
For some reason, only the top half of a button appears in Internet Explorer.
For some reason, I am getting the following Javascript error in Internet Explorer 8
I'm trying to use JQuery's autocomplete plug-in but for some reasons Internet Explorer is
For some reason, Section 1 works but Section 2 does not. When run in
for some reason my LI elements are not floated to the left in internet
Why doesn't this JavaScript work in Internet Explorer 7-8? All I am trying to
Consider the following code: ( Live demo here - Open in Internet Explorer 7

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.