I'm trying to load two scripts with the $.getScript function of getting Google Map script, then after that is loaded, I get another script (goMap) which makes map applets easily to be made.
However, when loaded, the first script of getting Google Map API is good, then the second script returns a parse error and shows this:
TypeError: 'undefined' is not a constructor'
Yet, I don't know where that is referencing from or which line, I think it must be trying to execute the Geocoder on this file (first line after (function($){:
Here is my code:
$.getScript('http://maps.google.com/maps/api/js?sensor=true').done(function()
{
    $.getScript('../js/gomap.js').done(function()
    {
            // this never gets called
            alert('gomap loaded');
    }).fail(function(jqxhr, settings, exception)
    {
        alert(exception); // this gets shown
    });
}).fail(function()
{
    alert('failed to load google maps');
});
I tried changing the AJAX settings to set async to false, but it didn't help at all.
 
     
     
    