Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I fix google map 'undefined' is null or not an object in IE 8?

Posted on 2011-09-17
3
Medium Priority
?
2,391 Views
Last Modified: 2012-05-12
I have a website where I have implemented Google map with zip code search. It is here, http://optionsunited.com/index.php/your-options/abortion-answers.html

I have used custom Google Map code. When we view in IE 8, there is an error

How can I fix this or at least avoid /ignore from the browser..?

I tried already to find some solution in other places but that did not help.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/13.0.782.220; chromeframe; .NET CLR 2.0.50727; InfoPath.2)
Timestamp: Sat, 17 Sep 2011 06:52:00 UTC


Message: 'undefined' is null or not an object
Line: 36
Char: 119
Code: 0
URI: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/6/4/main.js

Open in new window

0
Comment
Question by:Loganathan Natarajan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 36553854
try after removing the base tag
0
 
LVL 29

Accepted Solution

by:
fibo earned 2000 total points
ID: 36553874
It seems from here http://www.delphifaq.com/faq/javascript/extjs/f3476.shtml that you have 2 possible causes to your problem:
- javascript is passed on some data array with an external comma, which makes IE <9 to complain (your page diisplays no error in IE9).. the trick being that IE error message does not locate exactly where is the problem (but it seems that if people look for a city, your Gmap query is "city,", not sure if that is the comma!)
- you are passing some undefined data and IE complains. using debugging mode of IE9, this problem seems to come from a js variable 'position' OR from an HTML id 'position' that your javascript does not find

Looking at your page in FF (6) + the webdevelopper extension, I get the following error messages:

Erreur : unterminated string literal
Fichier Source : http://optionsunited.com/index.php/helpful-links/clinics-in-los-angeles.html?view=googlemap&amp;re=maplist&amp;lat=47.6739881&lon=-122.121512&id=redmond#smap
Ligne : 280, Colonne : 21
Code Source :
         showAddress("44733 10th Street West 

Erreur : initialize is not defined
Fichier Source : http://optionsunited.com/index.php/helpful-links/clinics-in-los-angeles.html?view=googlemap&amp;re=maplist&amp;lat=47.6739881&lon=-122.121512&id=redmond#smap
Ligne : 364

Erreur : doc.location is null
Fichier Source : chrome://searchshield/content/overlay.js
Ligne : 705

Open in new window


There are some (lower severity) warnings, but they seem to be related to Google js and you can probably ignore them. One example:
Avertissement : variable a redeclares argument
Fichier Source : http://maps.gstatic.com/intl/en_ALL/mapfiles/367a/maps2.api/main.js
Ligne : 896, Colonne : 57
Code Source :
function zi(a,b,c){var d=new r(a.x+b.width,a.y+b.height),a=Eb(d.x/c-qb),d=Eb(d.y/c-qb);return new Ai(new r(a,d),new r(a*c-b.width,d*c-b.height))} 

Open in new window

ADDITIONAL NOTE:
You are using a deprecated (V2) option of Google API. See page http://code.google.com/apis/maps/signup.html and others.
While I suggest you keep it until you problem is solved, you MUST add the 'sensor=' parameter, in your case that would be 'sensor=false'. See http://code.google.com/apis/maps/documentation/javascript/v2/basics.html#SpecifyingSensor
This last point might (not sure!) be related to the 'position' problem
0
 
LVL 29

Expert Comment

by:fibo
ID: 36573529
B-) Glad I could help. Thx for the grade and points!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question