How to use Google Maps API with Dojo and AMD

If you are using AMD or RequireJS for your JavaScripts and you would also like to use the Google Maps JavaScript API you have a problem. You can’t just require in the script file and then access the google.maps object from within your script, e.g.: require([‘http://maps.googleapis.com/maps/api/js?client=YOUR_CLIENT_ID’], function() { var myMap = new google.maps.Map(mapDiv, mapOptions); } …