PDA

View Full Version : "Object doesn't support this property or method" error


Nathon Jones
11-05-2009, 08:20 AM
For some reason, I'm now getting the following error on my maps page where it used to work:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 5 Nov 2009 16:18:10 UTC

Message: 'x' is null or not an object
Line: 1163
Char: 56
Code: 0
URI: http://maps.gstatic.com/intl/en_ALL/mapfiles/184a/maps2.api/main.js

On the same page, I'm also getting the following error:

Message: Object doesn't support this property or method
Line: 12
Char: 1
Code: 0
URI: http://maps.gstatic.com/cat_js/intl/en_ALL/mapfiles/184a/maps2.api/%7Bmod_drag,mod_ctrapi,mod_zoom,mod_ovrmpc,mod_api _gc,mod_apiiw%7D.js

Here's a link to the offending page:
http://www.tmsa.org.uk/DRAFT/scottish-music-event.asp?e=891&b=1

I'm using DW8.0.2, Win XP Pro, IE8 and Pro Maps for Google version 1.0.5.
Hope someone can help. Thanks.

Regards
Nathon

Jason Byrnes
11-05-2009, 10:32 AM
The error is occurring because you cometed out the following line:

// icon_0.infoWindowAnchor = new GPoint(8,3);


un-comment that line, and the error will go away.

Nathon Jones
11-06-2009, 04:35 AM
Thanks Jason.

What if I don't want the WindowAnchor though? I really don't want the "speech bubble" thing on the map and was advised that I could comment that out.

How do I prevent that from displaying, without commenting out that line and without causing "error on page" errors?

Much appreciated.
Regards
Nathon

Jason Byrnes
11-06-2009, 11:01 AM
comment the code that loads the info window.

To keep if from opening on initial load, do search for all occurance of:
marker_0_0.openInfoWindowHtml

It will be in a few places,Whether to comment it or not depends on the surrounding code. It will either look like:
if('address_0_0' == 'address_0_0')
marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);




or:
GEvent.addListener(marker_0_0, 'click', function() {
marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);
});


to make it not load the bubble on initial load, comment it if it looks like the first example:
//if('address_0_0' == 'address_0_0')
//marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);

This will still allow the bubble to load if the marker is clicked. if you do not want that to happen as well, comment the second example too:
//GEvent.addListener(marker_0_0, 'click', function() {
//marker_0_0.openInfoWindowHtml(address_0_0.infowind owtext);
//});

Nathon Jones
11-19-2009, 02:13 AM
Perfect. Thank you Jason.

If I upgrade my version of Pro Maps for Google, will it overwrite my commented out lines?

Jason Byrnes
11-19-2009, 12:46 PM
Only if you edit the map.