Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Updated AMD config to enable async loading with googlemaps-amd plugin #413

Merged
merged 1 commit into from
May 19, 2015

Conversation

adambiggs
Copy link
Contributor

This fixes the UMD wrapper so that RequireJS can load the Google Maps API asynchronously via the googlemaps-amd plugin.

I also removed the AMD module ID to make it easier to work with:

You can explicitly name modules yourself, but it makes the modules less portable -- if you move the file to another directory you will need to change the name. It is normally best to avoid coding in a name for the module and just let the optimization tool burn in the module names.

Also, if GMaps is loaded via a module loader, don't define it as a global.

@hpneo
Copy link
Owner

hpneo commented May 17, 2015

Hi, can you please move your changes from gmaps.js to gmaps.core.js? gmaps.js is just a file generated on each new version.

@adambiggs
Copy link
Contributor Author

There are no changes needed in gmaps.core.js, I only changed Gruntfile.js and umd.hbs. The changes in gmaps.js came from building using the $ grunt task.

@hpneo
Copy link
Owner

hpneo commented May 19, 2015

Right, sorry about that.

hpneo added a commit that referenced this pull request May 19, 2015
Updated AMD config to enable async loading with `googlemaps-amd` plugin
@hpneo hpneo merged commit e6cb4f3 into hpneo:master May 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants