Last active
August 29, 2015 14:17
-
-
Save zpratt/856f523fd72e6dfc76f2 to your computer and use it in GitHub Desktop.
Google Maps facade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var google = global.google; | |
module.exports = { | |
create: function (mapContainer, options) { | |
return new Promise(function (resolve) { | |
var mapInstance = new google.maps.Map(mapContainer, options); | |
google.maps.event.addListenerOnce(mapInstance, 'idle', function () { | |
resolve(mapInstance); | |
}); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment