I try to load two scripts using the $.getScript function to get the Google Map script, after which I get another script ( goMap ), which makes it easy to create map applets.
However, when loading, the first script to get the Google Maps API is good, then the second script returns a parsing error and shows this:
TypeError: 'undefined' is not a constructor
However, I donβt know where is the link or which line, I think that it should try to execute Geocoder in this file (the first line after (function($){ :
http://www.pittss.lv/jquery/gomap/js/jquery.gomap-1.3.2.js
Here is my code:
$.getScript('http://maps.google.com/maps/api/js?sensor=true').done(function() { $.getScript('../js/gomap.js').done(function() {
I tried changing the AJAX settings to set async to false , but that didn't help.
Macmac
source share