Getting an error from the main.js...help!

826 views
Skip to first unread message

Eric Roberts

unread,
Oct 5, 2010, 1:57:59 PM10/5/10
to google-map...@googlegroups.com
I get an error (from the FF error console) that says :

Error: a is null
Source File: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/2/7/main.js
Line 25

IE returns:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.2; MS-RTC LM 8; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 5 Oct 2010 17:57:11 UTC


Message: 'null' is null or not an object
Line: 25
Char: 668
Code: 0
URI: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/2/7/main.js



the variable latlngval is a ColdFusion var that is eitehr derived from the XML return from the geocoder api or a manually entered GPS coordinate derived from the what's here menu option on the google maps site (we use this as an option in case the address doesn't come up in the right spot.).  You can go to http://dev.meaningfulfunerals.net/fh/facilities/facilities_address.cfm?page=1&fh_id=10273.  Thanks in advance!


Here's the code:

<link rel="stylesheet" type="text/css" href="maps.css" /> 

	
	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
	
	<script type="text/javascript">
		//Initialize map//
		var map;
		//takes either derived Coordinates or Coordinates entered in the admin interface
		//as determined by the above logic in the format of latitude,longitude.  latlngval 
		//in this format.
	  	var latlng = new google.maps.LatLng(39.291835,-85.194386);     
		var myOptions = 
		  	{
			  	zoom: 8, 
			  	center: 
			  	latlng,       
			  	mapTypeId: google.maps.MapTypeId.ROADMAP     
		  	}     
		map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); 
		var marker = new google.maps.Marker({             
	  						map: map,              
	  						position: latlng}); 
	</script>
	
	<div id="map_canvas"></div>

Eric Roberts

unread,
Oct 5, 2010, 3:07:12 PM10/5/10
to google-map...@googlegroups.com
Additional Note:  I put the code into it's own page and got this as well as the error below...

Error: Permission denied for <http://www.google.com> to get property Window.getComputedStyle from <http://www.scriptingmaster.com>.

What does that mean? (other than the obvious of course *grin*)

Eric

Chad Killingsworth

unread,
Oct 5, 2010, 3:59:55 PM10/5/10
to Google Maps JavaScript API v3
> You can go tohttp://dev.meaningfulfunerals.net/fh/facilities/facilities_address.cf....
> Thanks in advance!

It looks like this address may only be accessible to you - I at least
can't open that page.

Can you put the map in a public location?

Chad Killingsworth

Eric Roberts

unread,
Oct 5, 2010, 4:16:26 PM10/5/10
to google-map...@googlegroups.com
oops...make that http://devint.meaningfulfunerals.net/fh/facilities/facilities_address.cfm?page=1&fh_id=10273

Sorry about that :-D

Eric


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Rossko

unread,
Oct 5, 2010, 5:29:57 PM10/5/10
to Google Maps JavaScript API v3

Eric Roberts

unread,
Oct 5, 2010, 5:46:25 PM10/5/10
to google-map...@googlegroups.com
I put a file up at http://devint.meaningfulfunerals.net/fh/facilities/facilities/address/maptest.cfm that is just the map code...

Eric


--

Rossko

unread,
Oct 5, 2010, 9:09:46 PM10/5/10
to Google Maps JavaScript API v3
> I put a file up athttp://devint.meaningfulfunerals.net/fh/facilities/facilities/address...
> is just the map code...

Well, with a big wadge of error report appended!
Anyways, the map javascript here will run before the div it is
supposed to populate has been created.
You'd need to use onload events or put the script at the end of the
<body> section, as is usual with the maps API

If that is the same error you get from your 'real' page it might offer
some insight into a timing problem there, too?

Eric Roberts

unread,
Oct 10, 2010, 4:00:23 PM10/10/10
to Google Maps JavaScript API v3
The error that is produced on the map only page is the same error
produced on the real page...I will have to try putting the javascript
after the div and see if that works. Thanks!

Eric Roberts

unread,
Oct 11, 2010, 9:31:56 PM10/11/10
to google-map...@googlegroups.com
That did it...thanks!!!!

Eric

--

Reply all
Reply to author
Forward
0 new messages