Solved

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

Posted on 2011-09-17
3
2,316 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
  • 2
3 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36553854
try after removing the base tag
0
 
LVL 29

Accepted Solution

by:
fibo earned 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now