2

I have my google maps code which is bundled down into a browserify module.

   module.exports = function() { 
    function initMap() {
      var myLatLng = {lat: 41.8239898682, lng: -71.4128341675};
      var locations = [
          ['Dorrance Street', 41.8220502,-71.4095081],
          ['Eddy Street', 41.8249484,-71.4121044],
          ['Pine Street', 41.8205150,-71.4119489],
         // ['Knight Street', 41.8177325,-71.4268190, 4],
          ['Brown University', 41.8281583,-71.4020998],

        ];

//more stuff

The problem i am having is the callback is giving the error

Uncaught InvalidValueError: initMap is not a function

Any idea how I can get google maps working with browserify?

Both files are in the the footer and the order does not make a difference.

apebeast
  • 368
  • 3
  • 15
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
  • Solution given in this SO post - [GoogleMaps does not load on page load](http://stackoverflow.com/questions/34466718/googlemaps-does-not-load-on-page-load) and the complete documentation [Browserify-Handbook](https://github.com/substack/browserify-handbook) in GitHub might help. – Teyam Jul 08 '16 at 10:22

0 Answers0